#💻・modding-dev
1 messages · Page 447 of 1
no 😔
Shit
thank you
Sent message link
Np
Tis a new day so Im hoping I can get this figured out today. I have this joker that I made to basically make two negative bubble jokers these jokers are my own custom ones though. Even with having prefix for the joker it crashes the game when it tries to work. Hlep
calculate = function(self, card, context)
if context.setting_blind then
SMODS.add_card({key = "j_loljk_Bubble", edition = "e_negative"})
SMODS.add_card({key = "j_loljk_Bubble", edition = "e_negative"})
end
end
the JSON:
{
"id": "silly_goofy_balatro_mod",
"name": "SillyGoofyBalatroMod",
"display_name": "Silly Goofy Balatro Mod",
"author": ["blocky"],
"description": "Made this for dopamine",
"prefix": "loljk",
"main_file": "main.lua",
"badge_colour": "#078674",
"badge_text_colour": "#ffffff",
"version": "1.0.0"
}
@snow vale
ok
Check other people shaders
Aswell
1 second i have one more recourse
Ressource
FUCK
Here
I wish you all luck
ok tysm
Good advice
Check people’s shaders
And ingame shaders
Good resource would be ruby’s
Shaders in entropy
They’re advanced and look really cool
Use create card
Create_card
This is how i do it
New card =
btw what language uses the shaders?
Emplace and add to deck at the end
F sharp and glsl
oh
does anyone know how i can give the player a random buffoon pack?
Tutorials may help
ok
so, im trying to localize only a specific set of jokers, but idk how to localize that
Alright I’ll try it out thank you
Make a poll of tags that give packs
Pool*
And pseudorandom
isnt there a easier way of doing it tho
damn
Idk
Look for references
I can’t really guide you here i don’t play modded , can’t think of a helpful resource
But my idea should work perfectly
@hard mica
Where is the ID of a played hand scored?
Make a local table
so my texturepack mostly works but there are some black strips, does someone know how to get rid of them?
Locals packs={key1,key2,key3}
Variable =Math.random(#packs)
Add tag with the key in (packs[variable ])
What?
Your sprite sheet is wrong
It should look something like this
Every joker is separated with 2 pixels from others
Do you know the keys of the Buffon packs?
Check vanilla remade
Remade of tags
I want to check and store the ID of a played hand so that I can check whether or not a certain hand has been played at the end of a round.
They don't have tags.lua
Rip

I know but i cant make it wider, is there some way to change how the sheet is read?
or is it too complicated
Yes
Px=
py=
In your atlas
X is width and y is hight
Check code of card sharp
where? (this code is mostly stolen bcs I know little to nothing abt coding)
its that bad?
aw man
from what i saw the original cards have an even number of pixels and mine have an odd one
Move them couple of pixels left and right
should there be?
Depends on where the lines are
Preferably if you don’t want it to look like that
you mean as horizontal separation or vertical
how do i check if the player is currently in a blind
Seen someone doing this
Forgot
Lmao
huh bwuh
nvm im stupid, when removing the background i left a black strip
between cards
Skull emoji
??
Kms
the British Museum called they want their ancient texts back
Genuinely I have no idea why you were @ed here. Sorry about that
where the fuck did you steal from
Stealing code is legal
^w^ i can do my favorite hobby without the policemen going after me
yes but it's stolen from somewhere that uses ancient smods
Holy shit bro have you been sailing the seas or something?😭
wdym
(If it works )
lol its okay
Sailing the seas = pirating /stealing
no it doesn't im pretty sure this breaks
oo those cards are cool, what media is this from? 🤔
and also this isn't piracy
G.GAME.blind.in_blind or smt
ahh
Last updated
05 December 2024, 1:53AM
you should upgrade and just read from malverk
at least steal from new mods 😭
Thats my job
stealing from old mods makes it hard for both you and other people 😭
malverk literally had examples :p
Yo guys if it works
nuh
i didnt find any (the one that I stole worked so I didnt see the point)
well i still feel like pointing at rule 5
i sincerely doubt you can obtain permission from a beta mod dev
sorry for reply ping to super old message but could i use this in my mod and how do you get it to work? i'm messing around with it right now and i made it a .toml file and put it in Mods>Mod Name>lovely but i still can't get perishable to work
ohhh right
even if im making the mod for myself?
i thought this was for stickers for some reason my bad
kinda fun how people keep coming back to my patches time and time again though lol
😭😭
in some way that combos with rule 6
but if it's personal it's probably fine? i am not a lawyer
Hey, I'm not seen you here for a while
For the record if anyone wants use my code they do not need my explicit permission because intellectual property is fake and stealing is cool
gottem
I wouldn't even call it stealing, more like duplicating
Correct
What happens if a mod shares a priority number with another mod?
I call it inspiration
Random go burrrr
if anyone wants to use my code and/or art they are entitled to a 1 hour+ step-by-step lesson on how to recreate that code or art by themselves because i believe in the guarantee of education
They get loaded in the order your filesystem finds them, most likely alphabetically
Ok thanks, I wanted to make sure I didn’t need to change the number
which argument in SMODS.Booster controls this bottom text
why isnt this creating a negative playing card?
hihi
i'm not terribly active around here anymore but i still respond to queries
See like yeah I want people to get more knowledgeable but also do whatever man
Add shader btw
I don't suggest relying on filesystem ordering, that can lead to some weird bugs on other OSes
hi, i was told a few hours ago to hook SMODS.calculate_context here for this to work, but i actually still have no idea of what im supposed to do lol. could i get a bit of help?
just give the edition to the card separately
there is a shader on them (voucher) it's just subtle because of all the white on the card
like, _card:set_edition('e_negative')?
N help the cute girl
use SMODS.add_card{set = "Base", edition= "e_negative"}
whom
.
what are you trying to do?
duplicate cards with seal on destroy
with a specific seal but yeah, that
sounds hard
There’s no has_seal😭😭
does anybody have the booster pack template?
you can just get the seal key
assets
but it would be useful to have has_seal() or has_sticker() at some point
its not any seal its a seal whose ability is that when the card is destroyed it creates two copies of it
what are you trying to do?
tyty
_ _
whats the atlas res btw
@wintry solar
this is what i want to do
Oh I gotta save this one (x826369)
Hony
71x95
the seal check is probably easiest
thanks
Oh dang this is really helpful. Thanks
this calculate function is within the seal, right?
yeah
they're from the balamod aesprite extension files, which has other useful assets
and what about it isn't working?
this is what i havelua calculate = function(self,card,context) print("0") if context.destroy_playing_cards then print("1") for i = 1, #context.removed do print("2") if context.removed[i].seal == "" then for l = 1, 2 do print("3") local copy_card = copy_card(context.removed[i], nil, nil, G.playing_card) copy_card:add_to_deck() end end end end end}
but its not doing anything
context.destroy_playing_cards isn't a thing
context.remove_playing_cards is, however. 😛
mhm, hold on
yeah but that still doesnt do anything i just wrote it wrong now cause i was trying stuff so i rewrote what i had at the start
local click_ref = Card.click
function Card:click()
local ret = click_ref(self)
SMODS.calculate_context{clicked_card = self}
end
this is what you want
above all of the thing i wrote?
no, put it outside of your joker's code
this code is for nxhoo
what do you mean, it doesnt do anything
and remove the SMODS.calculate_context inside your joker's calculate too
thank you caino
sure
i was told by somethingcom that context.remove_playing_cards doesnt get called on seals so i needed to hook SMODS.calculate context
well you were given bad information then
looks right, yes
is there a way to update a joker's loc_txt through the update method?
to my understanding it should be printing 1 when a card is destroyed but its not even doing that
what's the end goal
essentially being able to change the joker's description mid-game
So with SMODS.ObjectType I can create new card types different from Jokers, consumables and playing cards?
Should this work for making two negative jokers from the same mod as this one?
calculate = function(self, card, context)
if context.setting_blind then
new_card = SMODS.create_card({key = "j_loljk_Bubble", edition = 'e_negative'})
new_card = SMODS.create_card({key = "j_loljk_Bubble", edition = 'e_negative'})
end
end
you can do that by returning a key in loc_vars
loc_vars can take strings
but they can't take strings with other loc_vars in them right?
like it wouldnt work
why wouldn't it just send more than one
you can also change colour and stuff with V
yeah that im aware of
Now how does X2 mult gain work?
how should SMODS.merge_effects() be used?
what smods version are you running?
SMODS.merge_effects({ret1, ret2, ret3}) etc
3 rets?
1.0.0~BETA-0527d-STEAMODDED
however many rets you want
ok
Chat Im making joker that copies the first card in the first hand of the blind and adds a seal to it. Can't manage to make a copy of card
congrats, the context went through now 🎆
and why isnt this working?
now we just need to fix the code inside
can you screenshot the full seal code?
-# help
im pretty sure its G.GAME.round_resets.ante
the syntax looks correct, but idk what your function does
not G.GAME.current_round.round_resets.ante 🤔
dnam this caused crash lmao
@red flower @grok is this true
SMODS.Seal{
key = "shoomimi_seal",
loc_txt = {
name = "Shoomimi seal",
label = "Shomimi seal",
text = {
"When this card is {C:attention}destroyed{},",
"create {C:attention}two{} copies of it"}},
badge_colour = HEX('8CE6BD'),
discovered = true,
unlocked = true,
calculate = function(self,card,context)
print("0")
if context.remove_playing_cards then
print("1")
for i = 1, #context.removed do
print("2")
if context.removed[i].seal == "" then
for l = 1, 2 do
print("3")
local copy_card = copy_card(context.removed[i], nil, nil, G.playing_card)
copy_card:add_to_deck()
end
end
end
end
end}```
actually, is it G.GAME.current_round.ante or G.GAME.round_resets.ante...
its one of these
lemme check
calculate = function(self, card, context)
if context.after and context.scoring_hand then
local original = context.scoring_hand[1]
if original and original.ability then
G.E_MANAGER:add_event(Event({
func = function()
local original = context.scoring_hand[1]
local copy = copy_card(original)
if copy then
copy:set_seal("goolatro_hologram")
copy.ability.hologram_uses = 3
G.ENTITIES.HAND:give_card(copy)
play_sound("prototype_clone")
card_eval_status_text(card, 'extra', nil, nil, nil, {message = "Projected!"})
else
print("[Prototype] copy_card вернул nil")
end
return true
end
}))
else
print("[Prototype] Оригинал недействителен или нет ability")
end
end
end
sure
so
if context.clicked_card and context.clicked_card == card then
if G.GAME.round_resets.ante ~= card.ability.extra.last_click_round then
card.ability.extra.knock_count = (card.ability.extra.knock_count or 0) + 1
card.ability.extra.last_click_round = G.GAME.round_resets.ante
@manic rune
looks right to me
alright
and how are you testing it?
yeah it doesnt
okay can someone help me understand what exactly G.P_CENTERS is? i can't tell what it's actually for (aside from being some kind of weird catch-all object), where it's defined or how to interface with it
im breaking a card with the seal and another without it with hanged man
it's defined in game.lua iirc
it's just a list of all centers (jokers, enhancements, consumables, etc.)
G.P_CENTERS stores all the information of "centers" (which includes jokers, consumables, backs aka decks, etc etc), and whenever they are created they will grab information from there
ok ik why it didnt work, it's because it was copying vanilla jokers, and i was setting that it wasnt vanilla. Now, how can i check if the copied joker is vanilla or if it isnt
right okay
@manic rune IT WORKS!!!
nice, gj nxkoo :3
bcs the fix was literaly just deleating a black strip that i didnt see
😭
it works fine for me 🤷♂️
how did you not notice a black strip in your atlas lol
it only register 1 click tho
are you in the same smods version as me?
huh, really?
nevermind
whats the joker's code
IT WORKS
oh lol
lets say it was hidden ok?
-# my plan was to make it knock every 1 round
-# but ante works, i dont like coding this at all
no I'm on the latest version but there's not been any changes tht should affect that
i mean, the "every 1 round" part can be done in either context.end_of_round or context.setting_blind, so its not that difficult 🤔
doesnt hurt to try updating
time to merge the probability utils 🤞 for no explosions
okay so this doesn't crash the game but it doesn't work any ideas?
calculate = function(self, card, context)
use = function(self, card, are, copier)
local new_card = nil
if context.setting_blind then
new_card = SMODS.create_card({key = "j_loljk_Bubble", edition = 'e_negative'})
new_card = SMODS.create_card({key = "j_loljk_Bubble", edition = 'e_negative'})
end
end
🤔 probability utils?
it took me a half of day to code this, im just SO done
but ill try t
use SMODS.add_card instead
||I was focused finding it elsewhere to notice this||
Some functions have been added to SMODS:
SMODS.get_probability_vars(trigger_obj, base_numerator, base_denominator): Returns the numerator and denominator of a listed probability with appropriate m...
like this right? @manic rune
you are on this one right? 1.0.0~BETA-0615a-STEAMODDED
nop
what is the effect of this joker
+10 Mult per knock
i might need a general idea on what you are doing first
thats it
didn't work
edit: what i was looking for is something that would dynamically update the entire description if the variable changes. the code here doesnt work because it can't find loc_txt? (calls it a nil value)
if theres any other way to do this i'd be glad to accept it
oh
so the knock can be increased by:
- at the end of every round
- you manually clicking on it?
manually clicking
🤔 whats the every round effect then
was testing if the clicking card works in general
before you came in
Welp, this is whatI have for the solitare joker, what do you guys think?
still isnt working for me, i genunely dont know why
RBLDBLRLRBRU IDK WHAT IM DOING 😭
lmao naw its fine how should I set it up then?
i just want this to fockin' work
is this a joker or a consumable
joker
mhm, still doesnt really know what you meant by "make it knock every 1 round" though
return a key in loc_vars...
calculate = function(self, card, context)
if context.setting_blind then
SMODS.add_card({key = "j_loljk_Bubble", edition = 'e_negative'})
SMODS.add_card({key = "j_loljk_Bubble", edition = 'e_negative'})
end
end```
ah this works either way
tysmmm!
the fact that it didnt crash with that is a miracle honestly
yeah lol
okay im trying this out
um, so i added this to see if the game did it when i played a card with the seal and its not even doing that, maybe my game just doesnt even recognize the seal? lua if context.main_scoring and context.cardarea == G.play then print("0") return { message = "AAAAAAAAAAAAAAAAAA" , mult = 100 } end
does your card definitely have the seal?
or are you editing some other file thats not the correct one?
yes
nope
yknow yesterday was me figuring out how to add a prefix to the overall mod and it should be set up properly...
and i also checked that
if its a crash log that has "center" or whatever in it then the joker's key is wrong
mhm, double check the joker's key then
not really possible in this situation, i'm trying to modify the entire 5-6 line description every now and then, returning the entire text as a key in loc_vars just crashes the game
wait i have an idea
Okay it works! tysm.
this was... a mental struggle lmao, glad it worked out
its fine, everyone goes through that every once in a while :p
that's not what i mean
you need to return the key to a localization entry
oh
how would i do that though?
i have no knowledge whatsoever of localization entries
Am I crazy or is there an SMODS.remove_card function?
Hey I just tried to install Pokermon - I got lovely and Steammodded and that is the only mod I run but I can't get it to work.
Worked just fine on my laptop, but I can't get it to work on my desktop.
Can I post a pic of the error and someone might guide me where I went wrong?
(sorry if that is the wrong chat I am trying to find everything out as I go)
- make a localization file
- in descriptions = { Joker = {...} } put an entry for your joker, the key should be something like
j_modprefix_key_desc2 - in
loc_vars
return { key = condition and "j_modprefix_key_desc2" or nil }
you can check vanillaremade or another big mod to check how localization files are set up
@tawdry oriole
ohh alright
trying to create an edition that always destroyed the card/joker it's on at the end of the round, but this messes with the deck size (shows 55/52 after adding and removing 3 temporary cards). can i fix this?
SMODS.destroy_cards, i think
okay so
if it was text
its should be G.C.TEXT_RED?
since when i use G.C.RED, the text wont show up
I thought there was one that removes cards from the pool but I may be wrong
G.C.RED is correct, where are you using it?
try removing the event and use SMODS.destroy_cards(card) 🤔
-# is it just that or {card}?
both work
i see
G.C.RED should work
G.C.MULT is the same color tho iirc
maybe im wrong with the name
im p sure its G.C.RED
Had to fix this, now it is functional.
||though wished maybe like by the end of the boss blind it can play like the solitare win screen thing. but IDK how to do that||
whats the difference
okay no i still have no idea what i'm doing here - i'm trying to make a joker that reduces the shatter probability for glass kings to 0, and i was told previously
you should be able to hook
G.P_CENTERS['m_glass'].calculateand do your thing there
and uh, i have no idea what that's supposed to look like
it's a different table
like, there is no calculate function on that object in the base game (at least not that i can find), so i'm not sure where i should be referencing this or what it should be returning
i see
use take_ownership instead
new n profile picture?
is there a way to sense if any joker triggers?
context.post_trigger
it's an optional feature you have to enable
🤔 it is?
take ownership of what, G.P_CENTERS['m_glass']?
no they are slightly different hues
how can you not tell? this guy clearly doesn't have more hours in balatro than atoms in the universe
OR you can wait until the next smods release and use the new probability contexts
is there an ETA on that release?
what are probably contexts
Is there any way to store the key of the last used consumable? Been trying to figure it out myself and just can't get my head around it.
context hook maybe?
okay cool and this take_ownership thing goes inside the joker calculate function right?
no you're lying to me stop it
Some functions have been added to SMODS:
SMODS.get_probability_vars(trigger_obj, base_numerator, base_denominator): Returns the numerator and denominator of a listed probability with appropriate m...
no, outside of everything
so a better way to handle probabilities?
a better way to manipulate them yeah
Super new to lua and modding for Balatro, could you elaborate?
dunno if it's possible but maybe a hook for when you use a consumable check what consumable was used and put it on a variable
you do that by not clearing the screen after you draw a frame (absolutely not recommended)
Hey im making an edition (for jokers) that multiplies current chips by 2, how would I access the amount of chips that there are currently?
honestly this resource is not the best for smods imo
the xchips in question
How do I move my button up
fr ik
wait is that a thing lmao
real
but is the only thing i have so
let me find my example of a hook
can't, your button is anchored to the bottom with the other buttons
declare it somewhere else
this is one example (obv, dont use my spamton joker lmao)
I could have sworn that I made a button that's not at the bottom before
what would be code for a joker like this? or at least the claculate bits this seems a little complicated
not a perfect example but
What do you suggest, I don't really see someplace to declare it other than using create_UIBox_buttons()
i essentially got it all except the last part
the loc file is set up but the thing is that i'm not sure what i'm supposed to do with the key in loc_vars
is key to be replaced with something too?
-# How do I format the return for context.check_enhancement again?
Does anyone know how I can give the player a random buffoon pack?
also @daring fern @gilded blaze tysm, i finally fixed my amalgam joker, now it works even if i reload my run
return { key = [your condition here] and "[the description key here]" or nil }
return {m_modprefix_key = true}
is there a good way to check if the player currently owns a particular joker, or do i have to set flags in the add_to_deck and remove_from_deck functions?
Yes.
yes, i have to set flags?
No, next(SMODS.find_card("j_modprefix_key"))
how does random chance work? where in code do I put it.
how can i make so i can only sell him if i have money?
the obvious place is under the jokers cardarea
When xchips is 1, it doesnt multiply chips at all, but when it is 2, it multiplies it twice?
yk, 1 x 1 = 1, 1 x 2 = 2
Yeah I get it but I need a function to draw it there
I'll get back to you on that
but it multiplies it by two twice.
hook Card:can_sell_card
okk
what's the code
how can i refer to the money i currently have?
G.GAME.dollars
ok ty
something like that?
-- doesnt multiply
if context.edition and context.cardarea == G.jokers then
return {
xchips = 1
}
end
-- multiplies by two and then two again
if context.edition and context.cardarea == G.jokers then
return {
xchips = 2
}
end
almost
you need to have two different localization entries, each with its own name and text
ohh okay
Anyone know?
this is an edition?
try using context.post_joker instead of context.edition
Does anyone have an idea of replicating the solitare win screen thing?
uh, so how do i fix this?
it works!! tysm 🫶
How to make joker trigger it's ability only on first hand of the round?
Thanks dude it works now
is there an equivalent way to mess with lucky cards? i see a take_ownership function in that file, but it doesn't have a calculate function, just a thing that returns localisation vars, which i assume won't actually affect the behaviour of anything
- can_sell_card takes an argument. i don't think it's used in game but you should use it anyway
- return false if you cant sell it
uh
@wintry solar i got a friend to test the seal i was making and they said it works but the cards stay floating instead of being added to hand
How to make joker trigger it's ability only on first hand of the round?
for those you will have to use the new probability thing
so then what do i change for the argument??
is there an estimate on when that release is coming?
So, returning every enhancement...
how do i make an edition effect also trigger on debuffed cards?
what the hell is tarot interrupt pulse 💔
check DNA or sixth sense
https://github.com/nh6574/VanillaRemade/blob/main/src/jokers.lua
As a sanity check, something like this should work as far as I can tell
it literally got merged like an hour ago so a week or two
idk, i suck at hooking lmao
it's my worst enemy after shaders
Testing determines it doesn't work 🙃
i want this to trigger no matter what (currently this causes issues with debuffed cards, as they are not destroyed)
so what do i change now?
Is it posssible to discard a hand after its been played? like a joker that has a 1 in 5 chance of discarding the hand played.
yeah your code to add cards is wrong
the last return should be return oldcansell(self, context) and the function should be function Card:can_sell_card(context)
oh, that would explain it lmao
Anyone know why this sometimes creates 2 jokers?
calculate = function(self, card, context)
if context.selling_self and not context.blueprint then
card_eval_status_text(
card,
"extra",
nil,
nil,
nil,
{
message = localize("k_plus_joker"), colour = G.C.RARITY["willatro_organ"]
}
)
local card = create_card("Joker", G.jokers, nil, "willatro_organ", nil, nil, nil, "willatro_cadaver")
card:add_to_deck()
G.jokers:emplace(card)
card:start_materialize()
return nil, true
end
end
...that looks like a retriggerable Joker with return nil, true being there.
idk, I just copied stuff from cryptid.
how would i fix it?
is there a way to exclude a certain joker rarity (or certain jokers if that isn't possible) from a booster pack?
why does it no work
how do you change the atlas for your mod in github commits
ive never figured that out
How is the game that fast may i ask?
I've sped up the calculating and the triggering parts by 4x in post as indicated by >>. Otherwise, Nopeus.
it couldn't find whatever you were referencing with "joker" at line 132
Ah ok
effect is unchanged?
Btw does anyone know what gamepad inputs love uses for joycons or are they universal?
Anyone have a good example of booster pack code?
SMODS.Booster {
key = "ephemeral_small_1",
loc_txt = {
name = "Ephemeral Pack",
group_name = "Ephemeral Pack",
text = {
"Choose {C:attention}#1#{} of up to",
"{C:attention}#2# {V:1}Ephemeral{} cards to",
"be used immediately"
}
},
config = { extra = 3, choose = 1 },
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.choose, card.ability.extra, colours = {HEX("8ea4b3")} } }
end,
cost = 4,
atlas = "gb_Boosters",
weight = 1.5,
pos = { x = 0, y = 0 },
draw_hand = false,
select_card = "consumeables",
kind = "Ephemeral",
create_card = function(self, card, i)
return SMODS.create_card({set = "Ephemeral", skip_materialize = true, area = G.pack_cards})
end,
ease_background_colour = function(self)
ease_colour(G.C.DYN_UI.MAIN, HEX("8ea4b3"))
ease_background_colour({ new_colour = HEX('59778c'), special_colour = HEX("8ea4b3"), contrast = 2 })
end
}
Thanks!
the wiki also has some stuff on boosters https://github.com/Steamodded/smods/wiki/SMODS.Booster
how do i do something before context.end_of_round in update
i want to undebuff cards with an edition before then so they trigger their destroy effect
or if there's a way to have editions work regardless of debuff status that works too
What are the default weights for packs in the base game?
Two booster packs are always offered in each Shop, often but not always of two different types. These come in five categories:
Arcana packs, containing Tarot Cards for immediate use.
Celestial packs, containing Planet Cards for immediate use.
Standard packs, containing playing cards (often with enhancements, seals and/or editions) that are adde...
I found this in resources under a txt called gamecontrollerdb
Nintendo Combined Joy-Cons (joycond),a:b0,b:b1,back:b9,dpdown:b15,dpleft:b16,dpright:b17,dpup:b14,guide:b11,leftshoulder:b5,leftstick:b12,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b13,righttrigger:b8,rightx:a2,righty:a3,start:b10,x:b3,y:b2,platform:Linux,
Is this it?
how do i make an edition that stops a card from being modified?
my instant thought was to just save a copy of the card when the edition is applied and just continuously set the card to the save card
but that's scuffed asf
that is scuffed
there is on_remove but that would only trigger if you tried to override the edition
could i put if context.before and context.remove_playing_cards then to make something happen before a set of cards gets destroyed?
or does context.before not work like that
@red flower just looking through the visible poker hands PR, how do you feel about combining is_visible with visible, so visible can either the function (or a boolean for back compat reasons)?
hleppp with random chnace 1 in 5 plss
wait cna i just debuff the played hand instead?
hmmmmm
-# god, returning every enhancement on every card is wild af. laggy tho.
I'm not sure if I'm using these variables the right way, I'm getting an error that I'm trying to compare a number with a table? any help would be greatly appreciated!
I thought the same thing, I just didn't want to figure out how to handle changing visible to true when a hand is played if it was a function
But it makes sense
how do you load images for an effect?
oh right yeah, the game auto sets them to true when you play them right?
yeah
Why am I seeing mixed usage of "number" and "float" in GLSL? Wouldn't everything just be "number" since Love2D's version of GLSL just converts float into that?
the function would automatically use the originally defined function though at all times
And if you want to check if it was played you would check G.GAME.hands?
and then if a function doesnt exist it'll default to the boolean value set by the game, which I think is probably fine?
you'd need a different check for played hands regardless
yeah i think it's fine
This has an error but idk what the error is, could someone point it out for me. Should be somewhere around the else because it was when I added that, that it didn't work.
calculate = function(self,card,context)
if context.joker_main and #context.full_hand == 5 then
if pseudorandom('ThunderStorm') < G.GAME.probabilities.normal / card.ability.extra.odds then
return {
Xmult_mod = card.ability.extra.Xmult,
message = "X" .. card.ability.extra.Xmult,
colour = G.C.MULT
} else
if context.before then
card.ability.extra.chips = card.ability.extra.chips + card.ability.extra.chips
return {
message = 'Upgraded!',
colour = G.C.RED
}
end
i dont think so
wouldn't it be visible? boolean|fun(...)
ok this is definetly "functioning" now but it seems I'm refering to chips gathered thoughout the run or something like that? the values are just way too high, am I using the right variable for my math (G.GAME.chips)?
the jokers' keys get stored in the global table properly, but the joker isn't using the effects of the jokers stored?
example: i store the key of clever joker, but this guy
doesn't have the effect of clever joker
someone should make an API to copy not-owned joker effects
That would be cool
might be wrong but shouldnt the else be under the "}"? maybe it cant be on the same line?
hmmm
Could probably use an elseif instead of an else and an if too
^ yeah that too
how do mods do tetrating, pentating, etc. mult/chips
hmh it still shows an error. its one of those things where it has the bottom most "}" underlines red
oh talisman does it
could someone help with controller inputs?
Based this, would the debug menu open when i do this
if _RELEASE_MODE then if key == 'leftstick' and not G.debug_tools then
This is for dual joycons btw
i uhm hmmmm
I have a working version of copying not owned effects that I could maybe look at generalising
i see that asked a lot in here so i think it would be amazing
I don't know much about Lua but doesn't every "if then" have to end with "end"?
Gah! this sucks I hacve no idea whats going wrong 😭
I dont really know about where the "ends' have to go regarding "else" statements
Not sure about chaining "if then if then" needs a separate end for each... but you probably missed an "end" in the if block you have at the end in your else block
if condition then
-- code
elseif condition then
-- code
else
-- code
end
bump because I've been scouring the source code but I still have no idea 😭
What if it's
if condition then
N what are your thoughts on this? https://github.com/Steamodded/smods/pull/774
okay okay hollup
if condition then
if condition then
end
end
Ah yeah that makes sense
I think you're missing two "end"s here then
One if you change that else and if into an elseif
you can also just put ```lua
if condition and condition then
--code
end
okay i think your right and I found solution
Theres no error message so hope it works
calculate = function(self,card,context)
if context.joker_main and #context.full_hand == 5 and
pseudorandom('ThunderStorm') < G.GAME.probabilities.normal / card.ability.extra.odds then
return {
Xmult_mod = card.ability.extra.Xmult,
message = "X" .. card.ability.extra.Xmult,
colour = G.C.MULT
}
elseif context.before then
card.ability.extra.chips = card.ability.extra.chips + card.ability.extra.chips
return {
message = 'Upgraded!',
colour = G.C.RED
}
end
end
Now you have one too many I think
theres one end for the if and another for the function, its fine
Oh functions need an end too?
yes
better explanation with a video
Ugh give me back my brackets
i think it's cool but in my opinion it's going to be a lot harder to convince people to use this one, even more so than the probability ones
probabilities checks are already kinda cumbersome to write and they require people to learn what pseudorandom is, but this one replaces a simple value = value + scalar which I think it's kinda unintuitive (and gets close to Talisman's to_big thing)
also it says addative instead of additive 😦
yeah I'm not keen on it for that reason
I want to post mod where can I do that
it doesn't handle the things that scale negatively either right now
but overall, I think it would be very hard to get it picked up
could someone please help me with why this is not working?
k ty
Anyone know anything about this?
the goal of this calculation is to have it trigger when played hand has 5 cards, then to have a 1 in 5 to upgrade its chip count, if not landing on that 1 in 5 then it'll do X2 Mult
im a noob so sadly cannot help.
Grasp a better concept of all of this I must!
how do I refer to the player's current score at the end of a round? I tried using G.GAME.chips but it seems like thats storing all the chips I've scored in the run?
how would i implement a double exponential chips effect (^^2 chips)? i have talisman
G.GAME.chips should be current round
what does it say when you print it
i think the elseif part will never trigger since context.before happens before context.joker_main
okay I was trying to recreate the solitare winscreen thing.
but I get an error for this
order of contexts shouldn't be relevant to that
Firstly, thank you that's so fucking useful actually, and secondly it does seem to be the right number, so it must be some logic error, let me grab a snip of the code
bump
oh wait
that makes sense lol shouldve thought about that 😅
is it adding my current dollars to the amount it's adding?
yes
nvm figured out
oh and I guess it would assume any number I return is in dollars becuase it's a "calc_dollar_bonus" yes?
no it doesn't make sense lol
yes
okay that makes so much sense thank you a ton 
yeah i realised after, my bad
is there a chance action instead of an if statement?
beause i believe its the fact that its an if than going into another if than
i dont understand your question but what's the problem exactly?
how would i make a consumable that turns your entire hand into 1 selected card
combine both death and sigil
im using this line of code for the 1 in 5 chance but the problem is I only want it to trigger after this other (2nd) if then. It seems to not work for the first one to be the result of the second one.
if pseudorandom('ThunderStorm') < G.GAME.probabilities.normal / card.ability.extra.odds then
if context.joker_main and #context.full_hand == 5 then
using = true uses the default weight for that ObjectType and { rate = value } uses a custom rate
sorry go back
does death use copy_card?
do i need to add this if i want the rarity to work
im pretty sure yes
check vanillaremade
not sure i never made one :3
wait nvm vanillaremade has rarities
no
how you wrote it here is correct
#💻・modding-dev message
that's why I'm asking what the problem is, that looks correct to me
calculate = function(self, card, context)
-- When hand is drawn
if context.hand_drawn then
if (context.card:get_id() == 12) then
SMODS.debuff_card(card, false, source)
end
end
i'm trying to make a joker where when queens are drawn, they get undebuffed
when it runs if (context.card:get_id() == 12), it gives an error saying card is a nil value. is there a way to provide a value for card?
context.hand_drawn is a list of cards drawn, you would need to iterate that
but also I would use context.debuff_card
instead of hand_drawn
oh that's a thing? i couldn't find it on the documentation
this was driving me crazy last night
Could anyone tell me why this sets the cost to 1 and not 0?
{
cost = 0
}, true
)```
calculate = function(self, card, context)
-- When hand is drawn
if context.debuff_card then
if (context.card:get_id() == 12) then
SMODS.debuff_card(card, false, source)
end
end ```
so something like this?
if context.debuff_card and context.debuff_card:get_id() == 12 then
return { prevent_debuff = true }
end
i think you misspelled the return, it'd be ```lua
return {prevent_debuff = true}
yes
works like a charm, thanks y'all
how do i add tetrational chips with talisman?
eechips = number
Is it possible to insert modded items in the order of item load before some vanilla items?
I'm adding some Blinds, but I'd prefer to be able to add my non-boss blinds with the non-boss blinds in the collection (rather than after the default boss blinds)
is it possible to pow a table, like {50,500} (50500) by 0.5 (or 0.2, whatever) without needing to turn the table into a whole number?
ive been scratching my head over this for a while now
minor bumpage while the channel's active
wdym with "pow" a table?
key would probably be v here.
idk the word for that, uh, ^0.2 basically
or rather k right?
{50,500} is supposed to be a big num here, and im trying to figure out a way to exponentiate that big num by 0.2 (i think i got the word right)
and no, this is not talisman
is that 50*10^500?
No, it would still be v if you're inserting into the table.
nop, its just 50500 when converted into a number
like this?```lua
for key,num in pairs(table) do
table[key] = num --(however you elevate a number i dont know how)
end
:3 wat
or am i not understanding what you want
that doesnt help me with exponentiating the big num lol
ohhh ok
well nvm then lol
okay, so uh, because lua ints have a value of 2^1024 or something, a way to bypass this is to have big nums which are essentially tables of numbers
{50,500} in this case is 50500
and currently, im trying to figure out a way to exponentiate this big num with a number that has decimal points
i hate math
so you want to do 50500 ^num?
same N', same
basically that, yes, but with big nums you cant just put them together into a number and exponentiate
which is very unfortunate because i have been looking at this screen for about an hour now :3
so basically you want like an ecuation that with 50 and 500 you get 50500 ^n
mhm
ok well now it's not inserting into the table
yeah that math is complex lmao
all because of this fucking upgrade :3
why did i think i was qualified for this
no, not at all
the most notable thing i have been able to add to this bignum lib was representing it with "e" (i dont know what its called)
whoa
its 2:32 am rn, so im just gonna take a sleep and figure this out tomorrow
Why are you representing the numbers like that in the first place
good night everyone
wait
because they are bignums? 🤔
i asked chat gpt and it made this for python, seems pretty accurate from my testing py def concat_power(a, b, n): d = 1 if b == 0 else int(math.log10(b)) + 1 c = a * (10 ** d) + b return c ** n
https://github.com/ennorehling/euler/blob/master/BigNum.lua heres the library i used in case anyone wonders about it
:3 i might need some context on whats a, b and n
i see d and c in there too
a is the first number in the list, b is the second one and n is what you are elevating by
oh wait it just concatenates the numbers and then calcs, i should've read lol
sorry, well hope you sleep well!
when concat'ed bignums can very frequently go above the limit of nums unfortunately
yeah no worries, gn :3
why does my game crash when it starts (most recent changes)
this approach to representing bigger nums just seems weird to me
just wondering why you chose it
Is para your mod prefix?
yes
How do I get the Joker's X position?
the one with "e"?
dunno, thought that was the easiest way to go about with it
No, the [50, 500] = 50500
is it possible to return 2 different enhancements with quantum enhancements?
Yes.
local pos
for i=1, #G.jokers.cards do
if G.jokers.cards[i] = joker then
pos = i
end
end
```?
return {m_wild = true}
end
do i just add an AND to the return statement?
No, you would do return {m_wild = true, m_modprefix_key = true}
oh. though I was kinda looking for like getting the x and y positions.
Of what?
card.T.x and card.T.y
card.T.x
I'll try that and see.
and oh by the way, I've been trying to get the jpeg shader to work, while it did work but it didn't render the jpeg effect.
just to let you know
what would the v in the table be though? would i have to change these to v??? i mean it doesnt make sense but i guess? is it cause i have this? do i have to change the table insert to v here too?
it didnt send
why does my game crash on startup
No, the table.insert doesn't see any vs from its perspective.
what should i do instead, then?
it did work but it's at the top left area?
Have you tried printing the table?
I want it to like at the area where the joker is positioned.
the local table or the global one?
cause i print the global one each time with eval
What does it say?
Anyone know how to give the player a random buffoon pack?
hey, is there a way to give different number of repetitions to different number?
if context.individual and context.cardarea == G.play then
if context.check_enhancement and context.other_card:get_id() == 12 then
return {m_wild = true, m_lucky = true}
end
end
end
i added the first line after adding the code on its own led to a stack overflow error, but now it seems to not be doing anything whatsoever
@daring fern apperently this is what's been going on
because context.individual and check_enhancement don't happen at the same time
Yes.
how would I do it?
anyone know?
im trying to do it but its like it gets one value and just uses it to all cards
what's your current code
How would I have this booster pack create jokers of only a certain modded rarity?
create_card = function(self, card)
return create_card("Joker", G.pack_cards, nil, nil, true, true)
end,
return { set = "Joker", rarity = "modprefix_key", area = G.pack_cards }

Have you tried looking at the Buffoon Tag?
how would i do that then? having just the if context.check_enhancement and context.other_card:get_id() == 12 then return {m_wild = true, m_lucky = true} end end instantly crashes the game when the joker spawns in
Log?
Apperently when I used card.T.x and card.T.y somehow it set itself to the top left corner not the position where the joker is.
as you can see here.
Code?
actually Y'know what
don't want to share the entire log unless you need it, but the log ended with
INFO - [G] ERROR LOADING GAME: Card area 'shop_booster' not instantiated before load
INFO - [G] ERROR LOADING GAME: Card area 'shop_jokers' not instantiated before load
INFO - [G] ERROR LOADING GAME: Card area 'shop_vouchers' not instantiated before load
INFO - [G] line not found
this is the joker I've been making
What SMODS version do you have?
I know there's some code that I'Ve gotten reference from the yahimod which is an idea to learn also.
i have beta-0611b
was there a patch in a more recent version?
What mods do you have?
a couple, let me try turning off my other ones
i've turned off everything except for debugplus and my mod, it still crashes when i spawn it in
Did it work while only returning 1 enhancement?
just tried it, nope
What is the full joker code?
SMODS.Joker{ --Queen
name = "Queen",
key = "queen",
config = {
extra = {
}
},
loc_txt = {
['name'] = 'Queen',
['text'] = {
[1] = '{C:attention}Queens{} count as both',
[2] = '{C:attention}Wild{} and {C:attention}Lucky Cards{}',
[3] = 'and cannot be debuffed'
}
},
pos = {
x = 0,
y = 0
},
soul_pos = { x = 0, y = 1 },
cost = 20,
rarity = 4,
blueprint_compat = false,
eternal_compat = true,
unlocked = true,
discovered = true,
atlas = 'CustomJokers',
loc_vars = function(self, info_queue, card)
return {vars = {}}
end,
calculate = function(self, card, context)
-- When hand is drawn
if context.debuff_card and context.debuff_card :get_id() == 12 then
return {prevent_debuff = true}
end
if context.check_enhancement and context.other_card:get_id() == 12 then
return {m_wild = true}
end
end
}
let me show you when I put card.tilt_var.mx and card.tilt_var.my
I think it's because card:get_id() calls SMODS.has_no_rank which calls SMODS.get_enhancements() which calls context.check_enhancement so it goes infinitely.
heya so uh, i'm trying to develop a mod basically from scratch, 0 coding experience at all. so i may need someone to show me the ropes of lua, and yes, i'm trying to understand shit through the main thread.
You have to check if context.other_card.base.id == 12
Is there a context I can check for the start of a new run?
it actually does this.
No, because you would have no jokers then.
So it would be useless.
im trying to make 1 joker count multiple enhancements and then give +3 mult for each one scored, if i wanted to count multiple woud it be adding commas and then more enhancements or would it be something like i have here
You can't have multiple calculate functions.
where would i put that? do i replace context.other_card:get_id() == 12 with that?
Yes.
ah
You would do what N' said.
thanks didnt see that
Now, how do I make it so that it can draw into gameplay
without being on the front
thank youuuu
You mean so it goes behind things?
well the behind the filter or CRT
just to seee that it's actually in game
guys how do i make a new type of consumables?
Is there a way to simply check if a listed probability happens or not?
I'm trying to make a joker that scales based on failed listed probability triggers
I could always brute force it and change every joker with listed probabilities to also return scaling, but it'd be nice to have this be compatable with future jokers I add
No.
anyone?
i could if you want
If you lack any coding experience then modding is going to be pretty difficult
As a first step
I actually meant like it was drawned in like how the joker is.
Perhaps the new functions in the next SMODS release could do that.
Code.org is super helpful
Lua would be weird to learn first because it's not used often
honorable mention to w3e for javascript
I can always use the brute force method which probably won't take that long. Only issue is that it won't be compatable with other mods
i mean, next school year i'm gonna learn how to use python, but i'm not sure if python and lua are similar so... i'm trying to get a head start
python is REALLY similar to lua
oh?
I suppose not every mod needs to be compatable with other mods
Yes, but when the new release releases, you could probably hook this function:
thanks!
i didnt know vremade did that
i see! yeah uh, might want to have some practice though because i'm trying to make a mod with several new seals, enhancements and a new consumable type
most of coding is done through trial and error and reading documentation
This my first mod anyway so I can always change things later or simply have it be a standalone thing
also looking at other people's code
i recommend looking at vanilla remade's code and the steamodded api wiki
pretty useful stuff there
Vanilla remade has carried me so far
Simply being able to look at how base game jokers function is a godsend
Glad we could help
I'm quite statisfied for whatI got the effect to work.
thanks mates, i appreciate it.
THAT LOOKS AWESOME WHAT
even though it's not %100 accurat enough but it's something.
Going for that Solitare win effect?
yeah.
that's what I was going for for this joker
Instantly recognizable, nice work.
Thank you
I’m looking for feedback on a potential SMODS Pull Request I’m proposing. The idea is a value scaling util function that takes into account global scaling modifiers and new contexts, but the concern is that replacing something as simple as adding to a value could lead to inconvenience. I believe it’s not an insanely drastic issue and has a lot of potential for more functionality devs could harness, but I still wanna know the thoughts of others https://github.com/Steamodded/smods/pull/774
being told "unexpected symbol near '='" and not really sure what's wrong? sorry if its obvious lmao i am very much just learning
could u expand the image a bit more?
out of curiosity if you wanted to create something that works like four fingers or shortcut, would the process involve doing the take ownership thing on a vanilla hand?
I've got this code, but the suit only resets after a played hand, so it always starts as spades, is there a good way to have it also reset at the start of a run, similar to ancient joker or castle?
calculate = function(self, card, context)
local message = false
if context.after and context.main_eval then
local valid_eye_cards = {}
for _, playing_card in ipairs(G.playing_cards) do
if not SMODS.has_no_suit(playing_card) then
valid_eye_cards[#valid_eye_cards + 1] = playing_card
end
end
local eye_card = pseudorandom_element(valid_eye_cards, 'willatro_eye' .. G.GAME.round_resets.ante)
if eye_card then
card.ability.chosen_card.suit = eye_card.base.suit
end
end
if context.before and context.main_eval and not context.blueprint and card.ability.chosen_card then
for k, v in ipairs(context.scoring_hand) do
if v:is_suit(card.ability.chosen_card.suit) then
card.ability.extra.mult = card.ability.extra.mult + card.ability.extra.mult_gain
message = true
end
end
end
if message == true then
message = false
return {
message = localize('k_upgrade_ex'),
colour = G.C.MULT
}
end
if context.joker_main then
return {
mult = card.ability.extra.mult
}
end
end
vanilla remade doesnt have ``tags.lua` 

Yes, I'm referring to the game code.
how do i look at the game code
most likely yes, maybe take ownership of a hand type? but thats just my guess
Mods/lovely/dump/tag.lua
No.
There is SMODS.four_fingers and SMODS.shortcut
i guess its like that?
Yes.
just realized that it would've synced well if the trigger happens and the animations
i mean yeah thats not really what im asking 😭 i mean like something that alters how hands are played, similar to those two jokers as an example
Then yes.
how do i make it so i can add a name to the custom consumable set?
What would I be putting in there to reset though? Since I'm not using a function.
b_key_cards = "" in Localization > misc > dictionary
so i just do this?
No, you need to keep _cards
strange but alright
It's because the one without the _cards is used for the badge.
huh
so just this
No, it's b_key_cards
Localization?
trying to figure out how I can like put the animation when the message shows.
Happens to the best of us
can you add funciotns to calculate effect so it can trigger at he same time when it triggers?
Could you rephrase sorry I’m not quite understanding what you are asking
I want the animation to trigger when the "Upgraded" message shows
I would imagine you just tell it to play in the same return you have to show the message
yeah
so uh theres a slight problem
Same as juicing a card
... yknow what? i can wait until september, i'll cook my ideas in the meantime
yeah.
return { message = ...,
func = function()
-- start?
end
}
```?
Put it in an event.
I’d recommend having it give the reward at the end of a round
Or that
and how do i have it be rewarded only after round ended?
context.end_of_round and context.main_eval
tried that but the animation played just before as the card just juiced_up
wait I'm gonna try something
You would put it in an event in the func
like this?
return {
message = localize('k_upgrade_ex'),
colour = G.C.MULT,
func = function()
-- start?
end
}something like this?
is this something that you didn't get?
something like this?
No, it needs to be in an event in the func
No, put the check out of the event.
so how it would be like?
I need to have an idea if it's instant
or how would it be instant?
hold on.
func = function()
G.E_MANAGER:add_event(Event({
func = function()
return true
end
}))
end
I think I figured out
