#💻・modding-dev
1 messages · Page 251 of 1
return {
descriptions = {
--...
Back = {
b_tecci_stone = {
name = "Stone Deck",
text = {
"Start run with",
"{C:attention}52 Stone Cards{}",
"in deck"
}
}
},
}
}
``` why isn't this deck localization working? It just says ERROR in game. I've checked and the key of the deck is `key = "stone"`, so I don't see why it's not working? (also why tf are decks called Back)
you forgot your mod prefix i believe
it's there tho?
wait what
💀💀💀
I think they're called "backs" because the art is the back of the card
sent the solultion in dms
I'm cross-referencing with another mod that I often look at to see how stuff is done (Prism) and they seem to do it the same way? ```lua
return {
descriptions = {
--...
Back = {
b_prism_purple = {
name = "Purple Deck",
text = {"Can use {C:chips}Hands{} and",
"{C:red}Discards{} interchangeably",
"{C:inactive}(Can discard using hands if no",
"{C:inactive}discards left and vice versa)"
},
},
}
}
}
only that their's works and mine doesn't for whatever reason?
and for the actual back definition the key is also key = "purple"
how are you defining your actual back?
It's like this ```lua
SMODS.Back {
key = "stone",
atlas = "teccidecks",
pos = { x = 0, y = 0 },
apply = function (self, back)
G.E_MANAGER:add_event(Event {
func = function ()
for i = 1, #G.deck do
G.deck[i]:set_ability(G.P_CENTERS["m_stone"])
end
end
})
end
}
and your prefix is definitely tecci?
SMODS.Back {
key = 'berry_holder',
loc_txt = {
name = 'placeholder',
text = {'{C:purple}"placeholder"{}',
"Start with a Deck",
"with every {C:attention}Face card{}",
"replaced with {C:attention}Queens{}",}
},
atlas = 'Deck_back',
pos = {x=1, y=0},
config = {only_one_rank = 'Queen',
unlocked = true,
discovered = true
},
apply = function(self)
G.E_MANAGER:add_event(Event({
func = function()
for _, card in ipairs(G.playing_cards) do
for _, card in ipairs(G.playing_cards) do
if card:get_id() == 11 or card:get_id() == 13 then
assert(SMODS.change_base(card, nil, self.config.only_one_rank))
end
end
end
return true
end
-- function = SMODS.change_base(card, suit, rank)
-- for _, card in ipairs(G.playing_cards) do
-- if card:get_id() == 11 then
-- end
-- return {card, nil, only_one_rank}
-- end
}))
end
}
how I do mine
this might be a stupid question but did you name your localisation file correctly
very very weird
ok so
I am
very very
stupid
I thought misc was inside descriptions
so I just put it above it
but
it's fucking outside
That'll do it
mfw forget return true at end of event func
infinite loop
ouchie
G.deck is the card area for playing cards in your deck
G.deck is the card in the deck 🙂
yeah but for some reason changing G.playing_cards works and G.deck doesn't even do anything
like for the deck and setting the cards you get at the start
I think playing_cards is all of your cards while deck is cards that aren't in play yet
a puzzle:
to make certain ui elements blue, i'm patching where it sets stuff to G.C.RED in UI_definitions.lua and in most cases, switching out G.C.RED with G.C.SECONDARY_SET.UIDefault or G.C.RED. G.C.SECONDARY_SET.UIDefault is set by my mod in its main lua file, as part of the Game:main_menu(change_context) hook to G.C.SECNODARY_SET.Spectral before the original function is called.
and it should work because as i show, it works for UIBox_button(args) and specifically only the deck create_option_cycle patch. the other patches are taking, for jokers, vouchers, tarots, spectrals & boosters - but for some reason, all of those are ending up as shown in the first image with the spectral example and post-patch UI_definitions.lua where the cycle remains red. ...but it works for the decks one.
what am i doing wrong?
where and what would i be looking for 
in smods-main I think
maybe even lovely could let you see those overrides
if you dump-lua
does it not matter that the code i'm showing is the dumped lua?
But yeah just start poking around in the src files in your smods install and see what you can find
what are the different pool types?
have i found my culprit?
remind me how i target smods files with the patcher again right, i use the id _ for smods files
Gold star for you for writing a comprehensive question showing your working.
Curious that the deck cycle is working. In your patch for the first image, try replacing G.C.SECONDARY_SET.UIDefault with a predefined colour like G.C.PURPLE to see if it's being overriden, or if UIDefault is nil for some reason
decided that i hate winforms so much that i'm switching to godot lol, this is so much easier, also makes it much easier to add the custom abilities and stuff (ignore the empty atlas settings i havent implemented that yet)
That looks like a guilty function holding a smoking gun to me.
If that's also in SMODS ui, then
[[patches]]
[patches.pattern]
target = '''=[SMODS _ "src/ui.lua"]'''
shouldn't i be using ''' to enclose it so that the " inside don't escape it early?
hmm how should I word everything in the shop being more expensive
how about something like All vouchers, cards and packs in the shop are dearer with X dearer if you're specifying exactly how much more expensive they are
how can I prevent a card from showing up in the shop?
price reduction vouchers don't mention vouchers but still affect them, you'd probably be fine leaving that off
All items in the shop are price modifier
honestly, they should
it's a little misleading
I think I will do All prices in shop are doubled
all prices in shop is a good way to put it
actually doubled is probably too harsh
increased by [percentage]
would anyone know how I can disable the shadow on the floating sprite? it kinda ruins the effect here
I've tried before but have never been able to get it working
that's good
if possible i'd also want it to move around a lot more like the hologram floating sprite
somehow I always mix them up in my head
is there a code editor/plugin for balatro mods
I don't think so
because the documentation sucks
Reading the code explains the code
like the source code? because ive been using https://github.com/Steamodded/smods/wiki/API-Documentation and like so much stuff is left out
kitty c:
how do i access the source code?
works 
use something like 7zip to open the .exe
unpack the exe file with 7zip
also how would I even do this
if you've already installed lovely, you can also go to go to the lovely dump folder which has all of the game code but with all patches applied as well, from any mods you have installed
much more useful to have around in that form
wait I found clearance sale code
if center_table.name == 'Clearance Sale' or center_table.name == 'Liquidation' then
G.E_MANAGER:add_event(Event({func = function()
G.GAME.discount_percent = center_table.extra
for k, v in pairs(G.I.CARD) do
if v.set_cost then v:set_cost() end
end
return true end }))
end
``` hmm
I'm mostly memeing, but reading code is a skill worth practising, and can lead you to discover a lot of undocumented functions. Ideally there would be no such thing as undocumented functions, but 🤷♂️
Definitely try and familiarise yourself with the Balatro codebase to start. For SMODS, might be easier to read the code of a few other large SMODS mods to see what's possible
what in the fuck is G.I.CARD
v:set_cost is just updating the items themselves, the real thing is G.GAME.discount_percent, the value for center_table.extra here should be in game.lua
i've been trying to read other mods, but they don't do what i'm trying to so it doesn't really help for my use case
yeah extra = 25 for clearance sale
ideally if you don't want to stomp the voucher behavior, you can do G.GAME.discount_percent = G.GAME.discount_percent * 2 to double prices
though, that's still difficult because collecting the voucher will reset it
yeahhh
i've been meaning to make a mod that makes all voucher behavior (where applicable) stackable instead of directly setting
for weird cases like this where it just resets the value to whatever is "expected" instead of actually changing the value in the way it says
could I theoretically like make a new variable in G.GAME for base price percentage and then override Card:set_cost to use that instead
I think so but it might make some mods not work if they do a similar thing
Does anyone know if there's any sort of way to listen for the card add_to_deck function? I want to listen to it for any joker/planet/arcana card
Brief overview of the codebase here: #1349064230825103441 message
might not actually be too hard of a patch?
I keep getting an error code about indexing a nil value when I run this
I copied this from the blue seal code
something like this should work, and you can set G.GAME.prices_multiplier to whatever and it'll work, so for example G.GAME.prices_multiplier = 2 would double all prices
what line is it saying the nil value is at?
It doesn't give me a line
can you show the crash log
okay what's on line 2295
I don't have that many lines
ah wait that's crashing in common_events
this?
okay that's the create card function, not entirely sure why that's crashing here?
oh
I see
do you think I have to reset the variable every time a run is started or smtn?
like will it carry over if I don't do that
I think so
G.GAME values are reset
the "or 1" is to ensure that if it's nil (i.e. you haven't set it yet) the multiplier will be 1
storing values in G.GAME is extremely useful
Here's the full log
(7) Lua method 'calculate' at file 'main.lua:385' (from mod with id SaltPanasco)
@errant fulcrum check main.lua:385
Thats this: SMODS.add_card({set = 'Planet', key = '_planet', area = G.consumeables})
what is _planet supposed to be ?
uhh so how would it know that that's what you're looking for ...?
from this
right now it's just trying to create a card whose key is literally _planet
omg
you have a variable called _planet
remvoe the ' that are around _planet
that's not a variable right now, it's a string
nice, that seems to work
now I just need to figure out where voucher and booster pack prices are set
probably bcus you've been spending too much time programming lol
nvm it doesn't
i think i got how to detect when wheel is used but how do i change what the wheel will do?
ok now it works ```toml
Base Price Percentage patch
[[patches]]
[patches.pattern]
target = "card.lua"
pattern = "self.cost = math.max(1, math.floor((self.base_cost + self.extra_cost + 0.5)*(100-G.GAME.discount_percent)/100))"
position = "after"
payload = '''self.cost = math.max(1, math.floor(self.cost * ((G.GAME.base_price_percentage or 100) / 100)))'''
match_indent = true
times = 1
So apparently my issue was using G.GAME.hands[context.scoring_name] where I should've used G.GAME.last_hand_played
how would i go about adding an optional clause to a joker's description, similar to invisible joker / ankh's "remove negative from copy"? trying to decipher how vanilla balatro does it and i feel like there's surely a cleaner way to implement it
figured this out, using patches
what is the SMODS preferred way to increase rank of a card
any time I've set a rank I copy/paste and modify the Strength code...
i'm trying to do '█' type characters in game for a future implementation of a custom joker i want to make, and i realised that just pasting the █ character into a string to go into a joker's description doesn't work as it doesn't take it, so i thought of trying to do a similar effect using {X:[colour}, but it doesn't seem to be working
what exactly am i doing wrong? 
oh, i used the wrong character 
look closely at your )s and }s
hi. does anyone know how to make my own joker with the ability like the joker mr. bones?
I'll check, thanks
return saved = true
i think
Where exactly is this in the code?
i don't think that's for your problem, that was for the question they had about SMODS's preferred way of changing rank.
try working with context.game_over and use return { saved = true } as mentioned
it's what you return from calculate()
you return it in calculate
but what you threw me, logically, when I don’t collect chips, this joker should save me, right?
i don't know what you are saying sorry
Well, in Balatro there is a card, when you don't get points, you lose a life and you continue playing. I think it's called mr. bones. I asked if there is a code that implements this card, you sent a picture
its mr. bones?
picture is unrelated
issue is probably pool[i].sell_cost
is it card:set_edition or card.set_edition ?
is this a valid way to organise or should i be murdered
you should be put on a stake jk do whatever you wanna
that's my rule of thumb
my mod has a lot of files
i'm just doing this for ease of mind
where do the UI replacements go?
that's right!
the ui file!
oh i need to use card.ability.extra_value instead too
i'm using WinMerge to figure out what i changed and port
could anyone tell me what the difference between the 1x and 2x texture files are?
2x is twice as big as 1x
its literally just a larger version?
yeah
is there a reason the game wants a larger and smaller version?
is it just to make it easier to display the cards at different sizes using different sprites?
can't say for sure
alright. thanks for the clarifaction anyways
Hey! I'm trying to make a joker that makes Hearts = Spades & Clubs = Diamonds, while keeping it compatable with Smeared joker but I keep running into issues, does anyone have any idea why it's not working?
That... sounds like something I had done, actually.
Oh shit for real?
Though, I had done just the Hearts and Spades...
i love having to break smods so i can properly get aces working as a friends of jimbo pack!
🥳
mfw all that crashes was because e_manager wasn't capitalized
how does square joker render itself with a different size?
in smods would i change display_size?
ahhh no pixel_size
i think it's the px and py
pixel_size = { w = ?, h = ? }
pain
I've figured that bosses with lasting effects should prove to be difficult for players
Okay so I can't even do that
Fuck me I guess
smeared enjoyer?
I hate this accursed being
Okay somehow now every single card is debuffed during boss blinds & Smeared & Flower Transfer isn't working to score flushes... If anybody knows what is wrong I would really appricate the help <3
Is there a way to redirect certain jokers to a different tab in the collection?
woo 15 in 2 days im getting faster at this
Is there any way to force retrigger an SMODS.Blind's (collection_)loc_vars?
I do love my 4 of Aces
Trying to have the description of the blind update to show the most played hand, but once the blind is set at the beginning of the ante the description doesn't change
why the hell are you making aces a suit you're going to jail for balatro crimes
have it trigger on context.end_of_round
How would you get context in SMODS.Blind? /gen
None of the functions give a context object
And also I still wouldn't rly know how to have the blind re-read from loc_vars as I don't see a function to do that on the wiki
beCAUSE in the old version of the mod you could skin aces to be ones or elevens and evil fucking smods doesn't allow me to access that menu anymore without a suit
mwahaha
Is there any recommendable free software for making Balatro-style background music? (Especially for booster pack bgm)
LMMS is usually the defacto free music software
balatro's ost generally plays with advanced synths and eq stuff
for booster packs there's a lot of low-pass
a nice dose of reverb too
from what i understand there isn't any native support for cards that have multiple ranks. what are the obstacles in implementing that kind of behaviour exactly?
a somewhat hacky solution could be to make :get_id() return a metatable that has defined behavior for comparison
:get_id() usually accesses self.base.id.
self.base.value is for localization.
i'm talking about like. if i wanted to add an enhancement that makes a card count as also being 1 rank higher and 1 rank lower
that it'd be difficult to do that sort of thing
I think the big thing is the straight algorithm
the straight algorithm is also an issue, yes
we can extrapolate how it should work for arbitrary ranks though based on how aces work
3 2 A K Q not being a straight means it should look at values, not whether a chain of sequential cards can be made
I keep getting this error
there's a thread on the issues page about the straights problem https://github.com/Steamodded/smods/issues/449
This is such a simple issue but for some reason i have Jack Card, the code below, and Ace Joker that do not trigger their effect.
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.chips, card.ability.extra.mult} }
end,
calculate = function (self, card, context)
if context.cardarea == G.play and card.individual then
if context.other_card:get_id() == 11 then
return{
chips = card.ability.extra.chips,
mult = card.ability.extra.mult,
card = context.other_card
}
end
end
--calc end
end```
Im kind of stupid what do i do?.
I make the asset directory correctly with 1x and 2x
bros living in the future
lmao
are you Thai
i can just tell
uh this is just the year format That people use
really?
I actually did not know that
yep
I thought it was 2025 for everyone
we are 543 years into the future
Did we win World War III?
yeah
YESSSS
many places go off of different calendars
what is a balanced disadvantage for a deck with wild cards
debuffed by every single suit boss
I feel like wild cards themselves might already be a good enough one because boss blind might disable a suit and then you just basically die but
still going insane over this
every boss blind is either:
- The Club
- The Goad
- The Window
- The Head
I feel like that's a bit mean

no other boss blinds can be summoned
@tall wharf
like it kinda forces you to get a shit ton of standard packs
otherwise you're dead on ante 1
i mean
what's card.individual?
Are you sure you didn't mean context.individual
oh btw you'll need mod prefix in atlas
What if you discard? Like select 5 cards then discard
in other words ใส่ prefix mod ด้วย
wdym select 5 cards
Click on 5 cards
wdym lol
Like the opposite of deselect
if you are forced to select 5 cards
The boss blind is never deselect cards, but what if you discard
you'll not be able to select more
wdym discard
discard isn't playing so
The big red button
i don't know what you're trying to ask me
but discards aren't playing
so discards cards won't be affected
uh oh. my joker crashes when i go to the collection on the main menu'
im trying to have a voucher adds a card at the start of shop; but fsr it adds two cards and theyre really cramped together?
oh it was just a double voucher situation nvm but they still kind of just
stick together?
Yes
What that
(newbie here) how do i use this fucntion here in the consumables documentation?
[consumeable's behavior upon using]
end,```
make a var = G.jokers.cards or {}?
im confused on how you would use the parameters to like, for example, copy one card to another, simiar to how the death tarot card functions
Actually nvm idk
How could one increase the temperance and hermit cap?
you can :take_ownership() of them with SMODS and overwrite the config
in my attempts to fix it now we have the big fool
I tried that but it would not give me more than 50 dollars.
this works for me:
SMODS.Consumable:take_ownership("c_temperance", {
config = {
extra = 1
}
})
it also works with 100 instead of 1
and it works just as well with "c_hermit" instead of "c_temperance"
it's worth noting that this won't retroactively update any cards already in a save, only newly generated ones
ha .
pain
in the collection there is no G.jokers.cards
so it just says No and crashes
i'm going to bandaid this with a nil check
i'm so nil check pilled (it works
ooops safe isn't defined
wtf is that quad ends
How could one make a new entry on the collection that is not in the "other" tab?
Also how does one change the set of a joker but still keeping it a joker?
man trying to patch it so that x0 mult works only in specific circumstances sure is fun
Can anyone help please, still trying to fix this
Im going insane
do you have a x2 asset
Yes
try
path = "joker.png.png"
Okay
Still doesn't work
Same errors in the crash report
ayy ive patched in negative mult mechanically, now i just need it to show up visually
can you right click the asset and check the type
Okay
It's still a png
This error is actually gonna kill me
I even looked at other ppls repositories and I did the same thing as it doesn't work 🪦
dm the mod file and I'll debug if you want
Okay
-# another problem solved
Thanks again
i may be stupid but i cant figure out which code makes the little "+mult" popups appear above cards
and chips and xmult and such
Whats that
card_eval_status_text?
that sounds like it would be it
Btw what are some good softwares to make pixel art in?
i use libresprite
Ill check it out
I use photoshop right now
Ohh i was planning on buying that
It has a sale or something
oh damn
when are you trying to do this?
hm? im trying to patch it, at the moment it doesn't show anything when a card gives negative mult
like where is the effect coming from?
you just return mult = X
yes
you dont understnad im trying to patch the function
why
this
it already does that
for xmult
yes
no it doesnt i tried that
I'm pretty sure the only messages it won't show are 0 mult/chips or 1 xmult/xchips
well i mean i had to patch the functionality for negative xmult in myself so it makes sense id have to patch the message in too, and lo and behold when a card with negative xmult scores no message is shown
you definitely don't need to patch in that functionality
it's just supported by default
well i have the game open right now and no -xmult message is shown
should probably clarify im doing hand xmult specifically
h_x_mult
show your code pls
ok gimme a min
idk what code you want but this seems the most relevant
thast he same image twice
hang on
you should just use a calculate function instead of patching in a load of stuff
using values like that in config isn't recommended
so, return {x_mult = -5} in a calculate instead of config = { h_x_mult = -5}?
yeah that should just work
though -5 xmult is cursed and an absolutely awful effect
thats only for testing
it only gets that bad if you let it get that bad
it starts at positive x5
and gets worse the more you use it
I see
wow this works so much better than what i was doing
thanks
lol
ok so like. this doesnt work
is there any way of making a discarded card go back to the hand without just kiling it and making a new one
because killing it can trigger effects i dont want to trigger
I've did something similar recently
A card that goes back into your hand after you play it
Give me 5s, but it's going to require patching the game
Event timing I think
Also drawing cards the wrong way
So use Events and use the correct draw function
what's the correct function?
Either draw_card or CardArea:draw_card_?
I never remember if it’s from or to
But also Event timing
Is this achievable?
Probably
How do i make layered jokers?
how many layers
like the legendary jokers
idk it depends
2 or 3
and how do i apply shaders onto the layers too?
For Legendaries you just define the soul_pos
And you can define a custom shading step for the soul there
I don't have the dump on me so I can't exactly remember where it's going, but here's what I did:
# You - Disables card from being discarded by player
[[patches]]
[patches.pattern]
target = "functions/state_events.lua"
pattern = '''
stop_use()
G.CONTROLLER.interrupt.focus = true
G.CONTROLLER:save_cardarea_focus('hand')
'''
position = "after"
payload = '''
for k, v in ipairs(G.hand.highlighted) do
if v.you then
G.hand:remove_from_highlighted(v, true)
end
end
'''
match_indent = true```
Basically if the card has a special attribute (`you` in my case) then it just removes from highlighted instead of discarding
okay thankss
position like in the atlas right?
For extra layers it takes a bit more work
okay thanks
not sure thisll work for what i need but thx anyways :p
time to go remember how events work 👍
I mean that's a starting point at the very least x)
I have an example but I can only provide it later
okay
Cryptid does it too but it had an outdated approach when I checked
eh?
oh really?
i was about to open cryptids code to see how they did it
then i shouldent check it then
I remember talks of updating it
I mean, checking it helped me
The only part I've figured out how to do is to show the button.
then i should probably too
could help you
What I did was to define a new child sprite in Card:set_sprite then bundle the extra layer into Card.soul_pos.draw
I also had to do something to hide an extra sprite clone
But
If you want lots of these
The approach Cryptid takes to Exotics might help more
For now I just wanted one or two so I didn’t take a scalable approach
Cryptid does for some Jokers
(using SMODS.DrawStep)
okay thanks so much
i rebalanced the letter deck
i tried putting this in my code and now the enhancement wont show up anymore, i fucked up i think
What do you mean
i put that event in the discard event, and now the enhancement isn't in hte game anymore
Ah you probably made a syntax error
checked the logs, says a ) was expected near = on the draw_card line
should i just do nil,nil,nil,card or whatever instead of card=card
Yes
ayy it works
How could one do this?
soul_pos
oh shit someone else thought of imaginary numbers also
i love math
maybe it just multiplies your mult and chips with i
gives +i mult
that sounds practically useless
but if you use it another time
it will become negative
then 2 more times will bring it back to positive
wait hold on
i do plan on making a mod that fully adds imaginary numbers at some point
i know what to do know
it will mult chips and mult by 10i
so if u retrigger joker 4 times
how are you going to get the legendary to trigger 4 times
it will give u 10^4 mult
idk blueprint
thats a lot of blueprint
basically useless joker unless you can retrigger 3 more times
chicot moment
ohhhh awesomes
lol
so scary,,,,
implement?
adding them
mmm yummy gradients,,,,, it almost looks like the background has the voucher shader ehehe
idk
good idea
i need to add that onto the background
to make it even more rainbow
i think its more like. how is it gonna play in the game and have an impact
also id be surprised if it did support it
so u can flip the mult around
i hope
Are there any mods that do this?
idk
how do i get the current values for what the hand has scored so far? id like to check if the mult is currently positive or negative
oh i also want to know this too
does anyone know what this does?
it displays a tooltip when hovered
for telescope
when you hover on the text saying "this will display a tooltip when hovered"
as the other texts
strange
best joker description ever
loc vars allows you to feed variables into loc_txt
if you put "#1#" in loc_txt, then you can make loc_vars return { vars = {"text"} } and it'll put "text" instead of #1#
loc_vars should be a function that returns the table
heres my loc_text and loc_vars
tip: you should probably put all those in a localization file instead
so that people can translate your mod to other languages easier
thats coolll
id be surprised if anyone wanted to translate this mod, but ill keep that in mind
...also, why do you have both E:1 and E:2?
for float and spaced out obv
how do i do that?
im guessing they cancel out though then, if you're asking that
make a seperate lua file?
do E:1 and E:2 cancel out or were you just asking why im being extra lol
they do cancel out each other, yeah
i could have sworn mr bones does both
ill probably just do it later
the localization things
no mr bones doesn't do both nvm
context.joker_main is when the joker gets activated?
mhm
i wish you luck with the immense amount of patching you may be about to do
?
what number
the mult? in the score?
Brother it is a joke
You posted a picture about how math square root handles real number, opposite of real is fake, which is imaginary
im stupid
To be or be to with an answer of the question
My artists have finally been coming through and it's been delightful
lets all have a couch
where do you guys get art for your mods anyways
bepis i know you just rip assests fron hsr probly
i beg my friend to draw for me :3
Bepis, have a bowl
Make it myself
fair
Except for the Estrogen card. That was made by a friend
I get mine from a friend
I bribed them with 30 dollars worth of McDonald's to get it done
lol
I draw it myself or I request to use someone else’s art or I get given art
hes singlehandedly carrying my mod's art rn
❤️
🍚
mm rice
So, I'm trying to make a boss blind that self-destructs automatically when you play a hand, winning the blind in the process. Here's the code I have currently. The destruction of cards is not a problem but I can't get the winning blind part to work: it seems like the G.STATE never gets updated. I also tried with the calculate function in context.before instead of using press_play but it doesn't work either. Anyone got any idea on how I could get it to work?
What rice u guys like most
fried rice
you're telling me a fried this rice
the best thing to ever happen in this world is a bowl of perfect fried rice with some soy sauce
youre telling me a perfect fried this rice
shrimp fried rice
I think it might be closer to sticky rice
Than Basmati
ive never tried that before
but i believe all types of rice are good, unless you fuck up the cooking itself
I just kinda be eating it don't think i have a massive preference
Call me the muncher
you telling me a rice stickied this
The only rice I’ve had I didn’t enjoy much was Brazilian yellow rice
I mean I had it often
But I preferred white
ok back onto the actual real topic of this channel how do i get the current mult? i need to make sure that if the current mult is negative then an asbestos won't make it positive again
have you tried soaking it in rice overnight
Lmfao
We should also prob help out klg up there
would that be from the hand type the total from the hand type, jokers, cards, etc. so far
mult global
hand_chips and mult are globals.
Maybe see how DebugPlus does it
i draw in paint.net then downscale it in aseprite and fix it up
why is it not 0.33333333333333333333333333333333... chips instead...
Do you know in which file of DebugPlus that code is?
No
mmm maybe see how mr bones does it?
really cool art but WHY CAN YOU SEE STARS THROUGH THE MOON ITS A SHADOW THERES NOT JUST A HOLE IN THE MOON-
i see, continue
with blind calc now can you just throw the event in there minus the event
is this a snail?
thats a cloud ☁️
Is that Homestuck
i fucking KNEW it was a homestuck referecne
just in your calc do the
G.GAME.chips = G.GAME.blind.chips
G.STATE = G.STATES.HAND_PLAYED
G.STATE_COMPLETE = true
end_round()
thats a home 🏠 stuck 🔒
Mr Bones uses the game_over context. So, it doesn't need to change the game state.
hussie is a damn good cloud drawer
they are a very good snail drawer
aah
would you mind tossing over the blind code for me so i can just paste it in rq and test it out @dire palm
i cant unsee it :3
hes such a happy lil guy
see thats the fun thing ablut cloouds
you see things in them
BF i hate to alarm you but you may be a prospit dreamer
key = 'nuke',
loc_txt = {
name = 'The Nuke',
text = { 'This boss self-destructs','when a hand is played' }
},
boss = {min = 6},
atlas = "bosses",
pos = { x = 0, y = 6},
boss_colour= HEX("0ebb00"),
dollars = 5,
mult = 2,
config = {},
unlocked = true,
discovered = true,
press_play = function (self)
for k, v in pairs(G.hand.cards) do
if v.ability.name == 'Glass Card' then
v:shatter()
else
v:start_dissolve()
end
end
for k, v in pairs(G.consumeables.cards) do
if v.ability.name == 'Glass Card' then
v:shatter()
else
v:start_dissolve()
end
end
for k, v in pairs(G.jokers.cards) do
if not v.ability.eternal then
if v.ability.name == 'Glass Card' then
v:shatter()
else
v:start_dissolve()
end
end
end
G.E_MANAGER:add_event(Event({
func = function()
G.GAME.chips = G.GAME.blind.chips
G.STATE = G.STATES.HAND_PLAYED
G.STATE_COMPLETE = true
end_round()
return true
end
}))
end,
}```
awesome, thanks
Found the code from DebugPlus.
if G.STATE ~= G.STATES.SELECTING_HAND then
return
end
G.GAME.chips = G.GAME.blind.chips
G.STATE = G.STATES.HAND_PLAYED
G.STATE_COMPLETE = true
end_round()
end```
ayy ok ive got it so that asbestos cards will not reverse a negative mult
the one issue with asbestos cards is you can just. play them to get rid of them
ill figure that out later
How do I "upgrade" wild enhancement effect?
("That's the neat part, you don't!" is an acceptable but last answer on the table for now.)
I am NOT opening that can of worm, thank you.
perfect for somethin i wanna do
Does anybody know anybody that would be able to tackle this problem?
Bump
If you manage to get it to work properly. 
Anyway, I'm taking a break.
trying to go through the code, because i know there was an easy check but I can't remember what it was. Does anyone remember the way to check if a card is being displayed in your collection tab vs in game?
hang on i did this
lemme remember where
lol
ok this only works for editions but it should help: card.ability.set == "Edition" seemed to work for me
I remember doing it before, but apparently I haven't. I'll look around some more, because I know it exists, haha
hello ice
this worked for me for checking if it was in the editions tab of collections but idk what you need exactly
There's no need for the spawn quests for the legendary jokers to show up in the gameplay after all
yo yo dilly
there should be card.area.config.collection
yesss, that was it
ah thats handy
collection shows up in the movie metadata a lot so the search function got kinda cluttered 😛
Whats the nbame of the like mod that makes blueprint look like the joker its copying?
name*
blueprint+ i think
How could one check if a value of a joker is displayed on the joker?
i thiiiiiinkkkkk asbestos is fully implemented?? it can degrade if you try to destroy or discard it, it gives you the x5 mult that decreases each hand, the negative stuff works properly as far as i can tell
it took 9 discards to remove 5 asbestos cards from my hand
generally anything in center.loc_vars().extra is on the card considering that's all it's used for
no such person exists
why nil?
not passing the value properly through loc_vars
ohh right
i need to stop being dumb
i need to actualy lock in and code this properly
Is there any SMODS method to make soul sprite jiggle like Soul gem?
so a bit of trouble
I want the effects to do the following
- Gain 0.2X Mult per scored face card
- Give that resulting X Mult in the scored hand
- Destroy the scored face card
Right now it's upgrading but not giving the Xmult_mod for the played hand and destroying the last scored face card
Use the bonus stats provided by SMODS if you want the cards to be permanently upgraded
How would I incorporate that into this?
lovely variable names you got there
I mean, what stat of wild enhancement can I upgrade?
local this_card = context.scoring_hand[i]
if this_card.config.center_key ~= 'm_stone' then
if not SMODS.has_enhancement(this_card, 'm_steel') then
SMODS.add_enhancement(this_card, 'm_steel')
end
end
end```
you probably only want to be looking at ability.extra
how can i convert to steel here? is it this function or?
The art 
Make it count for suits that don’t exist 
does card.ability reference the config table?
But wild enhancement is already handled by has_all_suit = true.
this_card:set_ability(G.P_CENTERS.m_steel, nil, true)
Any mods that use shaders, that are simple.
Yeah...
ah its that instead! thank you jokerdisplay like always
okay thanks
But some jokers have variables not in there.
also no more Pokemon B&W pfp :0
i love namie's art but i wanted a change
that's an oxymoron
But it only counts suits that exist
And that means?
its a real struggle with pfps, i have like 10 in the back log when i get bored of this one
A dictionary is a listing of lexemes from the lexicon of one or more specific languages, often arranged alphabetically (or by consonantal root for Semitic languages or radical and stroke for logographic languages), which may include information on definitions, usage, etymologies, pronunciations, translation, etc. It is a lexicographical referenc...
Oh no I’m gonna forget you XP
in that case you would probably want to hook the loc_vars function and multiply the returned numbers by some value
hi guys!
When you make a custom hand, how do you inject that into the info queue?
I tried this PokerHandDummies technique and this looks like not the way
loc_vars = function(self, info_queue, card)
-- if nil ~= FoxMod.PokerHandDummies then
info_queue[#info_queue + 1] = FoxMod.PokerHandDummies["phd_fox_cosmocanyon"]
-- end
return { vars = { card.ability.extra } }
end,
How?
oh thats a thing i copied from aiko
And I copied that from you!
you need to make the dummy object yourself
BTW, my kids loved the Eldlich synergy from your dev release. Looks awesome!

Clowns all the way down lol
here's where i do all of that https://github.com/nh6574/JoyousSpring/blob/dev/src/others/PokerHands.lua
I put my custom hand in a hands.lua, I am wondering if that is running in the wrong order or somethng, because the hand works!
Is PHD only needed if i want to show the small virtual window of the card hand?
local old = center.loc_vars
function center.loc_vars(...)
local ret = old(...)
for ind, val in pairs(ret.extra) do
ret.extra[ind] = val * card.ability.extra.multiply
end
return ret
end
this won't affect the actual mult that gets applied, just what shows on the card
that's not a vanilla or smods thing, that's specifically something i made for my mod
It's very cool! Ok well in that case I will remove what I was trying to do, I thought it was SMODs related
are there any repositories that i should read and learn from?
Anyone have luck syncing a sound being played when a joker fires off? When I try, all of the sounds play at once overlapped
the SMODs docs are fantastic, then you should look at 'your first mod' where it recreates vanilla jokers using SMODs logic.
I also think Neato or ExtraCredit are great ways to learn
okay thanks
thank you
almost working! My hands ache to make the entire look of that info box a bit more custom, but that's more work than I should spend on it, haha
wait, does the localize feature not automatically fix up the colours?
that's a shame
no, you need to parse them first if they're not in a regular description table
Oh, that's... annoying
I thought it returned with colours and such applied and would just work in any node I'd shove it into
there's loc_parse_string
guess I'm looking into that. So glad someone actually knows their way around UI enough to help haha
I just manually color them
morning
omw to buy markers and fix it by hand
I mean that when creating the nodes you can choose the color
ok i managed to fix the scoring problem but it still only destroys the last scored face card instead of all scored face cards
that universally colours the text, no?
because individual runs for every card and then destroy_card runs for every card, so target_face always ends up being the last card
the individual context triggers first for every card, meaning that card.ability.extra.target_face will be overwritten every time, and only enter the destroy context afterwards, so it can only ever destroy the last card
it's easier to mark the card you wanna destroy with a quality, rather than store it on the joker!
you can just check if it's a face card in destroy_card
if context.other_card:is_face() then
return {remove = true}
end
should work?
ya
here's where i hook localize and init_localization to do it, then you can just add an extra field to the joker's description loc
https://github.com/nh6574/JoyousSpring/blob/a75a2da6225dcff778d0b0266f4caf4812d4e01b/src/card_ui.lua#L346
(localize would probably be cleaner as a patch so you don't have to copy so much code haha)
would it also have helped if i removed context.individual
I thought I'd be clever and pass them from the variable set, but that doesn't return tables 😬
I think you can do the message in the destroy_card context, so you wouldn't need it no
Thanks! I'm gonna look at this next week. Really don't feel like doing more UI messing around, honestly, so just gonna leave it ugly for now and make future ice (or is that water?) solve it
Back from my break. @modern kindle Did you find anything on how to make my blind work?
I'm thinking of making a 'Card Set' feature for Kino, so that even if I add too many jokers, there's still ways to play with reasonable pools of jokers. That way I could create some 'play sets' for jokers and consumables, but I'd probably set it up so that users could create them themselves easily as well.
I'm suspecting a feature like that might actually be a neat add-on for other mods that add a lot of content as well. If I make that a stand-alone mod, would people be interested in setting up compatibility with it?
that would be fun yeah
i was planning to do something similar so yeah i would use it
why isn't this tooltip displaying?
That's good to hear, that way I can more easily encourage you to do ui for it, 'N 😛
🙂
would this be how you implement a sound?
No, just sound = 'sound_key', will do.
It's working, and even spawning correctly! Only thing that doesn't work is the decade check, but that'll be an indexing error somewhere, I reckon
where is this text located
in a deck description
remy card spotted
how would i use code to store the keys of other jokers in a table?
the more I'm made to look at him, the happier I am with his art. He looks so friendly. I bet he and Perkeo get along
[SMODS Zui_Trial_Jokers "jokers/card.lua"]:286: attempt to index field 'other_card' (a nil value)
hmm so context.other_card:is_face() is a problem
he does look pretty jolly
if it's in destroy_card then it's context.destroying_card
ok actually lemme resay this
Does anyone know how i could reuse this code to pull the keys from all of the jokers in the game when the run starts rather than pull the ranks from the playing cards each round?
function SMODS.current_mod.reset_game_globals(run_start)
-- The suit changes every round, so we use reset_game_globals to choose a suit.
G.GAME.current_round.tester_card = { jselect = "j_joker" }
local table = {}
for _, v in ipairs(G.playing_cards) do
if v.ability.effect ~= 'Stone Card' then
table[#table + 1] = v
end
if table[1] then
local funny_card = pseudorandom_element(table, pseudoseed('ijiraq'))
G.GAME.current_round.tester_card.jselect = funny_card.base.key
end
end```
update i needed to put m_rendom_ not rendom_m_
G.P_CENTER_POOLS.Joker
and this will pull from all discovered jokers, not just the ones in your joker slots?
Oh, reckon Pokermon would have use for this too. I should check there too
If you want the latter, that would be G.jokers.cards
ahh ok
if context.cardarea == G.jokers and context.joker_main then
return{
message = localize{type = 'variable',key = 'Xmult',vars={(G.jokers and G.jokers.cards and #G.jokers.cards or 0)* card.ability.extra.Xmult}},
Xmult_mod = (G.jokers and G.jokers.cards and #G.jokers.cards or 0)*card.ability.extra.Xmult
}
end
end ```
im getting a message error here
and i cant see why
(im horribly blind)
yeah its this part
and this should run only once when the game starts, not every round correct?
just return xmult = X
ohp yup no end statement
ohmygod
ya missed one
Wait, which one is what you want? I'm confused.
im using code that resets it every round as a base, this
function SMODS.current_mod.reset_game_globals(run_start)
-- The suit changes every round, so we use reset_game_globals to choose a suit.
G.GAME.current_round.welder_card = { value = '5', id = 5 }
local valid_welder_cards = {}
for _, v in ipairs(G.playing_cards) do
if v.ability.effect ~= 'Stone Card' then
valid_welder_cards[#valid_welder_cards + 1] = v
end
end
if valid_welder_cards[1] then
local funny_card = pseudorandom_element(valid_welder_cards, pseudoseed('weld' .. G.GAME.round_resets.ante))
G.GAME.current_round.welder_card.value = funny_card.base.value
G.GAME.current_round.welder_card.id = funny_card.base.id
end
end```
err... what do i do?
i removed the .. G.GAME.round_resets.ante text from the pseudoseed in hopes it wont reset each round
this should reset only once when the run starts, correct?
is it in the right folder?
oh my god im stupid
its not working sadly
Still looking for answers.
yeah i see the crash screen at least 75% of the time
@runic pecan ?
it's still the same problem lol
whats the error code?
wdym
[SMODS Zui_Trial_Jokers "jokers/card.lua"]:286: attempt to index field 'other_card' (a nil value)
its not displaying the x2 (if there are 4 jokers for example)
can you paste the card.lua file here to see?
mmmm yeah you right, game might not like changing the score while a hand isnt being played
yeah you need to be in the selecting hand state
i made a similar eff like this
im looking at the smods wiki and i dont see other_card as a listed context
do you know for certain it exists and im the stupid one or
ooo ty!
other_card is a value in some contexts, but not in that one
yurp
so @opal holly, what are you trying to do when you check context.other_card:is_face()?
can you show your code?
ill show you the original one, in one second
so there are 2 things i want to do if the check is positive
- joker gains 0.2x mult per scored face card (settled)
- destroy scored face cards
"(folder of your mod)\resources\sounds\PixelP_finger.ogg" should be the right location i believe
if the folder doesnt already exist, make it
changing it to xmult will 100% work
hehe made it "sound"
it should be if context.main_scoring and context.cardarea == G.play then and then run the loop for k, v in ipairs(context.scoring_hand) do and an if statement below checking if v:is_face() then
they can just do context.destroying_card:is_face() !!
no but thats just for the destroyed cards
they said they need to scale the card by X0.2 mult first
they already did the other part
is that not what this is asking about???
thats what line 286 is
@opal holly do you need help formatting the destruction or the scaling
yeah i want to do upgrade -> destroy, I've done the upgrade, but the destruction part is where I'm facing problems
ahhhh
yeah then listen to n' i dont know about card destruction yet :B
just barely started ts
Wait
just return { Xmult = X } and get rid of everything else?
Isn't that just going to trigger something when a face card is destroyed (like canio's X1 mult) instead of destroying all face cards in a played hand??
btw just in case it's not clear X is your value, don't type "X" directly
no that's another context
ohhhh okay that got me confused
Yeah, n' is just smarter than me at this lol
yes
I started coding jokers like maybe 3 weeks ago on and off lmao
where X is your number ofc
Now off to do my OWN debugging, God help me.
sorry i just woke up hehe
i started 6 weeks ago 🙂
Did you have any lua experience beforehand?
i coded jokerdisplay last year yeah but also i program professionally
Yeahh I'm just a senior in HS with minor experience in Java & HTML/JS/CSS
So in basically learning lua from the ground up through trial and error from this lol
Literally
turns out it is not as easy as it looks
i went into this 2 hours ago with the steamodded wiki and a dream
i like when the game crashes from the start since you know you messed up somewhere BADLY, meanwhile if its like cards not working as intended then its trail and error
now i only have the steamodded wiki
ok SO
Imagine how good this'll look once I've drained all UI knowledge out of N and become the expert
how do i like change the image of a joker using the joker key?
like im making a joker that mimics other jokers, so by pulling keys, how can i change the joker's sprite to look like the joker's key i pulled?
Reckon It might look better if I wrap each condition in it's own little box, and maybe I should add the current rarity badge in there. And a separation line's probably good, haha
m
m
do you know this mr @red flower? youre very smart and cool so you may
you'd set the atlas, coordinates, and probably also the soul and soul coordinates based on that joker. You can grab those by SMODS.Centers[//joker_key//] and then just grabbing them from there
...
mhm ok ok thennnnnnnnnnnnn



