#💻・modding-dev
1 messages · Page 526 of 1
I'm specifically looking for a joker, those planets do it differently.
dang
also would i have to do something special to make the level not be able to drop below zero
he's afraid
im developing an allergy for bad code after reading YOUR code nxkoo 🫵
DUDE IM NEW
try my code 😎
yeah thats why i forgive u but my eyes wont :3
I thought you said "DUDE IM MEN"
hi winter
wave wave
Hi! I was wondering how can one target a played card to put an Enhancement or a seal via a joker ability?
At first I thought I would check the code for DNA and midas mask but being new to coding I don't understand much of what is going on lol
Oh, another last question, theres a way to force a message on a different joker?
yes
like those "again!"
-
SMODS.calculate_effect({message = ...}, other_card)
-
add message_card = other_card in return alongside with message
pmub
pseudorandom_element shenanigans with G.P_CENTERS.Enhancement(maybe with a s?) and G.P_SEALS
that should give you a random enhancement and seal which you will use with Card:set_ability("enhancement key"), Card:set_seal("seal key")
yez
awsum
Tank yo
🫴 🌹
I see, I<ll try that then, thank you!
...so what do I return with SMODS.current_mod.set_debuff as is called by this bit?
for _, mod in ipairs(SMODS.mod_list) do
if mod.set_debuff and type(mod.set_debuff) == 'function' then
local res = mod.set_debuff(self)
if res == 'prevent_debuff' then
if self.debuff then
self.debuff = false
if self.area == G.jokers then self:add_to_deck(true) end
self.debuffed_by_blind = false
end
return
end
should_debuff = should_debuff or res
end
end
Do I just return 'prevent_debuff'?
-# Huh, so it is that simple.
I thought I understood this enough to do it myself, but I do not. This just does nothing
how do i get a random poker hand
is it just crashing on boot
bump
This works but currently only on the joker and not the played card ;-;. Currently trying to force a Red seal just to work the randomness later. I thought that setting the context to G.play would fix that lmao but it doesn't- x)
my joker isnt working
basically it should make all jokers in the shop free if held
but it doesnt work
pls tell me what i did wrong
You need to replace modprefix with your mod prefix.
fffuck
im not getting the nil crash, in stead im getting a sound does not exist crash lmao
which makes no sense since i have the sound
i was doing this
G.nxkoo_dies = {
show_foxy = false,
foxy_timer = 0,
foxy_frames = {},
foxy_frame_index = 1,
foxy_frame_timer = 0,
foxy_frame_delay = 0.1,
path = SMODS.current_mod.path,
}
G.nxkoo_dies.foxy_sound = love.audio.newSource(
G.nxkoo_dies.path .. "assets/customimages/foxy_sound.ogg","static"
)
pardon the auto format moment
yes thats exactly why i asked about the sound outside of SMODS
😭
and it still crashes?
which does not have the nil crash, but instead a sound does not exist crash
yeah it just doesnt make any sense honestly
thats why i rely on play_sound() but this is not gonna work
Balatro moment
or i could just do this
and define the SMODS.Sound
is this the right way to make a joker never show up in the shop, booster packs, or be given by consumables? If I never set the flag it'll never show up, right?
that will probably work, but if you never intend to make it show up you should do in_pool = function() return false end
increase the odds to 1/1
I need this
im still trying to get the other way to work because its PISSING ME OFF!!!!!!!!!!!
trust me, ive been there before
its not worth it
ive made so much other bs work and this is one of the simpler love things im just baffled
What is dilly trying to do
it ws more what nxkoo was trying to do that i tried to fix but it dont make sense
they were trying to use love.audio for a sound instead of smods.sound initially, and they were crashing due to it being nil, i didnt get the nil error and instead got a sound not existing error even though i know the sound exists because i also have it defined as a smods.sound
i took my sleep meds forever ago im giving up for the night and going da hell to SLEEP
goodnight modding dev
i TOLD you
gnnnnnnnnnnnnnnnnnnnnn
Does anyone know off the top of their heads how to check for selecting blinds or the cash-out screen with G.XXX
cuz I have G.GAME.blind and G.shop but I dont know the other ones
(for the purpose of a joker that replaces all of the game music when its in hand)
Bump
are there sound effects for dividing/losing mult that're free to use?
is there a way to get a random poker hand
Yes.
please
pseudorandom_element(G.GAME.hands, 'seed')
yay
ty
could i do this (function from cryptid)
local cardd = copier or card
level_up_hand(cardd, hand_type, nil, -1)```
original definition: (can send entire code but its long)
`level_up_hand(card, hand, instant, amount)`
i presume thats how that works because how its used in neutron star is
`level_up_hand(used_consumable, neutronhand, nil, G.GAME.neutronstarsusedinthisrun)`
(its basically the same as done in neutron star except -1)
Yes, because that's what The Arm does.
alr ty
is set the same as kind
key = 'notavirus',
-- this one
kind = 'Code',
loc_txt = {
name = 'notavirus.zip',
text = {
"Summons one Virus card.",
"Also takes 5 gold or 1 random poker hand level.",
"{C:inactive}'Download for unlimited V-Bucks!'"
}
},
atlas = 'placeholder',
pos = {x = 0, y = 0},
use = function(self, card, area, copier)
if pseudorandom(pseudoseed('specles'), 1, 2) == 1 and G.GAME.dollars >= 5 then
ease_dollars(-5)
else
local hand_type = pseudorandom_element(G.GAME.hands, 'specles')
local cardd = copier or card
level_up_hand(cardd, hand_type, nil, -1)
end
G.E_MANAGER:add_event(Event({
trigger = 'after',
delay = 0.4,
func = function()
play_sound('timpani')
SMODS.add_card({ set = 'virus_shop'})
card:juice_up(0.3,0.5)
return true
end,
delay(0.6)
}))
end,
can_use = function(self, card)
return G.jokers and #G.jokers.cards < G.jokers.config.card_limit
end
}```
pretty sure this is an issue with the line above
it was not
wait i did it wrong its Tarot not tarot (trying to debug)
ok yes
so i have no clue how that fails
kind = 'Code' is how its done in cryptid
well actually im stupid because its set = "Code" but i tried that and it failed too :/
ok now it works to load
but i did tarot to debug
then when i used it it selected poker hand
and it crashed
(this is in the definition for level poker hand, and this time i put 1 to see if that crashed it and it did)
local hand_type = pseudorandom_element(G.GAME.hands, 'specles').key
local hand_type = pseudorandom_element(G.handlist, 'specles')?
it workerd
i was just testing to make sure the money way worked
and it seemed like it wasnt working while i was at exactly 5 dollars
it worked
but specles seed is just really lucky i guess
Always was curious about SMODS.Enhancement calculate bit - is card equal to an instance of the enhancement on a given card or something?
card is the card the enhancement is on.
i cant figure out why it isnt finding the sprite.
SMODS.Atlas{
key = "magnet",
path = "Balatro_Joker_Magnet.png",
px = 71,
py = 95,
}
SMODS.Joker{
key = "magnet",
loc_txt = {
name = "Magnet",
text = {
"When gold card scored",
"{X:mult,C:red}X#1#{} Mult"
}
},
atlas = "magnet",
pos = {x = 0, y = 0},
config = {extra = {
Xmult = 2
}
},
loc_vars = function(self,info_queue,center)
return{vars = {center.ability.extra.xmult}}
end
}
Does Balatro_Joker_Magnet.png exist in assets/1x and assets/2x?
yes
thanks it works now
the 2x file was not the same name
lets see the code
the sprite is in the position that its supposed to be in in the atlas
and the atlas is set to the correct one
show the code and the atlas
youve got y and x the wrong way round OR you didnt know they start from 0
yeah ive done it a few times
how to check how many cards in the full deck? i know starting deck size is G.GAME.starting_deck_size so i figured it would just be G.GAME.deck_size but i guess that is not the case
#G.playing_cards
thanks!
How do I modify this function to change all Kings and Jacks to Queens?
oh i aftually made something similar to this
how does one get the current amount of money
ignore the random part, but this turns kings into queens
G.GAME.dollars
for k, v in pairs(G.playing_cards) do
if v:get_id() == 11 or v:get_id() == 13 then
SMODS.change_base(v, nil, "Queen")
end
end
got a script that changes suit names?
my god this is broken 😭
What do you mean?
have you set up your local variables correctly?
its broken as in balancing
oh
something to inject rather than going through and changing every "Diamonds" to "Ultra balls" lol
You would put Diamonds = "New string here" in Localization > misc > suits_plural and Localization > misc > suits_singular in your localization file.
thatll do jokers, tarot cards, and well, everywhere?
Yes.
i must be missing something because there is no misc in localization
You are, because there is.
through balatro or steammodded?
you need to make the localization file
Both.
they both already have one?
its keeps all the languages there
yeah and you make the localization file for your mod
this is what i needed, thank you
what the hell is this pfp
why this joker doing nothing????
Misspelled calculate
fucks sake
is this going to mess with other mods that use the default names as keys?
no, keys are unaffected
how do I make it count each unique clubs card in your full deck rather than every club that exists on screen?
the issue is that you're adding chips permanently in every context
first, you want that loop to be inside joker_main and second you want it to be a local variable
i get this. have you seen this somewhere?
yeah
you would need to do the loop in loc_vars too or the description won't update
Yes.
every time I hover over it I get this crash, what am I doing wrong?
@manic rune bepis
hi
check this code
local original_Game_update = Game.update
function Game:update(dt)
original_Game_update(self, dt)
if G.GAME and G.GAME.blind and G.GAME.blind.boss and G.GAME.blind.defeated then
tangentry.reset_jokers_on_boss_defeat()
end
end
function tangentry.reset_jokers_on_boss_defeat()
if not G.jokers or not G.jokers.cards then return end
for _, joker in ipairs(G.jokers.cards) do
if not joker.ability or joker.edition and joker.edition.negative then
goto continue
end
local joker_key = joker.config.center.key
local joker_center = G.P_CENTERS[joker_key]
if joker_center and joker_center.config then
joker.ability = {}
for k, v in pairs(joker_center.config.extra or {}) do
joker.ability[k] = v
end
if joker.ability.mult then
joker.ability.mult = joker.ability.mult * 0.25
end
if joker.ability.xmult then
joker.ability.xmult = joker.ability.xmult * 0.25
end
if joker.ability.chips then
joker.ability.chips = joker.ability.chips * 0.25
end
joker:juice_up(0.5, 0.5)
end
::continue::
end
G.E_MANAGER:add_event(Event({
func = function()
SMODS.calculate_effect({
message = "One must imagine.",
colour = G.C.RED
})
return true
end
}))
end
local original_joker_calculate = SMODS.Joker.calculate
function SMODS.Joker:calculate(card, context)
if G.GAME and G.GAME.deck and G.GAME.deck.key == "b_tngt_sisyphus" then
if card.ability.mult then
card.ability.mult = card.ability.mult * 0.25
end
if card.ability.xmult then
card.ability.xmult = card.ability.xmult * 0.25
end
end
return original_joker_calculate(self, card, context)
end
tried it
doesnt work
Yes, SMODS.Joker.calculate doesn't exist.
G.GAME.deck also doesn't exist.
shit
i figured
G.GAME.blind.defeated also doesn't exist.
Also if it did you would be resetting it every frame on the cash out screen.
right i forgot about that
i had it happen once on different occasion
i think you can just do all of this in your deck's calculate function
you shouldn't need hooks
Also you should be iterating over joker_center.config not joker_center.config.extra
maybe for the scaling
bepis told me that i need to hook it
got it
how would i fix this
G.GAME.selected_back.effect.center.key
im pretty sure you need to hook to Game:update for the scaling stuff
so that it detects value changes
the reset ability one shouldnt need a hook though
probably but i dont see that there haha
oh idk, i havent checked his code yet lol
the text is red but the text isnt there
SMODS.Atlas{
key = "magnet",
path = "Balatro_Joker_Magnet.png",
px = 71,
py = 95,
}
SMODS.Joker{
key = "magnet",
loc_txt = {
name = "Magnet",
text = {
"When steel card scored",
"{X:mult,C:red}X#1#{} Mult"
}
},
atlas = "magnet",
pos = {x = 0, y = 0},
config = {extra = {
Xmult = 2
}
},
loc_vars = function(self,info_queue,center)
return{vars = {center.ability.extra.xmult}}
end
}
Yes, it would be Xmult not xmult
Yummy 4 hour sleep
ok
Hi
Hello
Code?
SMODS.Joker{
key= "magnet",
blueprint_compat = true,
rarity = 3,
cost = 8,
pos = { x = 0, y = 0},
config = { extra = { xmult = 2 } },
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.xmult } }
end,
calculate = function( self, card, context)
if context.individual and context.cardarea == G.play and
SMODS.has_enhancement(context.other_card, "m_steel") then
return{
xmult = card.ability.extra.xmult
}
end
end
}
and it doesnt trigger
Why are so many people interested in scaling other jokers, I don’t get it
shrug
i just want to pack as many unique effects i can think of into Stacked
its not in pool normally though
is there a way to check if you're viewing the deck?
probably because its more than just a base joker at that point
why do you like more skills in a skill tree?
if i can make my dagger also inflict bleed hey thats a neat upgrade
How do I stop blueprint from using my Jokers messages without making it incompatible?
message = not context.blueprint and "your message" or nil
it's just a super jank mechanic, there's no way consistent way to scale things effectively
half the things we got are jank, it is just the way of the west
if it works out for people then sick imo
nah we don't have that much jank
nvm, did a bit more searching and found that checking for G.OVERLAY_MENU does the trick
i dont have any jank because i dont interact with other jokers at all :3
what fun is modding without at least a little jank
you are only jank
why the bottom text says error?
remove the group_key
what does that do?
not the reset part
it lets you set a localization key for that text
my joker is not triggering at all and its supposed to be uncommon yet it displays as common
SMODS.Joker{
key= "magnet",
blueprint_compat = true,
rarity = 2,
cost = 8,
pos = { x = 0, y = 0},
config = { extra = { xmult = 2 } },
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.xmult } }
end,
calculate = function( self, card, context)
if context.individual and context.cardarea == G.play and
SMODS.has_enhancement(context.other_card, "m_steel") then
return{
xmult = card.ability.extra.xmult
}
end
end
}
Did you save the file?
yes
does anyone have a good example of a simple lovely patch? i dont mean the syntax itself, I'm looking for something a beginner might want to patch
like when everyone had the same patch to add enhancements to the pokerhand screen
are you saying we dont need that anymore cause i still have that
im going to explode
my oh my
thats why i dont have any examples.. they're all in smods now haha
let me check my patches and see
There's this one which adds a context for when a card is retriggered (credits to somethingcom)
[patches.pattern]
target = '''=[SMODS _ "src/utils.lua"]'''
pattern = '''effect.message = effect.message or (not effect.remove_default_message and localize('k_again_ex'))'''
position = "after"
payload = '''
effect.extra = {func = function() SMODS.calculate_context({card_retriggered = true}) end}
'''
match_indent = true```
thank you that's perfect
hell yea
😄
well, actually. it being an smods patch makes it a little bit confusing
im still going to use it
where is this in docs so i can scuttle to it in case ive missed other things there
well im manually going through every phrase and changing cards to balls and whatever else i neef
wish me luck
paired with your username, i have moderate concern
why dont you just do ctrl + f and then replace all instances of "cards" to "balls"
this is why i said something, i just didnt know the question, tysm
thatll cover most but i do have to change how the cards are written out for some
saves a lot of time though lol
How do I make my Joker play a sound? With play_sound? How do I use it?
is this clear enough
What?
it wasnt a reply to you sorry
id say this looks good
j_flower_pot={
name="Flower Pot",
text={
"{X:mult,C:white} X#1# {} Mult if poker",
"hand contains a",
"{C:diamonds}Fast Ball{} ," {C:clubs}Great Ball{} ,",
"{C:hearts}Poke Ball{} , and {C:spades}Ultra Ball{} ",
},
unlock={
"Reach Ante",
"level {E:1,C:attention}#1#",
will this read correctly on the card?
full thing
pretty good
bump
play_sound is used to play a sound at any given time
alternatively, you can add a field sound = modprefix_yoursound to the return table of a joker when it does something
Where can I find information on github regarding suit and card numbers in code?
Where do I set the prefix?
when declaring SMODS.Sound, your mod prefix is automatically prepended to the sound object
Should I do SMODS.Sound in a different file or in the same one?
i dont recall can i set a boss blind through debugplus commands isntead of rerolling
you can press 3 in the blinds menu
while hovering the blind you want
🙃
For this joker I'm trying to make it so it's timer pauses during scoring, here's what i'm currently doing ( in the update function) for that bit, I've got it to pause when it's paused but i'm not sure how I would go around doing it for scoring, help would be appreciated!
if card.ability.active then if not G.SETTINGS.paused then card.ability.time_spent = card.ability.time_spent + G.real_dt card.ability.chips = 0 + (math.floor(card.ability.time_spent) * card.ability.chips_gain) end end
can i make a consumable do something different when used in a specific blind?
Yes
does math.random get affected by OA6?
key = "charge_up",
path = {
['default'] = "s_charge_up.ogg"
}
})```
in calculate:
```if card.ability.extra.hand_count_before == 3 then
return { message = not context.blueprint and "Charging...", sound = "s_charge_up" }
end```
no
Shouldn't it be modprefix_key?
` SMODS.Joker {
key = 'Copper Wire',
loc_txt = {
name = 'Copper Wire',
text = {
"Diamond Suits Have 1/4 chance",
"to give 3$ when discarded"
}
},
config = { extra = { dollars = 3, odds = 4 } },
rarity = 1,
atlas = 'MakMod',
pos = { x = 2, y = 0 },
cost = 4,
calculate = function(self, card, context)
if context.discard then
if context.other_card:is_suit("Diamonds") then
if SMODS.pseudorandom_probability (card, card.ability.extra.odds, 'j_modprefix_MakMod') then
SMODS.calculate_effect({dollars = card.ability.extra.dollars}, card)
end
end
end
end
}`
I am running into an issue with SMODS.pseudorandom_probability
what am I missing?
The documentation says key
how do i destroy a specific joker (not the one that's triggering it)
Here
I meant in return
Instead of what?
sound = "s_charge_up"
i have one sound in my mod and use it like this
play_sound("EF_LetsGoGamblingSound", 1, 1)
SMODS.Sound{
key="LetsGoGamblingSound",
path="gamblecore.ogg"
}
Yeah, i just realized that too, my bad. Thank you though
I would maybe clarify that sometimes there can be more than one return value
Wait, what is that EF for?
my mod prefix
Oh, okay
My sound doesn't get played...
got it fixed, the correct string was if SMODS.pseudorandom_probability (card, 'group_0_f676abfc', 1 ,card.ability.extra.odds ,'j_modprefix_MakMod')
No idea what group_0_f67abfc does at all, but it fixes it based on comments from before
not the jokerforge fix
key = "charge_up",
path = "s_charge_up.ogg"
})
if card.ability.extra.hand_count_before == 3 then
return { message = not context.blueprint and "Charging...", play_sound = "sj_s_charge_up", 0.7, 0.6 }
end```
the function signature is
SMODS.pseudorandom_probability(card, 'seed', numerator, denominator, 'identifier')
your key is charge_up not s_charge_up
i have no clue what in the world group_0_f67abfc is, that shit wizardry
it's the seed, it can be anything but they were missing it
its the random group id jokerforge uses to differentiate random groups
oic
thats where the string came from
seed makes sense i did not read the whole thing i thought it was some fuck off address
I changed it to play_sound = "sj_charge_up", 0.7, 0.6 but it still doesn't play
god damnit
bump????? 
Sorry
dw kinda my mistake
Okay, so just to make sure: Where do I put what now?
return { message = not context.blueprint and "Charging...", sound = "sj_charge_up"}
should work
unless im stupid
It doesn't work for me
j_flower_pot={
name="Berry Pot",
text={
"{X:mult,C:white} X#1# {} Mult if poker",
"hand contains a",
"{C:diamonds}Fast Ball{} ," {C:clubs}Great Ball{} ,",
"{C:hearts}Poke Ball{} , and {C:spades}Ultra Ball{} ",
},
unlock={
"Reach Ante",
"level {E:1,C:attention}#1#",
},
it says error on line 917, which would be the text={ it says its missing a }
but isnt it there after everything, or is one of my commas messing it up?
i think youve got the formatting completely wrong if im not mistaken
yeah
i could, im editing the actual game code not making a patch, i think i deleted a comma or something
i have no idea then
SMODS.Joker {
key = 'joker_key',
loc_txt = {
name = "Joker Name",
text = {
'Description',
'New Line'
}
},
}
error changed slightly tho
SMODS.Joker{ --Werewolf
name = "Werewolf",
key = "werewolf",
config = {
extra = {
}
},
loc_txt = {
['name'] = 'Werewolf',
['text'] = {
[1] = 'Played cards that are',
[2] = '{C:attention}enhanced{} become {C:attention}Wild Cards'
}
},
pos = {
x = 1,
y = 2
},
cost = 5,
rarity = 2,
blueprint_compat = false,
eternal_compat = true,
unlocked = true,
discovered = true,
atlas = 'ECjokers',
loc_vars = function(self, info_queue, card)
info_queue[#info_queue+1] = G.P_CENTERS.m_wild
return {vars = {}}
end,
heres an example from extracredit
why???
Yeah but now I don't know anything that could be the reason for that :(
well, i wanted one thing and it just went deeper and deeper lol
its so much easier to make a patch lmao
was the sound .ogg originaly or did you rename .mp3?
I don't know, why?
how do i make every card played a specific enhancement
I think it was a .wav and I changed it to a .ogg
and make it copy to the deck
Probably the reason
i was missing a " after fast ball to close in my ","
Is it that sensitive?
and yes, its my first day
yeah i thought you were making a patch thats why i said that. i would still recommend doing that instead since then youll be able to distribute it
wavs and oggs are different things bro
yeah, well now its mine alone i guess lol
i dont think anyone would gaf for it lol
Well, how else do I change a wav to an ogg?
use a wav to ogg converter?
:3
For comparison
You just named a USB c lightning and tried charging an old iphone with it
Can anyone find out what mod is guilty of making the game crash?
I feel so stupid TwT
But it works now, thank you again
bump number2
Didn't a joker have a Card:start_disolve() or something similar
Then you could loop through G.jokers.cards
could you explain this slightly dumber
Played and scored?
You can iterate over context.scoring_hand and use Card:set_ability()
What I mean is G.jokers.cards are all the jokers you own
So
for _, joker in ipairs(G.jokers.cards) do
joker:start_disolve()
end
``` would delete every joker
Assuming my memory is correct
The ipairs part should be correct
Dissolve not disolve 🫠
Ankh implemention using it
SMODS.destroy_cards(G.jokers.cards)
i used this to destroy all jokers so could i use something in here
This should also work
yeah but i just want to remove 1 specific joker
Do you know which one?
yes
Which one? 😂
Is it by pos or by key
key
does it matter??
If you want me to tel you how to do it, yes
well its one of my jokers and its key is jam_gaming
Okay so do SMODS.destroy_cards(SMODS.find_card('j_jam_gaming'))
damn i was so close
guys its my first time using jokerforge how do i make it so that my joker gets more mult per negative card
More people there know how to use it because they used it
ok thank you
im new to using set_ability, how do i use it?
the docs arent very helpful
the joker wont trigger and i have no clue on how to fix it
SMODS.Joker{
key= "magnet",
blueprint_compat = true,
rarity = 2,
cost = 8,
pos = { x = 0, y = 0},
config = { extra = { xmult = 2 } },
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.xmult } }
end,
calculate = function( self, card, context)
if context.individual and context.cardarea == G.play and
SMODS.has_enhancement(context.other_card, "m_steel") then
return{
xmult = card.ability.extra.xmult
}
end
end
}
Card:set_ability(G.P_CENTERS[<enhancement key>])
how do i make a custom pool that also shows a badge on all the cards it's on?
Just the key as a string is fine btw
if context.scoring_hand then
Card:set_ability(G.P_CENTERS[<m_glass>])
end
end```
is that right?
nvm
is this right?
if context.scoring_hand then
Card:set_ability(G.P_CENTERS[m_glass])
end
end```
No
D:
"m_glass" as a string
so like card:set_ability("m_glass")
also capitalization matters
if context.before then
for _, pcard in ipairs(context.scoring_hand) do
pcard:set_ability("m_glass")
end
end
Like that though I don’t think it’ll count them as glass for that calculation
I don’t remember
It might need nil, true after the key to time the animation properly
Yeah thought about it but wasn't sure so I gave a solution I knew worked
how would i go about making a joker create a specific voucher in the shop?
and does the game even let you buy more than one copy of the same voucher?
SMODS.Joker {
key = 'jam_cthoogle',
loc_txt = {
name = "The Cthoogle Joker",
text = {
'Each scored {C:attention}6{} has a',
'{C:green}#1# in #2#{} chance of',
'creating a {C:purple}Tarot{} card',
}
},
blueprint_compat = true,
rarity = 3,
cost = 7,
discovered = true,
eternal_compat = true,
perishable_compat = true,
atlas = 'Jammbo',
pos = { x = 7, y = 1 },
config = { extra = { odds = 3 } },
loc_vars = function(self, info_queue, card)
local numerator, denominator = SMODS.get_probability_vars(card, 1, card.ability.extra.odds, 'rosen')
return { vars = { numerator, denominator } }
end,
calculate = function(self, card, context)
if context.individual and context.cardarea == G.play and
#G.consumeables.cards + G.GAME.consumeable_buffer < G.consumeables.config.card_limit then
if (context.other_card:get_id() == 6) and SMODS.pseudorandom_probability(card, 'rosen', 1, card.ability.extra.odds) then
G.GAME.consumeable_buffer = G.GAME.consumeable_buffer + 1
return {
message = "???",
sound = "jammbo_plums",
func = function()
G.E_MANAGER:add_event(Event({
func = (function()
SMODS.add_card {
set = 'Tarot',
}
G.GAME.consumeable_buffer = 0
return true
end)
}))
end
}
end
end
end,
add_to_deck = function(self, card, from_debuff)
SMODS.destroy_cards(SMODS.find_card('j_jam_gaming'))
end,
}
crash when this joker is added to the deck
- see image
- yes
thank you!!
It might not do anything though, it depends on the voucher
if context.before then
for _, pcard in ipairs(context.scoring_hand) do
pcard:set_ability("m_glass")
return {
message = 'Glass!'
}
end
local copy_card = copy_card(context.full_hand[1], nil, nil, G.playing_card)
copy_card:add_to_deck()
G.deck.config.card_limit = G.deck.config.card_limit + 1
table.insert(G.playing_cards, copy_card)
G.hand:emplace(copy_card)
copy_card.states.visible = nil
G.E_MANAGER:add_event(Event({
func = function()
copy_card:start_materialize()
return true
end
}))
return {
message = 'Copied!',
colour = G.C.CHIPS,
func = function()
G.E_MANAGER:add_event(Event({
func = function()
SMODS.calculate_context({ playing_card_added = true, cards = { copy_card } })
return true
end
}))
end
}
end
end
end```
is this right? it's supposed to make all cards glass, and add a permanent copy to the deck
No, that’ll make one card glass and do nothing else
oh
okay, second (technically third) question, what context would be used for a joker that does something at the start of a shop?
i tested the first part and it made all cards glass, so does the copy part make it do 1?
The return does
which one 😭 theres 3
The first one
the message glass?
context.starting_shop
how?
Because return leaves the function
oh, very simple, thank you
interesting that thats not on the caluclate functions page of the steamodded documentation
interesting
also what should this value be?
Yeah they’re not all on there because I am lazy
config = { extra = { copy = 1 } },
-# I was actually writing calc docs earlier today!
I'm not sure but I think SMODS.calculate_effect({message = "glass"}, pcard) would work for the message instead of the return
Unless I made another spelling mistake
no its ok im gonna rework it a bit
hold on
ok
it works
now
how do i make a consumable do a different function when used in a specific blind
if G.GAME.blind.config.blind.key == "bl_key" then
thanks n'
bump!
is this how you multiply when a steel card is played?
calculate = function( self, card, context)
if context.individual and context.cardarea == G.play and
SMODS.has_enhancement(context.other_card, "m_steel") then
return{
xmult = card.ability.extra.xmult
yes
why dis not work
loc_vars = function(self, info_queue, card)
info_queue[#info_queue + 1] = G.P_CENTERS[card.ability.mod_conv]
return { vars = { card.ability.max_highlighted, localize { type = 'name_text', set = 'Enhanced', key = card.ability.mod_conv } } }
end,
use = function(self, card, area, copier)
if G.GAME.blind.config.blind.key == "silly_boss_tyler" then
G.E_MANAGER:add_event(Event({
trigger = 'after',
delay = 0.4,
func = function()
play_sound('timpani')
SMODS.add_card { key = "j_silly_tylerjok" }
card:juice_up(0.3, 0.5)
return true
end
}))
delay(0.6)
else
G.E_MANAGER:add_event(Event({
trigger = 'after',
delay = 0.4,
func = function()
play_sound('tarot1')
card:juice_up(0.3, 0.5)
return true
end
}))
for i = 1, #G.hand.highlighted do
local percent = 1.15 - (i - 0.999) / (#G.hand.highlighted - 0.998) * 0.3
G.E_MANAGER:add_event(Event({
trigger = 'after',
delay = 0.15,
func = function()
G.hand.highlighted[i]:flip()
play_sound('card1', percent)
G.hand.highlighted[i]:juice_up(0.3, 0.3)
return true
end
}))
end
delay(0.2)
for i = 1, #G.hand.highlighted do
G.E_MANAGER:add_event(Event({
trigger = 'after',
delay = 0.1,
func = function()
G.hand.highlighted[i]:set_ability(G.P_CENTERS[card.ability.mod_conv])
return true
end
}))
end
for i = 1, #G.hand.highlighted do
local percent = 0.85 + (i - 0.999) / (#G.hand.highlighted - 0.998) * 0.3
G.E_MANAGER:add_event(Event({
trigger = 'after',
delay = 0.15,
func = function()
G.hand.highlighted[i]:flip()
play_sound('tarot2', percent, 0.6)
G.hand.highlighted[i]:juice_up(0.3, 0.3)
return true
end
}))
end
G.E_MANAGER:add_event(Event({
trigger = 'after',
delay = 0.2,
func = function()
G.hand:unhighlight_all()
return true
end
}))
delay(0.5)
end
end,
can_use = function(self, card)
if G.GAME.blind.config.blind.key == "silly_boss_tyler" then
return G.jokers and #G.jokers.cards < G.jokers.config.card_limit
else
return G.hand and #G.hand.highlighted > 0 and #G.hand.highlighted <= card.ability.max_highlighted
end
end```
it supposed to turn 3 cards glass
and when on a specfic blind spawns a joker
If I may ask, what does “context.other_card” specify? Is it like all the cards except the one you played?
I see lmao alr
just started learning coding
Same lol
Trying to read the original game’s code is giving me headaches ;-;
We’ll get through this lol
Context.other_card is given as a parameter by specific contexts to pass along the specific card object. For example, context.individual will have a context.other_card, which will have the card currently being evaluated
Is it better if everything from SMODS.GameObject goes into one file or to split them into multiple files?
hey guys i just wanna ask
is there a way to make custom face card packs
without replacing pre existing ones
aight thx gng
Hey, quick question: what are the names of the card areas of the shop?
.
2slow
Lovely, thanks you very much.
Someone should really go and compile and organize this kind of stuff.
that's what I'm doing
havent pushed it yet because it's still during my work shift and my boss knows my github :3
Your boss stalks your commit history???? 😭
You have every right not to lmao
Isn’t it like 7pm for you?
no it's 2pm
wtf
bump
that would require me to leave my room
whats the best way to check that the player has a specific joker? i tried to like attempt it myself but it did not work
lmao
Go get sprayed by the Iguazu Falls or smthn
if next(SMODS.find_card("j_prefix_key")) then
thank you
in what part of argentina do you live, without doxxing yourself
greater buenos aires
bump
neither is better, it depends on how you want to organize it
What do you recommend?
It’s personal preference, whatever you’re used to
Well, I'm used to nothing...
all my threads died..
Poor wheel of mods, not classed as a thread 😭
oh right there's wheel today
Yessir
I kind of hope it's not Aij i want him to play the update i'm working on.
If Maximus gets hit I’m gonna be at work 😭
I’ll be able to tune in but not with full attention
if it hit tangents, im killing myself
If it hits my mod I'm shooting the person that added it there
if it hits joyousspring it will be hilarious
murphyobv sentenced to reading ygo cards 💀
would be hilarious
do we have a list of contexts?
What do I need to do if I use multiple files? Like if I want to split Jokers and Vouchers in there own file, how do I load them and stuff
not all of them are documented yet but https://github.com/Steamodded/smods/wiki/Calculate-Functions
oh cool ty!
SMODS.load_file(path)()
i had taken a look at that page yesterday but ig i just didnt read through it?... adhd brain didnt let me, i suppose
how do i get the jokers in the collection
That's all? where do I put that?
In your main file
just use G.P_CENTER_POOLS.Joker
Is that all that should be in my main file? (Sorry for the many questions)
it's all you need to add for the purpose of loading other files
you don't need to, like, remove everything else or anything
can someone tell me what's wrong here and why the balatro says that in line 18 is not close when it's closed?
jesus
it's something wrong?
Several syntax errors
ok, i'm really new at this of lua things, literally is my first mod
Your loc_vars and calculate functions are outside the joker, that's the main thing
now?
can someone point to a resource of how to use set_sprites inside (for example) SMODS.Enhancement? I want to have an enhancement that overlays the texture over the base card (sort of like the soul) but i cant find how to use the function
You forgot your comma's
After loc_txt and loc_vars
You're missing commas in multiple places, line 22, 25, 33 and you have an extra closing bracket on 32
And on 39 your comma is inside a comment, needs to be before the dashes
is really stressful for me
ok
i will make the changes
i think there're some errors
like, if i erase the bracket of line 32 the function end doesn't work
and i need it
steals
how do I debuff everything except for 2's
definitely not using this for devious boss blinds
Oh, my mistake, that one stays
What size are Sticker in Balatro?
is create_card() random? i cant seem to wrap my head around how riff raff works, code-wise
also how do I destroy all jokers at once in boss blind code
dont use create_card
use add_card
no im just asking a question
im not trying to do anything rn im just trying to learn how it works
o you have a solution for this?
SMODS.add_card()
bump
yes, if you give it a set it creates a random card from that set
i have the error in balatro of the line 18 with config, i don't know what i need to change
https://github.com/Steamodded/Wiki curious question about the wiki. how were you able to make it sync with the github wiki, is there some way to make it just a folder within the main repo, or does it have to be a seperate repo
bump 2
why is an error in the line 18 with config? i don't understand
there shouldn't be
yeah that's why i don't know why there's an error
wait no you have an extra tab for the closing } in loc_txt
Shouldn't matter
so what should i do?
check for missing commas too
a "set" in this case being the argument type? (promise this is the last question i have for a while i dont wanna drown out everyone else's messages)
beacause the error is in the line 18
but i don't know when i need to put a comma
this is my first time
no it's expecting a closing } for something that started at line 18
bump
If you mean the vanilla create_card, yes. But as other people said, you should use SMODS.create_card/SMODS.add_card where the value is called set
Or is there even a set size
but it's closed i don't understand
let me check again
in the line 18, but what's the problem?
it expects to close earlier cuz ur missing a comma
Any reason some of my jokers appear like the img and with the same text value others work perfectly?
ok, but i don't when i need to put comma's
missing a comma on pos = {}
ok
just that?
ok
now at least that's fix
but
there's another
let's see
the comma is inside the comment on the message =
yeah that's what i was thinking
wheres the comma after loc_vars
aaaaaaah that
no not on calculate
how do I find hand size
ok another thing fixed, but another thing
i believe
G.hand.config.card_limit
comma unneeded on calculate
yeah i fixed that right now
ok
i'll try in the game
please i want this to work
-# another...
i'm at point to cry
let's see the code
after the 'X' in message you need a comma
j_ina_Kevin = {
name = "Kevin",
text = {{"a"},{"b"}}
},```
why does this generates an extra text block on some jokers?
https://github.com/mellowthumber/Galore i believe i did it right
like this? or...
so text = {"a", "b"} makes it so that "a" will appear on one line and "b" on the next
text = {{"a"},{"b"}} will make it so that "a" and "b" appear in different boxes
Yeah I know
but a 3rd box is generated
for some reason
and only in some jokers
a 3rd?
yep
finallyy
huh that should only make 2
it's working
how do I make boss blinds debuff everything except a certain rank
i dunno but thanks for helping me
hmm can i see the joker code
maybe something funky is happening there?
sure, one sec
local Kevin = J({
name = "Kevin",
pos = { x = 0, y = 0 },
config = { extra = { retriggers = 1, triggered = false } },
rarity = 2,
pools = { ["Raimon"] = true },
cost = 8,
atlas = "Jokers01",
itype = "Forest",
iposition = "FW",
iteam = "Raimon",
blueprint_compat = true,
calculate = function(self, card, context)
if context.retrigger_joker_check and not context.retrigger_joker and context.other_card ~= self then
card.ability.extra.triggered = true;
local index
for k, v in ipairs(G.jokers.cards) do
if v == card then
index = k
break
end
end
if context.other_card == G.jokers.cards[index + 1] and is_position(context.other_card, "FW") then
return {
message = localize("k_again_ex"),
repetitions = card.ability.extra.retriggers,
card = card,
}
else
return nil, true
end
end
end,
})```
bump
are projects a good way to keep track of your work?
strange, nothing seems to be wrong here
You haven't directly messed with the UI for jokers, correct?
what is this error?
do you know which part of your mod triggered that error? If so, i can figure out what that means in the context of ur code
maybe the text
let me show you
practically all is right, but the text is not working or saying so it's causing errors
Does anyone know what size stickers need to be or are? Or what I need for SMODS.Sticker?
Pokerleven.generate_info_ui = function(self, info_queue, card, desc_nodes, specific_vars, full_UI_table)
SMODS.Center.generate_ui(self, info_queue, card, desc_nodes, specific_vars, full_UI_table)
if desc_nodes == full_UI_table.main then
-- Add type information under names
full_UI_table.name = {
{
n = G.UIT.C,
config = { align = "cm", padding = 0.05 },
nodes = {
{
n = G.UIT.R,
config = { align = "cm" },
nodes = full_UI_table.name
},
{
n = G.UIT.R,
config = { align = "cm" },
nodes = Pokerleven.get_type_ui(card)
},
}
}
}
end
end
this is all I have done. The get_type_ui shouldn't mess anything up
btw in loc_txt replace ( with { and ) with }
aaaaaa ok
nope
it's not working
like this not?
ideally the files should still be 71 x 95 for 1x
as for the visible dimensions of the sticker sprites, I dont remember
could you just send the code here?
do something like:
```lua
*your code*
```
unrelated but please just use xmult instead of xmult_mod so it does the message automatically
i cant figure out why it isnt triggering code:
SMODS.Joker{
key= "magnet",
blueprint_compat = true,
rarity = 2,
cost = 8,
pos = { x = 0, y = 0},
config = { extra = { xmult = 2 } },
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.xmult } }
end,
calculate = function( self, card, context)
if context.individual and context.cardarea == G.play and
SMODS.has_enhancement(context.other_card, "m_steel") then
return{
xmult = card.ability.extra.xmult
}
end
end
}
Would Balatro boot up on 4 GB of DDR3 RAM? Because my main PC is having problems rn
Couldn't I just make the sticker the size I want when it's still 71 x 95? As long as I don't cover the whole card, that is
SMODS.Atlas{
key = 'Jokers',
path = 'Jokers.png',
px = 71,
py = 95,
}
SMODS.Joker{
key = 'Mezmerize_joker',
loc_txt = {
name = 'Mezmerize',
text = 'Este {C:attention} comodin',
'da un multi de {X:mult,C:White} X#2#',
},
atlas = 'Jokers',
pos = {x = 0, y = 0},
config = { extra = {
Xumlt = 2
}
},
loc_vars = function(self,info_queue,center)
return {vars = {center.ability,extra.Xmult}
}
end,
calculate = function(self,card,context)
if context.joker_main then
return {
card = card,
Xmult = card.ability.extra.Xmult,
message = 'X', -- card.ability.extra.Xmult
colour = G.C.MULT
}
end
end
}
it's not working
oh
yo
SMODS.Atlas{
key = 'Jokers',
path = 'Jokers.png',
px = 71,
py = 95,
}
SMODS.Joker{
key = 'Mezmerize_joker',
loc_txt = {
name = 'Mezmerize',
text = {'Este {C:attention} comodin', -- forgot {
'da un multi de {X:mult,C:White} X#2#'} -- and a closing }
},
atlas = 'Jokers',
pos = {x = 0, y = 0},
config = { extra = {
Xmult = 2
}
},
loc_vars = function(self,info_queue,center)
return {vars = {center.ability,extra.Xmult}
}
end,
calculate = function(self,card,context)
if context.joker_main then
return {
card = card,
Xmult = card.ability.extra.Xmult,
message = 'X', -- card.ability.extra.Xmult
colour = G.C.MULT
}
end
end
}
how do I set the boss blind to a specific one via a consumable
local Celia = J({
name = "Celia",
pos = { x = 1, y = 0 },
config = { extra = {} },
loc_vars = function(self, info_queue, center)
return {}
end,
rarity = 1,
special = "Manager",
cost = 4,
atlas = "Managers01",
calculate = function(self, card, context)
if context.starting_shop then
jude = get_joker_with_key("j_ina_Jude")
if jude then
return {
message = ina_evolve(jude, "j_ina_Jude_Raimon")
}
end
end
if context.setting_blind then
--TODO only common?
local selected_joker = create_random_ina_joker('Celia', 'Common', G.ina_bench_area, 'Scout', false)
G.ina_bench_area:emplace(selected_joker)
selected_joker:add_to_deck()
Pokerleven.open_bench(true, true)
G.E_MANAGER:add_event(Event({
trigger = 'after',
delay = 2.0,
func = (function()
Pokerleven.open_bench(true, false)
return true
end)
}))
end
end,
})```
This one works perfectly for some reason
are you actually loading the file with your joker?
wdym
like if its not in your main file you need to load it with SMODS.load_file
bump
i am so sorry, but i cannot figure out the issue right now
hopefully someone else who knows what is going on with the ui stuff can help u
you need to do this in your main file for each other file you want to load
or in another file that gets loaded from your main file
but regardless you need to eventually do this
to get the file to load in the game
ok
with the actual file path for the file relative to the main file
thanks for your time anyways
where would i need to put that in my code
bump yet again
anywhere as long as it gets run at some point
yeah
i was playing and my card appears in the shop and it's crashed
let me a sec
SMODS.Atlas{
key = 'Jokers',
path = 'Jokers.png',
px = 71,
py = 95,
}
SMODS.Joker{
key = 'Mezmerize_joker',
loc_txt = {
name = 'Mezmerize',
text = {'Este {C:attention} comodin',
'da un multi de {X:mult,C:White} X#2#'},
},
atlas = 'Jokers',
pos = {x = 0, y = 0},
config = { extra = {
Xmult = 2
}
},
loc_vars = function(self,info_queue,center)
return {vars = {center.ability,extra.Xmult}
}
end,
calculate = function(self,card,context)
if context.joker_main then
return {
card = card,
Xmult = card.ability.extra.Xmult,
message = 'X', -- card.ability.extra.Xmult
colour = G.C.MULT
}
end
end
}
ability,extra
oh yeah
also should be card.ability.extra not center.ability,extra
??
yes\
i want to think too
i'll see if this works
Finally
I fixed it
oop what was it
oh
HAHAHA
Thanks god I had the occurrence to see that
the same error
and crash
SMODS.Atlas{
key = 'Jokers',
path = 'Jokers.png',
px = 71,
py = 95,
}
SMODS.Joker{
key = 'Mezmerize_joker',
loc_txt = {
name = 'Mezmerize',
text = {'Este {C:attention} comodin',
'da un multi de {X:mult,C:White} X#2#'},
},
atlas = 'Jokers',
pos = {x = 0, y = 0},
config = { extra = {
Xmult = 2
}
},
loc_vars = function(self,info_queue,center)
return {vars = {center.ability.extra.Xmult}
}
end,
calculate = function(self,card,context)
if context.joker_main then
return {
card = card,
Xmult = card.ability.extra.Xmult,
message = 'X', -- card.ability.extra.Xmult
colour = G.C.MULT
}
end
end
}
:3
holy shit a good wiki!!!
where's that wiki?
i don't know what to do, why it crashes when it appear in the store?
https://github.com/nh6574/VanillaRemade/wiki
i still havent pushed these changes but i will in a bit
i need to add more code lines for the price of the joker?
oh yeah youre missing a cost for the joker
how do you get the value of a config option?
yeah and the X2 mult doesn't appear too
config as in the joker's config or as in your mod's config?
just remove the message
xmult doesnt need a message it does it automatically
also you should be using #1# because the xmult is the first variable in the loc_vars
mod config, which frankly im just trying to do by looking at what other mods do and its been very difficult lol
like, the entire message?
SMODS.Mods.your_mod_id.config.your_value
ok
and for the price of the joker?
how i do that?
N' ur the goat for that
Chat i am awake again hello
How do I get Stickers to show in-game?
it literally says it at the bottom of the SMODS.Sticker page
i have the lines of code here in my main file,
SMODS.load_file("items/reference.lua")()
end```
i have a `config.lua` returning a `reference_enabled` value of `true`
and in my json that holds my metadata the `id` value is `votd`
it still doesn't work though, what am i doing wrong here?
now the joker doesn't do anything like, when i play doesn't add X2 mult
I thought that isn't for the collection
code?
Okay wait, what do I need to write in SMODS.Sticker for it to be able to show in the collection?
SMODS.Atlas{
key = 'Jokers',
path = 'Jokers.png',
px = 71,
py = 95,
}
SMODS.Joker{
key = 'Mezmerize_joker',
loc_txt = {
name = 'Mezmerize',
text = {'Este {C:attention} comodin',
'da un multi de {X:mult,C:white}X#1#'},
},
atlas = 'Jokers',
pos = {x = 0, y = 0},
config = { extra = {
Xmult = 2
},
cost = 4
},
loc_vars = function(self,info_queue,center)
return {vars = {center.ability.extra.Xmult}
}
end,
calculate = function(self,card,context)
if context.joker_main then
return {
card = card,
Xmult = card.ability.extra.Xmult,
}
end
end
}
cost should be outside the config
oh
and you dont need card = card in your return i think
that doesnt do anything afaik
and it should be xmult and not Xmult i think
SMODS.Atlas{
key = 'Jokers',
path = 'Jokers.png',
px = 71,
py = 95,
}
SMODS.Joker{
key = 'Mezmerize_joker',
loc_txt = {
name = 'Mezmerize',
text = {'Este {C:attention} comodin',
'da un multi de {X:mult,C:white}X#1#'},
},
atlas = 'Jokers',
pos = {x = 0, y = 0},
config = { cost = 4, extra = {
Xmult = 2
}
},
loc_vars = function(self,info_queue,center)
return {vars = {center.ability.extra.Xmult}
}
end,
calculate = function(self,card,context)
if context.joker_main then
return {
card = card,
Xmult = card.ability.extra.Xmult,
}
end
end
}
cost otuside the config
you just
moved it to somewhere else in the config
its its own parameter
seperate from config
aaaaa ok ok
keep in mind you need to restart the game for the change to take effect when loading files, otherwise no idea
Hi n
hi N
I took some fat and rotund naps
bump
lets goo
okay, ill just tinker around with it for a hot minute to see if i can get it to work i guess, maybe ill look at some other mods
You've been bumping this so much lmao
Is that still using the old probability system
Or does it use the new one
anybody have an example of how set_sprites works? i want to have an enhancement where the sprite gets overlaid on top of the card itself.
Fixed it loading but now I have this happening
im not sure, probably the old one
missing text and label
can you send your whole joker over
Text, label and sprite aren't there. How do I set them?
in your localization file
or loc_txt if you use that
also your sticker needs a badge_colour for the colour of the badge if you dont want it white
I did that
descriptions = {
Sticker = {
st_sj_death = {
name = "Death",
text = {
{
"If you still have this card",
"after X rounds, immediately lose"
}
},
},
}
}
}
What's st_
have you tried using vanillaremade as a reference for your localization files
Am I stupid or sum
I just call it that, so I know it's a sticker (st), just like j for joker
is this a good readme
Is it in the key too?
it literally cant be because the mod prefix is after the st_
which means it would be different
Oh right
What? Am I being stupid again?
slr
i know its long but yeahhhhhhhhhhhhhhh....
Okay, what should I try/send now?
your mod prefix goes at the START of the key
so the sticker key physically cannot be st_sj_death assuming the mod prefix is sj_
alright give me a bit
figured it out, in case you were curious it was because my prefix and id were the same
But it worked for my Jokers like that...
yes because
with jokers
the prefix is added automatically
because its part of a joker
Pearlkeo
stickers dont have a prefix, youre just adding something to the sticker key
the joker class prefix of j_ is added after the mod prefix
that doesnt work when youre manually adding a prefix because its not actually a prefix
so, if you spawn 3 what happens, it crashes on play? on spawn?
Omg, I'm so stupid. So I should just do sj_death?
hey I get this error message when I try to open malverk textures
assuming the key you gave for the sticker is just death yeah
actually right now it just crashes even on just one and on play cards
alright
Now i get this error...
key = "death",
path = "death.png",
px = 71,
py = 95
})
SMODS.Sticker{
key = "death",
pos = { x = 0, y = 0 },
badge_color = "000000",
default_compat = true,
rate = 1,
needs_enable_flag = false,
sets = {
Joker = true,
}
}```
localization:
```return {
descriptions = {
Sticker = {
sj_death = {
name = "Death",
text = {
{
"If you still have this card",
"after X rounds, immediately lose"
}
},
},
}
}
}```
are the odds just meant to be 1 in 1 for each?
can anyone point me to a good example of a mod's config tab structure i can look at? trying to do this myself with only the documentation is giving me a major headache
mine is pretty simple, it's just a bunch of toggles
https://github.com/nh6574/JoyousSpring/blob/f14ade0745ac9807ec9995604f5aaaba7287c7e2/src/mod_info.lua#L217
its not, its just set to 1 for testing purposes
okay cool, just wanted to be sure
im trying to check if a joker is in the joker area. i know how to do that and i know how to do it with stock jokers but im trying to find one of my modded jokers and i dont know the combination of key and prefix and its really throwing for a loop
I changed rate = 1 to rate = 0.3 and now the game didn't crash. The collection display still isn't right though
ok i was pretty close then, thanks!
So what's wrong with my sticker that it shows error and an empty label + description?
Where's your atlas entry in the sticker
I forgot to add it...sorry. But even now it has now description and label
That probably means that the entry is invalid
I have no idea about it because I just use loc_txt
No idea what the reason for it could be?
Try replacing Sticker with Other
Results in this
sorry for the delay, im what the kids call freaking stupid and forgot sounds needed a modprefix so i was crashing out over my sound not existing
just testing with 3+ of them now and if it works il send over my changes
alright i didnt crash with 5 of them
what kinda blud doesnt accept messages from someone in the same server
Mb i dont know why i have that
fix it so i can dm u so im not cloggin up here wit message dot txt
updated the wiki :3
the github wikis are kind of ugly so i might restructure this some day
https://github.com/nh6574/VanillaRemade/wiki
will keep writing stuff today
youre so beautiful
no u
This was exactly what i was looking for
Great stuff!
Hmmmm..... best way to make a glass card retrigger when it's about to break.....
Does anyone know how I change the badge text from Error? This is the only thing that I have left when it comes to looks
in your localization file, misc=>labels=>"modkey_stickerkey" I believe
Hm..... does anyone know the general order of when card retriggers are added relative to other contexts?
not a single clue, i was gonna say cant you just delay the shatter once you return that its going to break in the probability
cause cant you get when its gonna break witht he new prob stuff
hmmmm seems repetitions occur before any remove_playing_card calculations
What's the easiest way to force a new scoring calculation for a card?
just call SMODS.score_card again?
actually awesome thank you nh
I just want to make sure, is this how i'm supposed to modify my probability?
Well i'm probably supposed to do ''.. for the return numerator only but
the second argument to get_probability_vars should be just 1, you dont use G.probabilities.normal anymore
everything else is correct
okay
next joker idea: lucky seven
when seven is played
- turn it into a lucky card
- retrigger the lucky card
- double the prob of seven lucky cards
- always successfully trigger
the art i'm thinking of is having the slot machine seven with a simple background maybe shining like its a sun?
Also, if i modify vanilla jokers with probability through patching, what should i do, just the same thing or smth different (example attached)
like it would pair well art wise with cloud nine
That's a pretty damn strong effect for a lucky 7 joker, honestly, or is it just that you're debating between the 4 effects?
yeah debating them
hi ice
because four on its own sounds overpowered especially with lucky cat
yo dilly
i think turning it lucky and retriggering it should be fine
doesnt need all of those effects
I have a joker that has a chance to destroy lucky cards and increase their odds by 1, and while it's bad for naninf runs, it's incredibly strong when you're trying to win ante 8. Guaranteeing would be even stronger
good idea since it would be enough and fit the idea of keeping it simple
i miss lucky number slevin
I'm trying to think which versions of a lucky 7 joker I've seen that I really liked, but I think they've all kinda amalgamated
I mean, Slevin lives on, your code for him just perished 😛
gamblecore 🗣️💯🔥
i had such a nice little implementation :b
dont suppose anyone knows how to replace an atlas without requiring the player to have malverk? for some reason this doesnt seem to be working:
SMODS.Atlas:take_ownership('Tarot',{
path = 'Tarots.png'
})
Oh, I should see if I can find the timestamp, it caused some fun bugs in hyper specific situations when the mod was being streamed, haha
for memory card everything is done but i haven't honestly like my attempts at drawing it so i'll keep it as a blank placeholder for later
oh no i had buggy code

oh yeah curious question when making branches would that impact debugging?
like if i make a branch to work on lucky seven would i be able to test it out
N can you fix me
i see thanks
fix you what

i do this cool thing where all of my testing happens on my main branch
i dont do anything on a separate branch
If I define a new variable in G.GAME that changes in run, I shall store it somewhere for the continue functionality to work right?
im the only one working and ever testing anyway so i may as well
i dont push anything until ive seen i havent broken things ive changed usually
everything in G.GAME is saved between loads
mmmm
doesn't seem to work
function Game:start_run(args)
game_start_run_ref_buttons(self, args)
local atlas = G.ASSET_ATLAS["ina_resources"]
local sprite = Sprite(0, 0, 0.6, 0.6, atlas, { x = 0, y = 0 })
G.GAME.ina_show_barriers = false
G.GAME.current_round.barriers = 0
maybe G.game should be before the original call here?
you're overwriting the values every time you restart
G.GAME.ina_show_barriers = G.GAME.ina_show_barriers or false
G.GAME.current_round.barriers = G.GAME.current_round.barriers or 0
will stylise, but is this good
quick question, how do i get the card to display the labels for eternal, perishable, and rental
the eternal label works just fine, but once i added perishable and rental it began crashing
i know i'm probably formatting the info_queue wrong, but i'm not sure what else to try
yeah that would do the same
yeah that's insane it should honestly be a rare or uncommon
I think this is a better practice
I'm going with this
will change it to uncommon/rare later but im talking about the text
like "become lucky and retrigger" sounds both weird but fine at the same time
id probably say uncommon, my logic always goes by how many youd have in a run, and youre only guaranteed 4 not including them getting destroyed and not including specifically deckfixing
it only retriggers once like buskin
any retrigger effect is very very good
if you only balance around deckfixing then nothing is going to be balanced
it's a joker that you find and build around
any retrigger is only conditionally good
i have a card that retriggers all aces, but a default ace being retriggered isnt very good
anyone knows why my "i"'s don't appear in my description?
Yeah, retriggered that target specific ranks are only as good as that rank's joker synergy
thats very funny
should the s in sevens/7s be yellow too
no
Did you happen to copy that text over instead of typing it, by chance?
i wrote it a long time ago but bc im lazy i will assume that i did
@red flower maybe you can help about another question I have.
I have implemented big and small blinds with abilities, similar to bosses.
Rn everything works fine but when I continue a game that was left at a in play blind when I defeat it, the round starts from zero.
local blind_get_type = Blind.get_type
function Blind:get_type()
if self.small then
return 'Small'
elseif self.big then
return 'Big'
else
return blind_get_type(self)
end
end
local old_blind_save = Blind.save
function Blind:save()
local save_table = old_blind_save(self)
save_table.small = self.small
save_table.big = self.big
return save_table
end
local old_blind_load = Blind.load
function Blind:load(blindTable)
old_blind_load(self, blindTable)
self.small = blindTable.small
self.big = blindTable.big
end
I think it has something to do with the blind load function as the savetable returns MANUAL_REPLACE
Any clue?
you're probably saving a cyclic table or something, I would ask Eremel about this tho
i think you misunderstand, i just want them as an aside to describe the effect, like in the screenshot with the eternal label
when i input your code, it just returns with this crash
@wintry solar 👀👀👀👀
you dont have to copy the entire code, just the vars = ... part youre missing
oh i'll try that
there are lots and lots of things you need to change to make custom small and big blinds work
I will port it to smods at some point in the near future
Oh
I think I'm waiting then
But oh man I thought I had it
all I was missing was the load
Is there a way to make a game over when a condition is met?
thank you for clarifying, it works now 
nah you have to account for every single thing that is to do with which phase of the ante you are in
Mmm the only problem I encountered was the load one
hm....... this doesn't seem to work. Might be too late for score_card to do anything because it doesn't expect it to occur here
if context.playing_card_removed and context.individual
and SMODS.has_enhancement(context.removed, 'm_glass') and context.removed.shattered then
-- this part doesn't work at all
sendDebugMessage('all checks passed')
local old_cardarea = context.cardarea
context.cardarea = G.play
SMODS.score_card(context.removed, context)
sendDebugMessage('scored card')
context.cardarea = old_cardarea
-- new card creation works fine
local new_glass = SMODS.create_card({
set = 'Enhanced',
enhancement = 'm_glass',
key = 'm_glass',
skip_materialize = true
})
sendDebugMessage('created new glass card: '..tostring(new_glass))
G.playing_card = (G.playing_card and G.playing_card + 1) or 1
new_glass.playing_card = G.playing_card
table.insert(G.playing_cards, new_glass)
G.deck.config.card_limit = G.deck.config.card_limit + 1
new_glass.states.visible = false
new_glass:add_to_deck()
new_glass:hard_set_T(G.ROOM.T.x + G.ROOM.T.w/2 - new_glass.T.w/2, G.ROOM.T.y + G.ROOM.T.h/2 - new_glass.T.h/2, new_glass.T.w, new_glass.T.h)
playing_card_joker_effects({new_glass})
local juice_card = context.blueprint_card or card
G.E_MANAGER:add_event(Event({
func = function()
new_glass.states.visible = true
new_glass:start_materialize({G.C.SECONDARY_SET.Enhanced})
juice_card:juice_up()
return true
end
}))
draw_card(nil, G.discard, nil, 'up', false, new_glass)
end```
everything else seemed to work fine
also while i'm here, there's this problem that's been bothering me for quite a while
i have a lovely patch which used to add shaders to my jokers and/or consumables, but ever since i updated something way back when it hasn't been working
any idea to get this fixed?
the ability set key name is correct btw