#đ»ă»modding-dev
1 messages · Page 547 of 1
oh yea that makes sense too
i would still recommend doing the update + downgrade i mentioned
bump
you dont need to know that
check this shit out
im way too obsessed with how well this works
:D
because the lovely dev is a moron
I'm struggling to understand the steammodded documents
I'm gettin ERROR at the bottom of my packs and the document makes no sense
VanillaRemade's wiki may be more helpful
but that text is a separate localization, gimme a minute to find where you need to put it
- set a string as a
group_keyin the booster pack's definition. it should be the same key across all booster packs of the same type, and while you don't technically have to follow any specific formatting, it's recommended to setgroup_key = 'k_[mod prefix]_[booster name]' - directly in misc > dictionary, add a new string assigned to what you set the group key to. e.g. for my Dice Bags in my dice mod, i set the group key to
'k_hrlr_dice_bag', so in misc > dictionary i definek_hrlr_dice_bag = 'Dice Bag'
Ugh, thank you so much.
bump2..
but how do I do it right then?
you can likely just call the play video code directly instead of putting it in the love2d game loop (because it already IS in the game loop).
jesus christ code blocks or you will be slain
so I only need this?
function love.load() video = love.graphics.newVideo("Freddy.ogv") video:play() end
One way to find out
What's the best way to find the files that need to be patched?
you read the code until you find the part you want to patch
Perfect
G.GAME.chips is not a table
... unless you have talisman but in that case getting the length would still be wrong
Bump
What is match_indent = true for?
And a more important question: How do I make it, so that when I patch a sound, it can find it? Because I can't put it in the game's folder, can I?
if you patch a sound in a function it will be after your mod has already loaded
match indent is to match the indent of where you're patching
What does that mean?
the game calls (most) functions during gameplay not when the game starts
so at that point your sounds are already loaded and you can use your keys
this is to say you would use a sound the same way you would in your regular code
But I get this error
show code
version = "0.1.0"
priority = 0
[[patches]]
[patches.pattern]
target = 'card.lua'
pattern = '''
play_sound('whoosh2', math.random()*0.2 + 0.9,0.5)
play_sound('crumple'..math.random(1, 5), math.random()*0.2 + 0.9,0.5)
'''
position = "at"
payload = '''
play_sound('rippingPaper', math.random()*0.2 + 0.9,0.5)
'''
match_indent = true```
Do I need to create one for that?
yes
My bad
bump
have you read set_ability
no
I made a custom gradient for a rarity, probably an easy question but how do I implement it
SMODS.Gradients["mvan_RainbowGradient"]
thanks
How do I make a playing card not score no matter what, under some condition?
...looking into the code im beginning to feel that this will need a patch
AH I SEE THANKS
...i think it's the undocumented parameter never_scores
EDIT: it is
what to do for this error
never_scores real?
is there a way to change the background to an image
How do I spawn in a custom rank with SMODS.add_card?
rank = "modprefix_key"
And what would the set be?
"Base", "Enhanced" or "Playing Card"
can someone help with this too pls
Am I missing something? Why is this not doing anything?
Where am I doing that?
in different file:
anyway my first guess is that you need to give at least a suit to SMODS.add_card as well
no nvm just checked vanilla remade
So, any idea why it isn't spawning?
Show the code where you're spawning the card.
It's in a consumable
key = "split_chip",
set = 'cstorm_tokens',
atlas = "tokens",
pos = { x = 4, y = 0},
pixel_size = { w = 71, h = 71 },
config = { max_highlighted = 1 },
unlocked = true,
discovered = true,
cost = 3,
use = function (self, card, area, copier)
SMODS.add_card { set = "Base", rank = "cstorm_HalfJack"}
end
}```
...yep, it's the undocumented never_scores
we love undocumented functions
If anyone finds a solution as to what the problem is, please ping reply me because I'm gonna go to bed now -_-
I know debug plus can change it to a neon green/greenscreen and thats similar to what i want to do but i dont know where/how it does that
Tangents does that
the mod Tangents does that
ooh
now is there a way to make. ui boxes have custom sprites
i need to inflict my aesthetic preferences on every inch of balatro
is there a way to make enhancements only activate once? Im tryna make an enhancement that upgrades hand if there are 3 or more played card with the enhancement, the problem is it upgrades with the amount of that enhancement played... how do i fix that?
add_to_deck = function(self, card, from_debuff)
local death = G.P_CENTERS and G.P_CENTERS.c_death
death.config.max_highlighted = death.config.max_highlighted + 1
end,
remove_from_deck = function(self, card, from_debuff)
local death = G.P_CENTERS and G.P_CENTERS.c_death
death.config.max_highlighted = death.config.max_highlighted - 1
end,
any idea why the text of the death card updates properly when the value is increased but not when it's decreased? if i sell this joker the death card's description still says 3 even though it can only actually select 2
Because you're not changing cards that currently exist.
that would make sense
whats the method to check if the player buys a voucher?
if context.buying_card and context.card.ability.set == 'Voucher'
ohh wow i keep forgetting the ability.set thing exists it seems to keep being the answer to my weird shop stuff ty
it does properly update their ability just not their text; do you know how i could make the text change as well? like do i have to change their loc_txt somehow?
it's not that consequential to gameplay but it does bug me that it doesn't update existing cards
for k, v in pairs(G.I.CARD) do
if v.config.center.key == 'c_death' then
v.ability.consumeable.max_highlighted = v.ability.consumeable.max_highlighted + 1
v.ability.max_highlighted = v.ability.max_highlighted + 1
end
end
I appreciate your help! Right now it says that this crashes at line if v.config.center.key == 'c_death' with attempt to index field 'center' (a nil value). I'm trying to look into how I can fix it though.
Change the . between center and key to be a _
how do i remove a debuff from the boss blind
Thank you seriously, you are, as some might say, the GOAT.
Real excited to say that I finally wrote my first Lua module in rust
Doesn't use ffi though
You mean remove debuffs from all cards?
i meant stop a boss blind from getting debuffed
You mean disabled?
yeah sorry
Hook Blind:disable
been looking at obelisk to try and figure out how to only give mult if a hand has been played less than 5 times, but im a little confused on how obelisk itself implements it
wrong < sign 
theyre putting me in the hydraulic press
Bump
How bro looks at me when I lowkey ask for something
if i wanted to take the current mult of the hand, is this correct
No, it's mult
mult gives the yellow line
shh
Yes, but it is mult
Yea because the global variable isn't in your files it will work fine
ahh okay
what caused this
IS THAT GM CONSTRUCT
You mean G.hand being visible?
yes
bump
Having a problem where removing the eternal tag from something keeps it from being sold. I'm using j.config.center.eternal_compat to detect if a joker isn't eternal compatible and j:set_eternal(false) to remove the eternal sticker so using my consumable removes it. Sounds weird but it's just a part of how the deck works
have triggering it set a global flag
check that flag when the card triggers
and reset it when hand finishes
so how does the pools parameter work?
Can I just create a new pool right there, or do I have to create it somewhere else first?
And is there a way to pull jokers out of this pool directly with add_card?
pools = { ['dinosaurs'] = true },
Create the pool as ObjectType, then you can set its' key for pools and such.
yea I think i figured it out.
Thank god for vanillaremades wiki
Everything on everything đ€Ż
wtf.....
Why is this not doing anything? Am I missing something?
Everything on everything only gets you to e20
Can you put a smaller playable version of Balatro on a card
Balatro on everything
Everytro on balathing
Is there any GAME variable that counts the ammount of cards played?
is there a way to check if when a joker is sold if its the first one sold that round?
bump
Does anyone know how to add a second spritesheet for jokers to the game or some way to fit more into the same one? Help would be greatly appreciated!
You expand the resolution of the sheet or start a new one, registering it too.
Any good program to do that?
(the resolution one)
Any image editing software - GIMP, Paint.NET-- hell, even original mspaint.exe can do it.
cool thx man!
I'm making a deck which is supposed to track two different suits and perform actions based on how many scoring cards of a specific suit you had in your played hand. Is there a way for this to work?
What kind of actions?
the whole premise is shifting between two "states", and if your hand (for example a full house) scores 3 diamonds and 2 clubs you'll enter the "diamond" state. That's as simple as it gets
does joker have shop rate?
I don't mean to sound like a dumbass, but how do I add a secondary dependency for a mod?
This doesnât answer the question at all
bump2
In your json file
Add a , and a string for the next mod dependency
,âCryptidâ
the action could be as simple as declaring a value as true or false, I still don't know how to implement it because I don't know how to make the deck read played suits within a hand. I just need a way to read the scoring suits
no, that's determined by the rarity
Okay still not really what I asked, but you can just give it a calculate function and count the suits in context before
sorry i'm just a little lost
I think aikoyori has a joker with a high shop rate idk if itâs a custom rarity
Individual item weights coming soon tm
I had a Joker have its own rate to spawn by replacing whatever card would be created
i had a joker have its own rate to spawn by replacing get current pool entirely
Explain what you want the effect to do exactly when Iâm a given state
Do decks have a calculate function?
yes
If you score diamonds you'll enter a state in which you'll have a x0.7 mult but gain 2 dollars per card played, and if you score more clubs you'll enter a state in which you'll have a 1.7x mult but lose 1 dollar per card played.
is there a way to have a joker check to see if you're on a specifc boss blind?
if G.GAME.blind.config.blind.key == 'bl_modprefix_key'
ah thanks, if it's just a vanilla boss do i just do 'bl_key' ?
yep
gotcha thanks
bump3
OMFG I FOUND THE PROBLEM! The file that has the ranks doesn't get loaded because I had a brainfart or so when I added it to my main file TwT
Nvm, it still doesn't spawn
Okay, why is it saying ERROR and has the wrong sprite?
Did you put it in the localization?
What exactly?
The text for the rank
I put cstorm_HalfJack = { name = "Half Jack", text = { "Test Jack" } },
into Other{}
Yes, it doesn't go in Other it goes in Localization > misc > ranks
Okay but why does my sprite not get used?
is there a way to access a card's chips? like say i want my joker to add double a card's rank to its variable, and i play an ace, if i use context.other_card:get_id() it'll add +14 instead of +11, so i want it to access the card's chips rather than its rank
context.other_card:get_chip_bonus()
yeah that
does it also add chips from bonus cards or hiker, or just the card's initial chips?
the former
is there a way to make it not do that? i only want the initial chips since they represent the card's rank
card.base.nominal
like context.other_card.card.base.nominal or do i just put card.base.nominal
context.other_card.base.nominal
is there a way to temporarily store keys of currently held jokers
An Ace has the id 14, right?
yeah
local keys = {}
for k, v in pairs(G.jokers.cards) do
table.insert(keys, v.config.center.key)
end
So if I were to do SMODS.add_card { set 'Base', rank = 14 } it should add an Ace?
No.
Why not?
You have to use the key, not the id
So I would need to use "Ace" instead?
Yes.
-# hi somecommm hiiii I missed you Hiiii 
Thank you a lot â€ïž
Hey i would like some help about something, my joker works but isn't exactl working correctly with 'Oops All 6's !' basically it's meant to add +1 or +2 of luck but the problem is that the added luck doesn't get doubled, it only double the default original luck (1) so for exemple in a 14/70 chance, All 6 will simply make it 15/70, i would appreciate any help possible !
config = { extra = { odds = 70, prayluck = 0} },
loc_vars = function(self, info_queue, card)
return { vars = { G.GAME and (G.GAME.probabilities.normal + card.ability.extra.prayluck or 1 + card.ability.extra.prayluck), card.ability.extra.odds } }
end,
calculate = function(self, card, context)
if context.using_consumeable and not context.blueprint then
if context.consumeable.ability.set == "Tarot" then
card.ability.extra.prayluck = card.ability.extra.prayluck + 1
elseif context.consumeable.ability.set == "Spectral" then
card.ability.extra.prayluck = card.ability.extra.prayluck + 2
end
end
if context.end_of_round and context.game_over and context.main_eval and not context.blueprint then
if pseudorandom('cymbal_solSister') < (G.GAME.probabilities.normal + card.ability.extra.prayluck) / card.ability.extra.odds then
card.ability.extra.prayluck = 0
return {
message = "Prayers answered.",
saved = 'j_cymbal_solSister'
}
end
end
end
}```
Yes, you need to use SMODS.pseudorandom_probability
Must SMODS pseudorandom replace the game probablities one or something else ?
oh wait i've a older version of smods (smods-1.0.0-beta-0509c), i should update that first probably
and thanks for the help
Best way to record how many of a tarot/spectral/third card type I use in a run?
G.GAME.consumeable_usage_total.tarot/G.GAME.consumeable_usage_total.spectral/G.GAME.consumeable_usage_total.planet
bump
can i detect a run reset? I know -1 exists but that's just the transition screen and it fucks up a lot of things.
You mean when a new run is started?
yes
Hook Game:start_run and check if not args or not args.savetext?
Yes
Simply make a global table and reset it every round start
And when a joker is sold just add it to the table and check if the table size is 1 if itâs 1 then itâs the first one sold
Alright, i'll try that
how do you do that? I haven't really worked with any globals yet
No, you just set it to false when a joker is sold and check if it's true
Thatâs a different approach
Table still work Lol
No, because it wouldn't save.
Why wouldnât it save
Because you're putting a card in the save file.
how would i change this tarot from being change 1 selected card into a cloud card to instead being all cards in hand, i know some spectrals do all cards held in hand become suit/rank but it's confusing me a bit
cloud card being a custom enhancement
i think you can use max_highlighted for it
oh wait i missreaded it
Yeah
It's okay I found something different that was easier to code and I honestly like it more
should help
the spectrals.lua page would probably help more
in particular sigil converts all cards in hand to a random suit, so you can see how it does that
within standard packs do they not use set_edition to set editions?
i have an edition that i specifically dont allow on playing cards but somehow one of my buddies still pulled it from the pack
Hey so, i'm trying to use the smods pseudoluck but i think i only half understand it, i would like some help please ?
config = { extra = { odds = 70, praylucktarot = 1, prayluckspectral = 2} },
loc_vars = function(self, info_queue, card)
local new_numerator, new_denominator = SMODS.get_probability_vars(card, numerator, demoninator, 'luckpray')
return {vars = {new_numerator, new_denominator, other_value}}
--[[
return { vars = { G.GAME and (G.GAME.probabilities.normal + card.ability.extra.prayluck or 1 + card.ability.extra.prayluck), card.ability.extra.odds } }
--]]
end,
calculate = function(self, card, context)
if context.using_consumeable and context.mod_probability and not context.blueprint then
if context.consumeable.ability.set == "Tarot" then
numerator = context.numerator + card.ability.extra.praylucktarot
elseif context.consumeable.ability.set == "Spectral" then
numerator = context.numerator + card.ability.extra.prayluckspectral
end
end
if context.end_of_round and context.game_over and context.main_eval and not context.blueprint then
if SMODS.pseudorandom_probability(card, 'cymbal_solSister', numerator, denominator, 'luckpray') then
numerator = 1
return {
message = "Prayers answered.",
saved = 'j_cymbal_solSister'
}
end
end
end
}```
They do use set_edition
you can't just put "numerator" and "denominator" into the probability functions (both get_probability_vars and pseudorandom_probability), those variables don't necessarily exist
i'd recommend defining a default numerator in your config table, and then replace all instances of "numerator" and "denominator" with "card.ability.extra.numerator" and "card.ability.extra.odds"
very strange then that he managed to get a card that functionally should be impossible
hey gang, im trying to make a joker that draws 1 additional card whenever you play or discard, and while having it draw the extra card from playing a hand works just fine, it doesnt do anything when, if you are over your handsize limit, discard down to your handsize. anybody got any idea how to fix it?
key = 'amoeba',
loc_txt = {
name = 'Amoeba',
text = {
"After play or discard,",
"draw {C:attention}#1#{} additional card"
},
},
config = {extra = {additional_cards = 1, triggered = false}},
rarity = 1,
atlas = 'CosmicTomfoolery',
pos = {x=0,y=0},
cost = 3,
blueprint_compat = true,
loc_vars = function(self, info_queue, card)
return {
vars = {card.ability.extra.additional_cards}
}
end,
calculate = function(self, card, context)
if context.before then
card.ability.extra.triggered = false
end
if context.hand_drawn then
card.ability.extra.triggered = false
end
if G.STATES.SELECTING_HAND and (G.GAME.current_round.hands_played ~= 0 or G.GAME.current_round.discards_used ~= 0)
and not card.ability.extra.triggered and (#G.hand.cards >= G.hand.config.card_limit) and
(#G.hand.cards - G.hand.config.card_limit ~= 1) then
G.E_MANAGER:add_event(Event({
func = function ()
draw_card(G.deck, G.hand, nil, nil, true)
return true
end
}))
card.ability.extra.triggered = true
end
if context.discard and context.other_card == context.full_hand[#context.full_hand] then
card.ability.extra.triggered = false
if G.STATES.SELECTING_HAND then
card.ability.extra.triggered = true
end
end```
boom
thanks goat
Sorry bud, been beating you all day
are we serious đ
I think we're getting there. I prefer to take things slow though
config = { extra = { numerator = 0, odds = 70, praylucktarot = 1, prayluckspectral = 2} },
loc_vars = function(self, info_queue, card)
local new_numerator, new_denominator = SMODS.get_probability_vars(card, card.ability.extra.numerator, card.ability.extra.odds, 'luckpray')
return {vars = {new_numerator, new_denominator, other_value}}
end,
calculate = function(self, card, context)
if context.using_consumeable and context.mod_probability and not context.blueprint then
if context.consumeable.ability.set == "Tarot" then
card.ability.extra.numerator = card.ability.extra.numerator+ card.ability.extra.praylucktarot
elseif context.consumeable.ability.set == "Spectral" then
card.ability.extra.numerator = card.ability.extra.numerator + card.ability.extra.prayluckspectral
end
end
if context.end_of_round and context.game_over and context.main_eval and not context.blueprint then
if SMODS.pseudorandom_probability(card, 'cymbal_solSister', card.ability.extra.numerator, card.ability.extra.odds, 'luckpray') then
card.ability.extra.numerator = 0
return {
message = "Prayers answered.",
saved = 'j_cymbal_solSister'
}
end
end
end
}```
So basically this then ?
I dunno what the exact effect of this is meant to be but it shouldn't crash the game, yes
Oh yeah i should explain it but it's meant to add +1 or +2 to the numerator if a tarot or spectral card is used
so far it doesn't crash yes but the number doesn't change
actually i should replace the card ability numerator at first by numerator itself
no, "numerator" by itself doesn't exist anywhere
Ah i see, this is getting somewhat confusing
i was thinking numerator = card.ability.extra.numerator * 0 and similar could help to change the numerator value
my main issue i had was the original code i set wouldn't make my joker work properly with oops all 6's, that why's i'm redoing this
the issue is context.using_consumeable and context.mod_probability never happen at the same time. just remove context.mod_probability, you're not using it right (it's supposed to be for effects like oops all 6s itself, which modifies other probabilities)
AH alright, maybe that's why, i'll try that
I just used context.mod_probability since it was said in the page's release
yea i can see how you got that, but it's specifically for modifying other probabilities
i should try to think of that
And normally oops all 6's should affect the entire probability of my joker no matter if added up right ?
yes, by using the new SMODS probability api oops all 6s will properly have an effect on your joker now (as well as any other modded content that does probability-modifying stuff)
YES IT WORKS
thanks
i've been only recently noticing now my joker wasn't working properly with the dice
and also realised i didn't updated my smods since a bit too
yea the API is a new change from 0711a
i'll need to change my other jokers though to adapt to the new smods now i suppose
Is there a way to have stickers be applied to specific types of cards, eg: if a card falls under a group called âautographâ, can a sticker be applied to that group
how do you open the debug plus console it not working for me
did you try pressing /?
bump
yes
weird
Oh and how to do the blueprint compatible/incompible text ?
as per the documentation on the SMODS wiki, blueprint_compat = true as one of the parameters for the joker (i.e. not in any functions). it's set to false by default if you don't provide it for the joker
I already know for that, i mean the green and red text the original blue print has
Since i've a joker similar to blueprint, i also want it to have the compatbility text
SMODS.Joker {
key = "dprinter",
loc_txt= {
name = 'Dream Printer',
text = { "Copy the abbilities of the joker on the {C:attention}right",
"{C:green}#1# in 3 Chances{} to trigger it 2 more times",
"{C:inactive} (How can this exist ?)"
},},
atlas = 'dprinter',
pos = { x = 0, y = 0 },
rarity = 3,
cost = 15,
pools = {["pseudoregamod"] = true},
unlocked = true,
discovered = false,
blueprint_compat = true,
eternal_compat = true,
perishable_compat = true,
config = { extra = { odds = 3}},
--return { vars = { center.ability.extra.mainodds, center.ability.extra.totalodds} }
--create the 'other_joker' vallue as well of adding the 1/3 chance, normally
loc_vars = function(self, info_queue, card)
if card.area and card.area == G.jokers then
local other_joker
for i = 1, #G.jokers.cards do
if G.jokers.cards[i] == card and G.jokers.cards[i + 1] then
other_joker = G.jokers.cards[i + 1]
end
end
end
return { vars = { (G.GAME and G.GAME.probabilities.normal or 1), card.ability.extra.odds } }
end,
--gotta re-add the function of before
calculate = function(self, card, context)
local other_joker
for i = 1, #G.jokers.cards do
if G.jokers.cards[i] == card and G.jokers.cards[i + 1] then
other_joker = G.jokers.cards[i + 1]
end
end
if other_joker then
local defaultblue = SMODS.blueprint_effect(card, other_joker, context)
local stupidblue_effect = stupidblue(card, other_joker, context)
return merge_effect({defaultblue}, {stupidblue_effect}) --merge_effect isn't a real thing, look up the local merge effect
end
end
}```
Dilly did you fix this
i have no idea, i did see with smt i was just doing self.set instead of self.ability.set
but i havent been able to reproduce the conditions my buddy had and he didnt have the seed
it was just fascinating in my own testing i never had it occur
so hopefully its fixed now and ill simply see in the future
Can you send the edition definition anyway?
oh sure, i assumed it was my set edition hook
bump^2
Could also be that, would need to see it to know
what do i access to get the current ante
G.GAME.round_resets.ante
what about the current chip score?
I'm creating a custom joker that copies the chip value onto mult.
i ahte u
thanks
i was getting the link
hi dilly
Hi N!
bump^3
instead of all of that try
if context.drawing_cards and (G.GAME.current_round.hands_played ~= 0 or G.GAME.current_round.discards_used ~= 0) then
return {
cards_to_draw = context.amount + 1
}
end
<@&1133519078540185692>
boom
do you know where rounds played are stored?
cuz its not under G.GAME.round_resets
G.GAME.round i think
oh ok ill try that
it works thanks
using this it does not work with multiple copies, only the first one draws an extra card
oh yeah that should probably be fixed
try using SMODS.draw_cards(1) instead of the return
crashes lol
no crash message, game closed itself immediately
lemme try again, see if it gives a message this time
yeah just closes the game
no message, nothing
man if only there was an easy way for me to check when you're in an "idle" state in a blind after playing or discarding (and you have your full hand/all cards drawn)
oh
closest i got is the jank ive got so far with G.STATES.SELECTING_HAND
it's G.STATE == G.STATES.SELECTING_HAND
not really
wdym not really
youre in the selecing hand state the moment you can select cards, which isnt the same as when you can play/discard cards
for example if you put the game on 0.5x speed, then discard some cards, try to click the cards in your hand
(if im correct,) the moment clicking on one of the cards in hand moves them up, selecting them, that's when youre in G.STATES.SELECTING_HAND
no
and that can happen BEFORE you're actually "idle"/able to play/discard
selecting_hand is the idle state
anyway
if context.drawing_cards and (G.GAME.current_round.hands_played ~= 0 or G.GAME.current_round.discards_used ~= 0) then
return {
cards_to_draw = context.amount + #SMODS.find_card("j_modprefix_key")
}
end
that should be a quick hack
i will PR context.amnount to update properly
does this work with BP/BS copies?
no
dang, then i need to find a quick hack for the quick hack to get that to work
oh also this doesnt work when you have more cards in hand then your handsize cuz then context.drawing_cards wouldnt happen right
hmm I think then it's just easier to call SMODS.draw_cards(1) in context_after and context.pre_discard like this
G.E_MANAGER:add_event(Event({
blocking = false,
func = function()
if G.STATE == G.STATES.SELECTING_HAND then
SMODS.draw_cards(1)
return true
end
end
}))
probably needs another check for end of round
drawing cards is called when the handsize is more
just checked
check if it doesnt do anything weird when you win a round lol
thanks alot, if only i knew this function was a thing đ
it does everything as intended
i replaced the 1 with card.ability.extra.additional_cards so other mods can mess with the value
How do you increase the appearance rate of a certain rarity?
Specifically talking about jokers
Yall think this is too OP? Also yes I cannot do art
I think that is slightly op
You think it just needs a rarity increase?
make the joker have a chance to break for the extra funny
To increase a joker sell value I have to do card.sell_cost = value? I have an issue where buying the sales voucher resets all jokers sell value
change G.GAME.[lowercase rarity key]_mod
card.ability.extra_value
or hook set_cost
card.ability.extra_value = card.ability.extra_value + card.ability.extra.sell_value
something like this?
mmm seem's to work better but still reduces a little the sell cost for some reason
because it's based on the cost so if the cost lowers it will lower it
that or make it a 1/4 chance for the joker to break
whats a simple way to get the rank of the card scored? i know how to like, check if the card is a certain rank but i need to do a calculation based on what the rank is and it should be able to work on any rank
card.get_id()
ty !!
How do you make a card or list of cards more likely to appear in shop?
gotcha
Where would I begin with adding UI to the "hud" like what the Grim mod does
there isn't a straightforward way to do it yet other than give it a custom rarity
damn, im working with specific consumables đ
i think it would be cool if ObjectType (and not just ConsumableType) had a shop_rate
objecttypes dont appear in the shop by themselves
yeah i know..
soon................
Okay, How do I make a UI thing that spawns on its own during a run, just an overlay basically
Ill give detail if any is needed lol
That would be beautiful for what im working on rn
i have individual weights in my mod but i just overwrite get_current_pool
when does it spawn
It should spawn whenever a run is active, like what Grim used to do with its XP bar
then you just create it at the start of the game, by hooking Game:start_run for example
fuck, i gotta hook đ
thats the least of your worries if youre making a UI mod
true tho
so like this?
function Game:start_run()
print("Hooker, i hardly know her")
return Game:start_run(self)
end
That'll lead to infinite recursion
so i shouldnt beopening my balatro rn and starting a run
local start_fun = Game.start_run
Game.start_run = function(self)
print("Hi mom")
return start_fun(self)
end
yes
thank you
this is how I add buttons to the corner at the start of the game https://github.com/nh6574/JoyousSpring/blob/cd0d33bfe330358999a855563960b79410aac9ae/src/general_ui.lua#L616
ill look into that, thank you
Hooker??? đ
That template is how you override functions in general in Lua. Note that the obj:func syntax only works if you're calling the function. obj:func(...) is identical to obj.func(obj, ...)
i hardly know her
cool, now lets start writing ui
[flote was never seen again]
gl
we've lost some great people to the grand ui war
some start fiddling with UI and are never seen again
be strong
theres too many words for my kitty mind bro
kitty mind? as in, the kitty I have in my lap at this very moment, or the level 19 cat tag I'm about to make?
meow
hmm this is being weird i think, it's supposed to give mult if a scored card has more than 4 of its rank in your full deck, but it doesnt do anything when scored at the moment
If I wanted to do a rebalance mod of sorts, would I just like- copy the joker code of the already existing balatro and modify it or?
When i continue a run the Sprites are replaced by 'MANUAL_REPLACE' and no longer draw on cards, how can i prevent this?
i may be a little stupid, why would this cause a crash?
local start_fun = Game.start_run
Game.start_run = function(self, ...)
print("Hi mom")
self.test = UIBox(
{n=G.UIT.C, config={align = "cm"}, nodes={
{n = G.UIT.C, config = {minw=1, minh=1, colour = G.C.BLUE, padding = 0.15}}
}})
return start_fun(self, ...)
end
-# refering to patches_sprites and extra_card_sprites
nodes is empty, if there is no nodes it usually doesn't have the nodes table.
it gets the same issue when there still is stuff in the nodes
ill try again with a bit less bloat
yea, i added a node in it and still got the same crash
Try making test something like this {{n = G.UIT.R, config = {align = "cm"}, nodes = { {n = G.UIT.C, config = {align = "cm", padding = 0.02}, nodes = { {n = G.UIT.O, config = {object = DynaText({string = result, colours = {G.C.L_BLACK}, random_element = true, pop_in_rate = 9999999, silent = true, pop_delay = 0.2, scale = 0.32, min_cycle_time = 0})}}, }} }}} } with this before it local result = {'4','5'}
do you need the sprite to be tied to the run
as in do you need them to be saved
you get all 3?
currently in the process of making a thing based on ancient joker but for ranks (theres more to it but not in a way that matters for here) is there a convenient way to just grab all existing ranks in an array or should i just type like 9 10 J Q K etc
read the bottom of the SMODS.Rank docs
Minesweeper??
Do I have competition
oh do you ?!
the gimmick is a certain rank gives0.5x mult and adjacent ranks give 2x mult but you have to discard ranks to definitively figure out which ones the evil rank
That's a cool idea
LMAO we are up to something different i fear
That screenshot is old (~1.5 months) but I kinda stopped working on this for a while
Basically everything is implemented but the art is missing for the mod update so it isn't even published
yeah
oh i see what its doing
unrelated issue đ
i do not see what it is doing i stand so corrected
Is this mine sweeper
where is calculate defined? Im trying to re-run the function but it is not card:calculate() nor is it global
ok i feel like this should be simpler than im making it but im trying to have a completely random rank get chosen each round, and i cant figure out how to have a rank and id both be in the same variable if that makes sense, since the scoring part itself has to get id
i know how to make it happen based on what's in your deck but i need this one to function like ancient joker and thats really confusing me
card:calculate_joker
similar to that but not weighted based on the cards in your deck
what's wrong with this
im gonna put it back rq so i can go over whats going wrong because theres kind of a lot that isnt happening one sec
ohh
If you want to run calculation, SMODS provides functions to do that
if things don't work i recommend printing the values
so itd look more like this?
G.GAME.current_round.znm_minesweeper_rank = {}
G.GAME.current_round.znm_minesweeper_rank.rank = pseudorandom_element(SMODS.Ranks, pseudoseed('znm_minesweeper'))
G.GAME.current_round.znm_minesweeper_rank.id = pseudorandom_element(SMODS.Ranks, pseudoseed('znm_minesweeper'))
Recently I made this Joker that selects random Ranks:
calculate = function(self, card, context)
if context.setting_blind then
local candidate_ranks = {}
for k, _ in pairs(SMODS.Ranks) do
candidate_ranks[#candidate_ranks + 1] = k
end
pseudoshuffle(candidate_ranks, pseudoseed("vic_hangman"))
local selected_ranks = {}
for i = 1, 5 do
selected_ranks[i] = candidate_ranks[i]
--sendDebugMessage(tprint(candidate_ranks[i]))
end
card.ability.extra.secret = selected_ranks
card.ability.extra.seen = {}
card.ability.extra.n_seen = 0
elseif context.individual and context.cardarea == G.play then
local id = context.other_card:get_id()
for _, rank in ipairs(card.ability.extra.secret) do
if id == SMODS.Ranks[rank].id and not card.ability.extra.seen[rank] then
card.ability.extra.seen[rank] = true
card.ability.extra.n_seen = card.ability.extra.n_seen + 1
return { dollars = card.ability.extra.dollars +
(card.ability.extra.n_seen >= 5 and card.ability.extra.dollars_extra or 0) }
end
end
elseif context.end_of_round and context.cardarea == G.jokers then
end
end,
What ive done for this card so far is create a fake context that I then feed into calculate_joker:
local handContent = {
cardarea = G.hand,
full_hand = G.play.cards,
scoring_hand = context.scoring_hand,
scoring_name = context.text,
poker_hands = context.poker_hands,
main_scoring = true
}
print("made new context, running")
local eval = card:calculate_joker(card, handContent)
Is there a calculate function that would work for what im doing?
(also yes this card hasnt been balanced yet)
@vague crest if this helps
Hi vic
Hello dilly how are you
Im okay, ive felt really weird physically today but im laying down to see if that helps
How are you?
Not a calculate function, but there are functions that run calculation
hmm ok would this give the same ones if you had multiple copies?
Going to sleep
local random_rank = pseudorandom_element(SMODS.Ranks, 'znm_minesweeper')
G.GAME.current_round.znm_minesweeper_rank = {}
G.GAME.current_round.znm_minesweeper_rank.rank = random_rank.key
G.GAME.current_round.znm_minesweeper_rank.id = random_rank.id
Oh I hope you sleep awesomely
Thank you
this works beautifuly tysm!!!
@timid night take a look at this or something similar https://github.com/Steamodded/smods/blob/c4c246c687067897afed7526b8b454d5ba2b6c81/src/utils.lua#L2052
Tip: don't reinvent the wheel
I'm sure there are at least two mods already implementing the same effect you're trying to, so take a look at them
btw if anyone has a wheel they don't want to be reinvented you're free to PR the snippets of code to the vanillaremade wiki :3
Could anybody tell me why this isnt working? dw if not
calculate = function (self, card, context)
if context.individual and context.cardarea == G.play then
-- make a new context where the cards that the game thinks are being held in hand is the scoring_hand
local handContext = {
cardarea = G.hand,
full_hand = G.play.cards,
scoring_hand = context.scoring_hand,
scoring_name = context.text,
poker_hands = context.poker_hands,
main_scoring = true
}
print("made new context, running")
local eval = SMODS.eval_individual(context.other_card, handContext)
print(eval)
return eval
end
end
The error is:
[SMODS _ "src/utils.lua"]:1995: attempt to index field 'object' (a nil value)"
also funny fact I dont think a game has ever made me feel so hacky modding it
I made a card that makes it so glass cards cannot break and I spent like an hour trying to get it to work
then I did the unholy of just overwriting psuedorandom
local truePseudorandom = pseudorandom
local preventedBreak = false
function pseudorandom(key)
if key == "glass" and check_for_joker("j_arthur_jokerGlue") then
if (pseudorandom("ArthurMod_glassTrue") < G.GAME.probabilities.normal/4) then
preventedBreak = true
end
return 99 -- force "safe" roll
end
return truePseudorandom(key)
end
there are contexts for this in the new smods lol
you can also take_ownership of glass cards
are you kidding me just
# card.lua
func = function()
for i=#G.hand.highlighted, 1, -1 do
local card = G.hand.highlighted[i]
if card.ability.name == 'Glass Card' then
card:shatter()
else
card:start_dissolve(nil, i == #G.hand.highlighted)
end
end
return true end }))
this is in card.lua just prevent the check
LMAO
this wont work with smods
because it takes_ownership of it
mm
you can patch smods but there's no reason to with the new probability functions
SMODS.Enhancement:take_ownership('glass', {
calculate = function(self, card, context)
if context.destroy_card and context.cardarea == G.play and context.destroy_card == card and SMODS.pseudorandom_probability(card, 'glass', 1, card.ability.extra) then
card.glass_trigger = true
return { remove = true }
end
end,
})
this is it so the ind would be 'glass'
funny thing about this the joker says that it "prevented" the glass card from breaking but really its just another random roll to put the text there
How do you add a dependency to your mod
{
"id": "Tower",
"name": "The Tower",
"display_name": "The Tower",
"author": ["jamirror", "pikaboy10", "cylink", "Cryptid Discord"],
"description": "Very hard balatro.",
"prefix": "tower",
"main_file": "Tower.lua",
"vvvvv": "chara reference real???",
"priority": 9999,
"badge_colour": "3f0e8b",
"badge_text_colour": "ffffff",
"version": "0.0.1-b",
"dependencies": [
"Steamodded (>=1.0.0~BETA-0711a)",
"Talisman (>=2.2.0a)",
"Cryptid (>=0.5)"
],
"conflicts": [
"NotJustYet"
]
}
add that funny deps field
o
I didnt know you needed a json file thanks
how would you add a mod icon like cryptid though?
Somehow didn't see this, i just need to save them.
It's a choice you only get one but you get to pick.
If you need them to be saved with the run then I would recommend saving the atlas and the position of the sprite instead. The game doesn't really like saving objects
if you don't need to then just store them in G instead of G.GAME
define an atlas named modicon
mine for example don't mind the "color" part
SMODS.Atlas({
key = 'modicon',
path = 'kitty ('..color..').png',
px = 34,
py = 34
})
if context.individual and context.cardarea == G.play then
local eval;
-- make a new context where the cards that the game thinks are being held in hand is the scoring_hand
local handContext = {
cardarea = G.hand,
full_hand = context.scoring_hand,
scoring_hand = context.scoring_hand,
scoring_name = context.text,
poker_hands = context.poker_hands,
main_scoring = true
}
eval = context.other_card:calculate_joker(handContext)
print(eval)
return eval
end
for some reason, eval is always nil, even if ive played a king and I have baron
oh calculate_joker is for jokers haha
yeah im trying to get it to work with jokers for now
ok then the follow up is that individual is for playing cards
what is going on here
This function is the calculate function for a joker
yes but context.other_card is a playing card
eremel knows more about calculation
what are you trying to do
thanks
ultimately, im trying to get played cards trigger held in hand abilities, my method of doing that so far is creating a context where "full_hand" is set to the played one
e.g playing a king will trigger the 1.5x multiplier from baron
I will tell you now that this effect is difficult to code and a lot more involved than you think
oh great lmao
worst worst case which is a bit unholy is I could just re-code every interaction
My mod keeps crashing failing to index other card, a nil value. What do i need to fix it? Its supposed to check if played card is a gold card or has a gold seal
bc im definitely doing something wrong
you have to rescore cards pretending they are in hand and also catch any effects that are based off cards in hand and also redefine the end of round calculations
ah lovely
if you don't understand how calculation works very well, I wouldn't recommend trying to do this effect
bruh I planned this card out thinking "shouldnt take too long to code" đ đ đ
cool concept ngl tho
you have if A and B and C or D and E which evaluates to if (A and B and C) or (D and E)
so you want (C or D) in parentheses
also has_enhancement should have context.other_card not card and the key is "m_gold" lowercase
thanks
I've made a similar more specific thing
Yea, unfortunately i don't come up with much of the ideas for all in jest, i think I've only made 2-3 ideas and there's almost 300 jokers, and a ton of other content.
oh wow that is a lot of jokers
i personally prefer not adding much or adding 'similar' ish jokers
so that I can always have a medium chance of getting a card I want
but having many seems to make your runs more diverse
All in jest is a surprisingly really balanced mod, it hasn't been out that long either. (4 months and 25 days)
oh thats good
im trying to get opinions on this card, too OP?
also yes I cannot draw
I cant draw as well as Nevernamed (artist for aij), but i think i'm decent. And theres a similar effect for a card in aij that has the same rarity so i'd say it's balanced.
mines pretty unbalanced, but has some fun ones i believe, have made a custom rarity though for def op ones
I think i make pretty good edition shaders though.
i know next to nothing for edition shaders but its probably easier than i think
One idea that ive had that I give to the world is adding "corrupted" variants of cards. If anybody has played RoR2 it would behave exactly like the void items from that game
It's 99% math
you have a card, and then there is a tarot or a spectral card that corrupts it and turns it into a variant of that card
I've seen similar things, like shattered cards.
this is a joker ive made earlier in my mods development when i didn't know too much about smodded coding but
lmao
thought i was original too
based off these machines
It's hard to be original this far into the community
i did a cheap idea and made chip variants of gros michel and cavendish how fun
Just today i made an edition that has the same name and similar effect as one i made for another mod.
is there some visual reference you use for editions? the ones listed in smods.edition don't really work to show it it keeps having errors ig but idk much so
I did something like that but for polychrome
that seems very good
Using debugpluses watch shader really helps, i usually try to find a few glsl shaders that does a similar things that i want to and see what kind of math it uses.
I ripped these cards in half
dog ate my balatro
to show you the power of steamodded!
I sawed these jokers in half!
If the effect i planned to make for echo chamber is too complicated, what effect do you think this card should have?
i made the art so I might as well use it (even though the art was me drawing circles in aseprite)
You could have a 1 in 3 chance for each held in hand card to score
This is made with a texture i shoved into a shader.
like you get a percentage of the previous rounds mult
but that doesnt feel very vanilla
and I like having cards that feel like they could be in the base game
Me when
originality is
increase every scaling by ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^32903910391039210392109321093190391039201301931930193093019309393^ the sum of every fricking thing in the world together concepts hypothesis numbers etc
this is true originality
yeah what is it with insanely unbalanced mods in balatro
Cryptid++
Cryptid^^
but then when every run becomes a god run it stops becoming fun
True
It's only fun when you need to play like 100 run's to get that godly run
If exotics were actually exotics maybe it could be fun
with my mod it is big number go boom and death via blind
And If rare or epic jokers weren't fricking better than all the legendarys or other jokers in vanilla
i like making cards that have risk to them
ya i don't rly like cryptid lol its a shame because a lot of its mechanics are really cool
True
like cards that could really help my run or break it if im not careful
wait wrong reply sorry
iys ok !!
My favorite mod is lovely ngl
steamodded slightly better
All in Jest is Cryptid but balanced and not crashing
Actually it has more jokers than Cryptid now
but i love going into a run thinking ooh i could get a blueprint
I didnt play all in jest yet maybe I'll give it a try
i feel like with 300 cards that just will never happen
but thats just my opinion - no hate
what about 400
what about 2000
Theres other blueprint like stuff, also yea its more like 450 because of base jokers
good luck seeing the same card ever again lmao
I'm trying to get gold sticker on all decks and then on all jokers
wow
If I die before that I'll pass the save to my son
LMAO
you wont get blueprint anyway because i disable vanilla jokers
Dang 32 jokers a day isn't fast enough
pokermon has 6 more
i am actually working on a system to get jokers for my next update instead of adding more for now haha
This update was supposed to be just not joker stuff, than i did 42 in two days because i felt like it
I did 32 in one day than 10 the next
in my mod it's easy because my jokers work in groups so i can design one gimmick and make 20 jokers out of it. idk how aij manages haha
Aij is 90% unique jokers T_T
bro
thats unhealthy
That was one of the 32
Not really i had time to spare
how bro i don't think there's enough hours in a day
how long did it take you to make each one?
fucking hell
grindset
if you spent 20 minutes per joker
not me spending 2 days coming up with an idea and 5 days to come up with the art for one joker
Beat my score of 30 with that 32
youd of spent 44% of 24 hours making 32 jokers
considering that you need to sleep
and lets say you sleep for 6 hours, to be generous
that sounds reasonable
yes
what if they're just built diff
Just about yea
omega being
lets say you spend 2 hours eating total throughout the day
I spend far less than that but proceed
do you own a laptop perhaps
you roughly have 930 minutes in a day free
because i can not imagine being able to do this with a desktop setup
I do but i was using my pc
what the fuck đ
I have 3 moniters
sure that helps
wdym
I mean two at the time of coding
i cant code without my multiple monitors
which means you spent 68% of your free time making mod for balala
idk spending too much time on my computer makes me feel bad
holy
I can idle a game for 28000 hours that dont mean nothing smh
i spend more time and make less jokers on average
i should step up my game
you have more hours on balatro then I do my steam library
and i only play steam games
Same, it's my most played game
You dont play very long then :b
hey for me thats a compliment
It is for sure lmao I waste way too much time gaming
does this include joker art
Nope, Nevernamed makes all the art so it was already done
I do want to get better at the art, and tbf on the jokers i have been here for almost a year and a half coding
people think this is good? Takes 20% of the chips from last round and adds them to the next, might need nerfing or buffing, and I think the text needs a change.
also I forgot to round the number
Cool!
how do you think I could rewrite the text to feel "vanilla"?
I like making my mods as vanilla to the game theyre for as possible
but its the round before that one
Round 1:
300 chips scored -> 60 chips stored
+0 chips
Round 2:
100 chips scored -> 20 chips stored
+60 chips
if that made sense
not sure it did
Gain 20% of scored chips at the end of the round
my game does this trying to go into my editions and look at my edition. what is wrong here\
Did you define your shader?
I dont think this is normal đ„
really simple question, but how could I get the amount of chips earnt in one hand? I was using G.GAME.chips but I have quickly learnt that thats wrong
Scroll a little above that line
@red flower made a wonderful resource
His wiki and mod are great to learn from as well as the normal smods docs
think this card is finally done now
might need to buff it
but then also this card is prob OP in plasma decks
As long as its balanced enough in most scenarios I dont think you should worry too much about the outliers
only part im not sure about is that it removes the chips that it adds from the equation:
math.floor((hand_chips - card.ability.extra.stored) * (card.ability.extra.store_percent/100))
it led to the card scaling on-itself pretty uncontrollably
but ive ommitted that from the text
Trying to add an animated card to a deck. I'm specifically trying to replace the J of Diamonds but, I'm not fully sure how to do that...
key = peasley,
px = 71,
py = 95,
frames = 25,
path = 'peasley.png',
prefix_config = {key = false}, -- See end of file for notes
}```
cards dont accept animated atlas, you need to code the animation manually in update
i dont know any for playing cards sorry
I think the joker and cards ones are very similar you just need the cards center. That's how i animated an enhancement.
So there's hope?
i think for playing cards it would be the front not the center
unless it's for an enhancement
I think there's still a way, i made this enhancement update the front automatically.
Hooking similar code in the games update could do it
Thatâs really cool ngl
Any chance you'd be willing to help me out with the code for this? It's definitely beyond me it seems OTL
I might not have the time tonight, but i could tomorrow.
Awesome, I'll prepare the hc version then.
Which is potentially something to keep in mind making sure it matches the hc/lc
Thats fairly easy
Is there a way to link an in-game skin to a mod? So that as soon as the mod is selected a certain in-game card skin is used?
(as example my mod is on and the game switches to an in game card skin)
I mean you could make your deck replace the default cards instead of being an added deck.
Perhaps you could hide the front for that rank and draw your own animated front with SMODS.DrawStep?
Yeah the frames are already ready I just don't know the code part.
No, I mean draw as in, draw it on the card in the game.
but how can I do that?
Let's take a peek at that
Yeah I'm just reminded of the fact I am not a coder xD
the values are being returned as true and false properly when printed but they seem to always be true when it gets to the part at the bottom that scores the cards for some reason?
tghis is what it does for reference, if anyone has any better ideas to word this also im very open to it lolll this is so wordy đ
the calculate function is run many times during scoring; in particular, it's run once while context.before is true and then another time when context.individual is true for the scored cards in the played hand
so in context.before, you set lownum and highnum to their correct values, and then the calculate function is run again, overwriting lownum and highnum with {} no matter what (which counts as true in lua i think)
ohhhh thats just a true by itself i see
you'll probably just need to have a flag in your card's ability table that you only set to true if you detect both high and low in context.before, and then reset it to false in context.after
can someone help me download multiplayer i get this when i try
would there be any way to make it so that a stake makes a hand give 0 chips, 0 mult, and unable to be levveled up?
Yes, hook Game:start_run and level_up_hand
ok tyty
I don't know if this would count for modding dev
but
can someone tell me what caused this error (if possible)
I js switched files and it crashed
đ
I could think of one, but it's a bit troublesome
basically hook Card:set_sprites to create a new sprite that renders the second half, then SMODS.DrawStep
Yes, but how do I cut the sprite in half?
that's exactly the problem đ
Could do a shader that only renders half a sprite, or see how balatro atlas mapping works - but AFAIK there's no currently established method to halving sprites
It might even involve Love2d image data manipulation but let's start with the optimistic options first
It seems that this didn't work fully and the drawn sprite is offset more or less depending where it is on the screen.
how would i check if a discarded hand contains something? specifically the context is i need to make sure it only contains a certain suit
context.pre_discard and you would check context.full_hand
context full hand is what i was looking for ty!!
Good morning guys, I'm making a deck in which you have to manage two joker rosters constantly (you unwillingly swap between the two at the end of round)
Currently everything seems to be working fine but my main problem is the fact that I am straight up destroying cards then replacing them so scaling jokers and jokers that tick down AND stickers and editions aren't preserved. Is there a cleaner way to go about this?
i wonder if you could debuff them instead?
You would need to use some hidden cardareas to switch them between
i guess no that works weird with swashbuckler
that would look pretty weird and there's a plethora of other holes
I'll try, thank you
although i'm not 100% sure how to implement them
You could either save their values or use a hidden card area.
I was thinking about saving values but thought it would be too obscure, is that a way to do that properly?
Perhaps you would do card:save() and save that somewhere in G.GAME before you destroy it then do card:load(G.GAME.whereyoustoredthevalues) after you create it again?
testing it right now, seems to be working perfectly
yeah it's working
that's great, thank you so much holy hell
i couldn't have figured this out on my own
anyone know if there's a function thats called after all centers are loaded?
nvm, hooking game:main_menu works fine in my usecase
does anyone know why this would be crashing? trying to check in a discard if all cards are a specific suit
Is there any way I could make all cards score like Splash but only for a specific hand type?
Yes.
Is this for a joker?
It is!
At this point if I ever release my mod I'm going to have to credit you as the lead developer lmfao
I've been trying all sorts of variations:
calculate = function(self, card, context)
if context.modify_scoring_hand and not context.blueprint then
if context.scoring_name == "Pair" and context.scoring_hand then
return {
add_to_hand = true
}
end
end
end
But nothing has worked so far. As always I'm probably just putting something in the wrong place
context.scoring_name doesn't exist for context.modify_scoring_hand
Have you tried doing: ```lua
calculate = function(self, card, context)
if context.modify_scoring_hand and not context.blueprint then
local text = G.FUNCS.get_poker_hand_info(G.play.cards)
if text == "Pair" then
return {
add_to_hand = true
}
end
end
end
you're a savior as always!! im sorry for asking for stuff so often D: i tried to look for documentation on context.modify_scoring_hand but there wasn't much that i could find outside of a few commits to smods and one mention of it on vanillaremade
how would i check to see if a discard contains a certain poker hand?
run it through G.FUNCS.get_poker_hand_info
i am doing that yeah
im reworking my joker in a way that would more properly check for like modded hands and stuff and also excludes flushes from the list of things that level it up
wait hold on ive done this before
whats context.hook
i think its for the boss?
so the hook cant trigger the joker (doesnt matter in this case but)
It is true when The Hook is discarding cards.
yeah got it
got it working btw! it turns out i was misusing the context of get poker hand info
oof
realized i had looked at similar stuff for a joker that checks if a two pair is held in hand
what is wrong with this code
it says something about the atlas
SMODS.Atlas{
key = "irony",
path = "JokerIrony",
px = 71,
py = 95,
}
SMODS.Joker{
key = 'irony',
loc_txt = {
name = "Irony",
text = {
"Retriggers all steel cards",
}
},
atlas = "irony",
pos = {x = 0, y = 0},
}
The path would be JokerIrony.png
is wsomething wrong with my code
it doesnt trigger
SMODS.Joker{
key = "irony",
blueprint_compact = true,
rarity = 2,
cost = 8,
pos = { x = 0, y = 0},
config = {extra = {repetitions = 1} },
calculate = function( self, card, context)
if context.individual and context.cardarea == SMODS.has_enhancement(context.other_card, "m_steel") then
return{ repetitions = 1 }
end
end
}
Yes, context.cardarea is the card area the card being checked is currently in.
Cardarea stores the cardarea, not any information about enhancements
so context card?
No, it would be if context.repetition and context.cardarea == G.play and SMODS.has_enhancement(context.other_card, "m_steel")
This is what it looks like:
what if i want it to retrigger both in hand and played
if context.repetition and (context.cardarea == G.play or context.cardarea == G.hand) and SMODS.has_enhancement(context.other_card, "m_steel")
can't you use a custom shader to only draw certain parts of the image?
Perhaps, but I don't know how to do that.
I think you could have a shader that you pass the total number of parts (x) and the position of the current part (y), and then just set the alpha of pixels outside of that range (it'd look something like if uv.x < (y-1)/x && uv.x > y/x { tex.a = 0; })
Hey sorry if yall are in the middle of something, I was wondering if anyone knew off the top of their head if it was possible to have a joker loaded that isn't shown on the collection screen. Specifially I'm trying to hide the stick jokers from the paperback mod
no_collection = true
oh ok cool, sorry I'm pretty new to this. I'll see if i can get that working
alright well I'll further prove that I'm new, I didn't know where to put that other than with like blueprint compatability but that caused the game to crash. If you've got the time to help I'd appreciate it :)
wait
nvm im dumb as a brick, ty I got it working
ty for help :)
is there someone more advanced who knows if you can get a current mult at any time?
cause i dont want to use the base_mult
mult
wait its this simple
Yes.
thanks then
okay it works i have to actually learn something instead of listening to ai
its still in stone age in terms of coding
I would recommend that you still ask him things, but not writte code for you
maybe
i mean its pretty bad
what you making?
oh idk how to make news rarities xd
how would i check a joker's eternal compatibility?
me too
https://github.com/nh6574/VanillaRemade/blob/main/src/rarities.lua
VanillaRemade has rarities recreated
and im stuck with "tried injecting into empty pool"
oh thats good to know
ill check
ok ty
Example from VanillaRemade
That means the rarity key is invalid in the joker
Did you put your modprefix before the rarity?
bruh i thought they will me more difficult
i thought the same
yes
and its still exact same thing
modprefix_key right?
yep
could you send the code
what are you trying to do?
well i want to apply eternal to a random joker but i dont want it to do nothing if it happens to target something incompatible
SMODS.Stickers.eternal:should_apply(card, card.config.center, card.area, true)
how to decrease a hand's level? like level_up_hand() but level_down_hand()
use level up hand with a negative number
ok guys sorry for wasting your time turns out i used the wrong mod id for the prefix and didnt notice
thanks for the support
which argument in level_up_hand() is responsible for amount of upgrades?
oooh thanks
Why might my game be lagging when a joker or consumable is highlighted also only when my mod is enabled?
How does a boss blind access a final/winning hand of a round?
Might have some huge loop somewhere
hello modding dev! Iâll be resuming development today,
Any important releases happen this last month Iâll need to grab?
grab the new joyousspring
noted
noted
-# omg somecom hiiiii
guys the default pitch is 0.7 right?
how do check a jokers sprite code?
i mean for playing custom sounds
what exactly do you mean?
the code that shows the jokers sprite
For music yes.
and for other sounds?
It's 1
thanks
What is the goal?
does this trigger for you?
SMODS.Joker{
key = "irony",
blueprint_compact = true,
rarity = 2,
cost = 8,
pos = { x = 0, y = 0},
config = {extra = {repetitions = 1} },
calculate = function( self, card, context)
if context.individual and (context.cardarea == G.play or context.cardarea == G.hand) and SMODS.has_enhancement(context.other_card, "m_steel") then
return{ repetitions = 1 }
end
end
}
No, because it would be context.repetition not context.individual
still doesnt trigger
Code?
SMODS.Joker{
key = "sarcasm",
blueprint_compact = true,
rarity = 2,
cost = 8,
pos = { x = 0, y = 0},
config = {extra = {repetitions = 1} },
calculate = function( self, card, context)
if context.repetition and (context.cardarea == G.play or context.cardarea == G.hand) and SMODS.has_enhancement(context.other_card, "m_gold") then
return{ repetitions = 1 }
end
end
}
you think itll fix the stuff with it
btw?
like looking into it?
anybody familiar with smods.gradient?
i cant figure out why its crashing when trying to render
SMODS.Gradient { key = 'godlikegrad', colours = {G.C.RED , G.C.PURPLE}, cycle = 5 }
whats the crash
engine/ui.lua:693: attempt to compare number with nil
you can copypaste the crash here
where do you use it
in a custom rarity badge
oh also update balatro
kinda cant
its complicated
ok ill pass on the custom gradient
things wont work properly on older versions
I'm not sure but I disabled the All In One Joker stuff.
ill check when i update
Quantum jokers will be in the next release though.
A quantum joker would be a joker that has the effects of other jokers.
wouldn't that be a joker with blueprint effect and it's own effect or something similar
No, it would be the joker, for example if one of the quantum jokers was a scaling joker, the original joker would still upgrade.
its the truth
ahhh
so i have two custom sounds that can get triggered in the same moment, how do i make only one of them be played?
so that they dont overlap
reng
Jokerrengk
jokerXIrengk
Something Shou Tucker Com
<@&1133519078540185692>
is there any way to change the scale of the soul on a card?
If I want to change a global's value at the start of each round, is there like an easy way to do that? Is there a function I can hook that triggers when a new round starts?