#💻・modding-dev
1 messages · Page 125 of 1
Ok well I tried some ways to do it, and I feel myself very dumb, but none of em work
oh wait
you cant have two messages yk
it'll just override the first one probably
Could use card_eval_status
Yeah, that's an idea, thanks
Oh wait you want 2 returned value
Uuh i cant fetch it rn but check SDM_0's Stuff Burger Joker, made something that returns multiple values
Ok thanks
wait, it might not work
huzzah
Does anyone know the exact event that occurs when a run is won?
https://github.com/Steamodded/smods/wiki/Guide-‐-Event-Manager has nothing on it.
I'm gonna take the approach of using the event manager
Ahaaaa, thanks mate :)
I see also the misunderstanding now xD
wait
event handle
This could help with my problem
limiting the joker only to activate at "enter shop" and "reroll"
Hey how do you just edit joker textures, not wanting to change much else
You can use any image edit software if you can access the textures.
I did that but I don't know how to get it into in them game it self
Just make sure:
1x: 71 x 95
2x: 142 x 190
File format: .png
Like i can't add it to the archive
you can use 7zip method or mod method
i couldnt get 7zip to let me do it so i just made mods
the mods are pretty easy
Is there a guide for mods then?
https://github.com/Steamodded/smods/wiki try looking through here
--- STEAMODDED HEADER
--- MOD_NAME: <your mod name here>
--- MOD_ID: <your mod id here>
--- MOD_AUTHOR: <Your Name (2016), great movie check it out, here>
--- MOD_DESCRIPTION: <your mod description here>
--- BADGE_COLOR: <your badge color hex code here>
SMODS.Atlas {
key = "<your key here>",
path = "<your joker texture file name here>.png",
px = 71,
py = 95
}
SMODS.Joker:take_ownership('<joker name from game code>', {
atlas = "<your key here>",
pos = { x = 0, y = 0 },
soul_pos = { x = 1, y = 0 },
--soul pos is if you want it to look like a legendary joker
})
you also need to have the folders set up right which isnt hard, and also 1x size and 2x size versions
It works! Thanks again <3
ah ok let me try it out
Found context.reroll_shop, but where's "enter shop"...?
when are context.cards_destroyed and remove_playing_cards called?
Canio does not seem to trigger when the face card is destroyed
why does the files become empty after uploading to github
context.cards_destroyed is fake
wdym fake
LMFAO
it's never called
moment
we love Caino ❤️
that’d explain why it never worked for me 😭
true
I can't tell sarcasm anymore 😅
true OGs remember when he was called Caino in-game
truly a consumeable moment
I'm not joking
what's your key?
i dont really know what it means but its like the name the code uses to refer back to it
so like you could just use "Skin" if you wanted to
probably best to keep it to a single word
oke
what?
sup
hey chat
sup
nun much wbu
modding my shit rn
sup
calculate = function(self, context)
if context.after then
if #context.full_hand == 4 then -- shamelessly stolen from square joker
-- and all this is shamelessly stolen from flower pot
local suits = {
["Hearts"] = 0,
["Diamonds"] = 0,
["Spades"] = 0,
["Clubs"] = 0,
}
for i = 1, #context.scoring_hand do
if context.scoring_hand[i].ability.name ~= "Wild Card" then
if context.scoring_hand[i]:is_suit("Hearts", true) and suits["Hearts"] == 0 then
suits["Hearts"] = suits["Hearts"] + 1
elseif context.scoring_hand[i]:is_suit("Diamonds", true) and suits["Diamonds"] == 0 then
suits["Diamonds"] = suits["Diamonds"] + 1
elseif context.scoring_hand[i]:is_suit("Spades", true) and suits["Spades"] == 0 then
suits["Spades"] = suits["Spades"] + 1
elseif context.scoring_hand[i]:is_suit("Clubs", true) and suits["Clubs"] == 0 then
suits["Clubs"] = suits["Clubs"] + 1
end
end
end
for i = 1, #context.scoring_hand do
if context.scoring_hand[i].ability.name == "Wild Card" then
if context.scoring_hand[i]:is_suit("Hearts") and suits["Hearts"] == 0 then
suits["Hearts"] = suits["Hearts"] + 1
elseif context.scoring_hand[i]:is_suit("Diamonds") and suits["Diamonds"] == 0 then
suits["Diamonds"] = suits["Diamonds"] + 1
elseif context.scoring_hand[i]:is_suit("Spades") and suits["Spades"] == 0 then
suits["Spades"] = suits["Spades"] + 1
elseif context.scoring_hand[i]:is_suit("Clubs") and suits["Clubs"] == 0 then
suits["Clubs"] = suits["Clubs"] + 1
end
end
end
if suits["Hearts"] > 0 and suits["Diamonds"] > 0 and suits["Spades"] > 0 and suits["Clubs"] > 0 then
return {
message = localize({ type = "variable", key = "a_xmult", vars = { card.ability.extra.Xmult } }),
Xmult_mod = card.ability.extra.Xmult,
}
end
end
end
end,
i stole code
and ion think it's workin
but it looks like it should work
many such cases
either a. im just bad at lua, skill issue, or b. im just bad at modding, skill issue
i have created the Weezer (flower pot + square joker)
is this comma supposed to be here (ive been modding for like 5 days)
it does nothing lol it was added by my lsp
so im a idiot was using winrar :)
i cant put logger messages in there bc like it gives an obj error
use 7zip fr fr
personally the zip method didnt work for me either with 7zip, though i think it was cuz of admin privlages stuff
i think you just go for context.joker_main here?
oh worm
yeh it worked 
its self.ability
ooooo nice card art
i just was bored and just wanted to put my sona there becuse im lame lol
ok its still fucked
nah thats cool
but remove_playing_cards isnt right?
whichj joker tho
oh jimbo
oh wait do calculate = function(self, card, context)
...fuck
bruh
(yes i stole the sprite from mystjokers temporarily as practice)
YES IT WORKS
thank you so much fellow interneters
gg
bonus round
can you add custom cards without remaking the whole card atlas
(playing cards)
look at these amazing art
highkey amazing
it works now but do I seriously need to eval like that...
i wanna test that mc mod fr
i think its to make sure other jokers that get a + on card destroy get properly triggered
download it in #1326135270759993364
danke
anyways @glass scaffold@dry merlin thanks for helping me 
o7
glad to help
Which version are you on?
I love reading the game code
Yeah that’s old calc, you’ll need 1307 and later
Is it the one gotten from the highlighted part?
Because I got the old-calc version lmao
Hi eremel I took this code from debugplus and I want to ask if this is the correct way to handle jokers like Canio
spin
Are you destroying outside of the normal scoring loop?
me?
here
oh
So... where did you upload the updated version again?
That’s the correct one the
Or is this the one
Can you screenshot your joker calc function?
Use the destroying cards context instead of after
It’ll handle all the destruction stuff for you when you return something on a card
but the joker is destroying the cards, not reacting to destroyed cards
Yes there’s 2 contexts
sixth sense comes in clutch
I had completely forgotten about it
The first one asks jokers whether the card should be destroyed or not
The second is reacting to the cards being destroyed
I updated it to the latest version and it's doing some weird stuff
thanks for the help 😄
calculate = function(self, card, context)
if context.cardarea == G.hand and not context.before then
local charged = card.ability.extra.stored_chips > 0
local chips_bonus = 0
local mult_bonus = 0
for _, handCard in ipairs(G.hand.cards) do
if handCard ~= card then
chips_bonus = chips_bonus + math.floor(handCard:get_id() * 1.2)
mult_bonus = mult_bonus + 5
end
end
if chips_bonus > 0 and not charged then
card.ability.extra.stored_chips = chips_bonus
card.ability.extra.stored_mult = mult_bonus
return{
message = "Charged!",
sound = "fm_jolt",
colour = G.C.BLUE
}
end
end
if context.cardarea == G.play and context.main_scoring then
if card.ability.extra.stored_chips > 0 or card.ability.extra.stored_mult > 0 then
card.ability.extra.stored_chips = 0
card.ability.extra.stored_mult = 0
return{
chips = card.ability.extra.stored_chips,
mult = card.ability.extra.stored_mult,
message = "Jolted!",
sound = "fm_jolt",
colour = G.C.BLUE
}
end
end
end
So this is one of my Enhancements, and I spawned it in with the debug tool, but if I select a different card or itself, the game instantly closes. No crash messages, no error logs, it just straight up exits instantly
I'm on the latest version of Steamodded, hopefully
@wintry solar Any insights?
Can you screenshot code instead, easier to read on mobile
What should the first part do?
I think the context is probably wrong, I can check back in an hour or so
Time to work 😢
When unplayed, it checks for the rest of the unplayed hand for their chip worth and add it to itself, also gains +20% additional chips for each unplayed card's worth, and also gains +5 for each one
context.cardarea == G.hand and not context.before seems off
As for this different Enhancement, it doesn't play the "Amplified!" message when the card is charged when it remains in hand after a play
when is that supposed to trigger?
When it's in hand, unplayed, and you played a hand without it
would anyone know why a chip joker/mult joker on playing card (like arrowhead or sin suits) wouldnt do the little jiggle animation when it activates (the playing card itself still does it btw)
i have a joker that makes a card evaluate itself multiple times. but for some reason, both the joker and the card use the return{message} info.
how could i get it so that only one of them uses the message?
another problem fixed :3
The Fuller House
no it took me a second to realise what had even changed 😭
wait til bro hears about cryptid's ascended hands...
made it work 💪🏽
i never played cryptid that's why
Consider that the name "Full House" came from "A couple and their triplets", I find this addition hilarious and concerning at the same time.
So what about 3 queens and 3 kings....
😨
trifecta
i found the template >:)
Polycule
how to make the stickers have different descriptions
for example:
On Joker: Prevents from Direct Removal Calls
On Consumable: Has Infinite uses, can't be selled
probably using keys
if on consumable:
var = keyA
else
var = keyB
return {key = var}
end
any steamodded devs able to explain what this percent is doing here? it kinda crashes my joker
function SMODS.eval_this(_card, effects)
if effects then
local extras = { mult = false, hand_chips = false }
if effects.mult_mod then
mult = mod_mult(mult + effects.mult_mod); extras.mult = true
end
if effects.chip_mod then
hand_chips = mod_chips(hand_chips + effects.chip_mod); extras.hand_chips = true
end
if effects.Xmult_mod then
mult = mod_mult(mult * effects.Xmult_mod); extras.mult = true
end
update_hand_text({ delay = 0 }, { chips = extras.hand_chips and hand_chips, mult = extras.mult and mult })
if effects.message then
card_eval_status_text(_card, 'jokers', nil, nil, nil, effects)
end
percent = percent + 0.08 # <<<<<<
end
end
it increases the pitch of scoring sounds
I mean I didn't add that
but I guess it's not a global so that makes sense
at the same time why are you even using eval_this
I'll take a quick look
cuz this was written before better-calc-2?
hm yeah percent is local to G.FUNCS.evaluate_play
yeah
per round?
anybody know where the 1x version of the Tarot cards are actually used in game? I changed all the 2x versions and not the 1x, and I've not seen the 1x (original) versions in game anywhere
remove the "per round" and specify hand selection
nice
i figured this out on my own i will now pat myself
good job lil man
So if I use smods.eval_this outside of a G.FUNCS.evaluate_play I crash.
Could just safeguard with percent = (percent or 0) + 0.08 inside eval_this? (sidenote on 0.08 being hardcoded instead of using percent_delta)
tho i don't know why blueprint doesn't work
when disabling pixel smoothing iirc
cause its add_to_deck and not calculate
just like oops all 6 and all that
makes sense
might as well remove it at that point
ah indeed, thnx
i can't catch the percent local out of eval_play and you can't pass it either
i mean the whole function looks out of place now, i guess I'll remove the percent stuff and mark as deprecated
it shouldn't be local though (from https://github.com/Steamodded/smods/blob/main/lovely/better_calc.toml#L1330)
# percent is global for use in SMODS.eval_this
[[patches]]
[patches.regex]
target = 'functions/state_events.lua'
pattern = '''local percent ='''
position = 'at'
payload = '''percent ='''
i mean the whole function looks out of place now
kind of, yes
keeping compat with old calls of it is good imo, being out of order is enough of a reason to not use it
hmm
i don't want to have a global percent
(this is in a consumable, trying to use new calc)
it's attempting to be https://github.com/Steamodded/smods/blob/main/lovely/better_calc.toml#L1330
oh i missed that
either way eval_this doesn't even use the percent
it just increments it unread
are you running talisman by any chance?
this alright?
k pushed
hi mom
hi mom
Thanks aure ❤️
Oh, and the utility docs should probably also specify that the function is deprecated
yeah fair
i asked for it because eval_this wouldn't pitch the scoring sfx otherwise
oh wait eval_this is deprecated nvm LMAO
let's go
Literally Cryptid
😭
May I ask why is it written with 'banquet place'?
washing machine rhythm game
So that's their actual name
Yeah I only remember them as washing machine ones
it still didn't lmao
lovely
Literally Cryptid
. lmao?
At least there are specific hand types added to the game
wgar
whar
what
Does Cryptid detect Flush Six or Flush Seven
or just count it as Flush Five despite you played your whole hand of Ace of Spade's, which usually is more than five?
cryptid has a hand for playing the entire deck afaik lol
touche(?
still absolutely lost on this ;-;
I genuinely cant read with that blinding white
it would increment percent but not use it for the text
Is this balanced? Using the set consumable it has a 1 in 4 chance of appearing in the first place
what version of steamodded are you running?
sorry about that
it has better durability and better mult, it should have only one prob
the latest one (i think)
well I can guarantee it's not the latest latest
though I doubt updating will fix it, try updating anyway?
yeah thought so
Its really hard to get it though, obtaining the joker which creates the consumable is like 1 in 11 i think
Cause they are not in the shop pool and depends on a tarot card to be created
this is basically hanging chad and photograph in a single joker, right?
yup
how do i make this talisman compatible?
the chehe (dont ask) variable is to prevent a negative chip value
wdym the message appears for both the card and the joker
hang on, i'll send a video
do you just have this in text for me
does it error?
I think you can just use tostring(...)
ok im just dumb good to know
I appreciate the JS-like attempt to just try to combine it with an empty string though
expected outcome is that the card is the only one that does the "It's You and Me" message
and not the joker
i'm sorry, i don't understand hahaha
when the iso ult actually works
just copy the code and paste it in this text channel
use this format:
```lua
<code>
```
calculate = function( self, card, context )
if context.scoring_name == 'High Card' then
if context.cardarea == G.play then
local cardreps = 0
for k, v in ipairs(context.scoring_hand) do
cardID = context.other_card:get_id()
--gets face value of card
if cardID == 14 then
cardreps = 11
elseif cardID >= 11 then
cardreps = 10
else
cardreps = cardID
end
cardreps = cardreps - 1
--return function
return{
x_mult = card.ability.extra.x_mult,
message = 'Again!', --the problem: the message is done by both the card and the joker
repetitions = cardreps, --repeat card evaluation equal to face value of card
card = card
}
end
end
end
if context.scoring_name == 'High Card' and context.cardarea == G.jokers and not context.blueprint then
if context.after then
G.E_MANAGER:add_event(Event({
trigger = 'after',
delay = 0.0,
func = (function()
for k, v in ipairs(context.scoring_hand) do
v:remove_from_deck(false)
v:start_dissolve()
end
return true
end)}))
end
end
end,
cheers
try adding context.cardarea == G.jokers in the first if
ah wait
what's up with it checking both High Card and the full context.scoring_hand btw?
wait, you don't even use k or v
it was to do with compatibility with the Splash joker
so it does the joker's ability to every single card scored
Ah, I see. I'm not sure that part works?
the return with the message is made in context.cardarea == G.play
Oh actually it might work, and the loop just does nothing
what
actually, i could try and remove the loop and see if it solves the problem though i doubt it
I don't think so
currently trying to add booster packs and im failing so hard 
yeah it didn't lmao
try this version?
calculate = function( self, card, context )
if context.scoring_name == 'High Card' and context.cardarea == G.play then
local cardreps
cardID = context.other_card:get_id() --gets face value of card
if cardID == 14 then
cardreps = 11
elseif cardID >= 11 then
cardreps = 10
else
cardreps = cardID
end
cardreps = cardreps - 1
--return function
if context.repetition and not context.repetition_only then -- # check for the right context
return {
message = localize('k_again_ex'), -- # use localization instead of the literal text
repetitions = cardreps, --repeat card evaluation equal to face value of card
card = other_card
}
else
return {
x_mult = card.ability.extra.x_mult,
card = card
}
end
end
if context.scoring_name == 'High Card' and context.cardarea == G.jokers and not context.blueprint then
if context.after then
G.E_MANAGER:add_event(Event({
trigger = 'after',
delay = 0.0,
func = (function()
for k, v in ipairs(context.scoring_hand) do
v:remove_from_deck(false)
v:start_dissolve()
end
return true
end)}))
end
end
end,
depends how hard is to get one of em
huh????
yup, that works now!
is there a message variable for cards?
do you understand what I changed and why?
This is the part where you share the part of the code that is not doing the thing so people can help you fix it, btw.
oh it might be the tostring not actually returning a string 😏
Is there a list somewhere of all the things that can go into the brackets in loc_txt? Currently I only know of X C and S
no this is a different thing i fixed it
it was a different message
oh alright
it's the additional context check, but there's a new context in that code i haven't seen (context.repetition_only) and i'm not sure what it does
but it still doesnt work
im trying to make this not say +-10
now its saying +-10 AND -10 for some reason
I think those are the only ones there are.
X C and S??? what are those???
it does
thats literally ascended hands
context.repetition is for returning repetitions, then context.repetition_only is for those repetitions, aka dont return repetitions in that contexts unless you want an endless loop
(afaik)
Background color, text color, and text size
thats a thing??
Yeah
wow
That’s how you get your joker description to have the cool text colors like with mult being red and chips being blue. (It might do stuff with other things but all I’ve modded so far are jokers)
i thought it was {C:chips}{} ?
Yes
they're talking about the first argument
OHHHHH
(took me a second too)
ok i get it now
awesome
why does my card show +-10, why doesnt it auto format to -10
fire
Flush seven 😭
up to flush 10 with more dupes
Quick regex search shows {C:, {X, {s:, {V:, and {E::
C:text colourX:background colours:text sizeV:custom text colour usingloc_varsE:DynaText (floaty text)
now we need flush four to flush one!
TRUE
{E seems to be for unlocks only is for DynaText (floaty text)
{V is for changing custom colors in loc_vars iirc
remove the message
Oh now I remember the V being in the example for castle
chips already makes a message
{E: makes DynaText
ahh bet
uh i thought it automatically did the minus message, though I'd have to check
yes castle uses that too
you can override the message with chip_message
so what i'm getting is that the first "if" condition is to return the message during the repetitions and ensures that the joker is the only one that does it
and the "else" sets the x_mult once for the entire evaluation
oh mkay it does that for editions only, weird
oh ok
urhm uhh
local pack1 = {
object_type = "Booster",
key = "Ascended",
kind = "Ascended",
atlas = "pack",
pos = { x = 0, y = 0 },
config = { extra = 3, choose = 1 },
cost = 4,
order = 1,
weight = 0.96,
create_card = function(self, card)
return create_card("Ascended", G.pack_cards, nil, nil, true, true, nil, "asc1")
end,
loc_vars = function(self, info_queue, card)
return { vars = { card.config.center.config.choose, card.ability.extra } }
end,
}
(the booster pack isnt appearing)
What I'm guessing the issue was with your previous code is that you were returning something usually messaged on the card (xmult), and repetitions (again!) which is usually messaged on the joker
So I just made sure I split them up into 2 different returns, preventing any overlap (and SMODS getting confused) between the 2
this might sound stupid but how do i import a module here
assert(SMODS.load_file("relative_path/to/file.lua"))() should do
ty
so the if is basically the joker's return and the else is basically the card's return?
imma play with the code more and understand more how it works; thank you so much!
Should be context.main_scoring and context.cardarea == G.play I think
I think so yeah. Good luck!
Ah right thanks for the heads up
I'll report back tomorrow morning
does it show up in the collection?
nope
thats the problem 😭
Why not use the SMODS.Booster?
what system do you have for loading your cards and why?
if you do this object_type shenanigans cryptid does, you need to have code to handle your objects
it's not the most intuitive and I'd suggest using constructors directly
never knew that existed 
that is probably very true
cryptid isn't the greatest mod to learn off of
that's even worse lmao
don't use 0.9.8 mods as reference
I'd recommend going off something like ortalab
thats why my code was broken for a bit
yeah thats what im looking at now lol
question now is
what do i do with smods.booster 😭
my 480x480 is goofed
if you want a successor to MystJokers just look at LobotomyCorp (it's a mess
real
you look at an example mod from steamodded and look at the wiki about it
ooo i found the documentation for boosters
- local pack1 = {
- object_type = "Booster",
+ SMODS.Booster {
key = "Ascended",
kind = "Ascended",
atlas = "pack",
pos = { x = 0, y = 0 },
config = { extra = 3, choose = 1 },
cost = 4,
order = 1,
weight = 0.96,
create_card = function(self, card)
return create_card("Ascended", G.pack_cards, nil, nil, true, true, nil, "asc1")
end,
loc_vars = function(self, info_queue, card)
return { vars = { card.config.center.config.choose, card.ability.extra } }
end,
}
-# ignore the fact that vanilla create_card shouldn't be used either
does ret.jokers for eval_card still use shit like mult_mod
i'm hooking to eval_card here
What’s the aim ?
holy shit its a booster pack
So it needs to modify chips mult and xmult?
dont try discovering it tho 😭
time to figure out what is wrong
There’s a full list of what is accepted in the utils.lua
Near calculate_individual_effect
oh thanks
I don’t remember the name of the table T_T
SMODS.calculation_keys = {
'chips', 'h_chips', 'chip_mod',
'mult', 'h_mult', 'mult_mod',
'x_mult', 'Xmult', 'xmult', 'x_mult_mod', 'Xmult_mod',
'p_dollars', 'dollars', 'h_dollars',
'swap',
'message',
'level_up', 'func', 'extra',
'saved'
}
That’s the one
i could've sworn h_x_mult was a thing
What uses h_x_mult?
steel? iirc?
I’m pretty sure steel works though
Oh it just gets added as x_mult in eval card
i have resorted to jimball
WHAT
time to rewrite a bunch of jokers that used eval_this before
i got too bored
real
literally just the entire fucking deck
do i need to use lovely patches for scaling bigger images down in joker rendering
not if you have 101 cards
more than that, most decks are like 52 cards lmao
the only thing i can find is https://github.com/MathIsFun0/Cryptid/blob/a64e91397b928a2a8bbaa2e056fab8e9eed929a9/lovely/ResizedJokers.toml#L46
unless you opened a LOT of standard packs
it actually scores btw
how do you even choose what cards you get though
does returning mult without message automatically use a_mult_minus message key?
i need your secret
this is so cursed i fucking love it
they probably copied the same one 99 times
what
ctrl + c with debugplus
yea
wait that exists
i did that
😭
like this joker is actually cracked
Handy
LOL
thx!
score at least 300 chips
the fact you added 95 hand types for 1 joker
Can't wait for flush one thousand
okay, i'll figure that one out later but-
is there an equivalent of context.other_joker but with consumables? so i don't have to use SMODS.eval_this anymore
is that mod public?
like the aikoshenanigans
changes not pushed yet
how can i check for a jokers name thats in the hand
i did reorganize files
if you are working with selected cards, best I can offer you is this
G.E_MANAGER:add_event(Event({
trigger = 'after',
delay = 0.2,
func = function()
for i=#G.hand.highlighted, 1, -1 do
local card = G.hand.highlighted[i]
if card.ability.name == 'Glass Card' then
card:shatter()
else
card:start_dissolve(nil, i == #G.hand.highlighted)
end
end
return true end }))
Change whatever is inside the for loop.
(taken straight from the game files)
do this but with baron mime 🫵🏽
+blueu printeu
that's not what i'm asking about
blueprint no worky
im trying to have it when a card is gained/lossed , it checks if it has the 4 modded cards are in the hand
next(SMODS.find_card(key))
what does next do?
It doesn’t use the minus message keys, no
💥
Can probably add a check for that though
question that i'm sure many have asked before, but which lua file has all the source joker code itself? working with a friend on an idea of mine and i want to see if we can locate the code for 8 ball since it relies on random chance, use it as reference
card.lua
it's all in there? good to know
if context.joker_main then
for _, v in ipairs(G.jokers.cards) do
if v.ability.lobc_censored then
...
end
end
for _, v in ipairs(G.consumeables.cards) do
if v.ability.lobc_censored then
...
end
end
return nil, true
end
basically i'm looking to replace this block, the G.jokers.cards one can be rewritten with context.other_joker, but what about consumables
I feel like i programmed this wrong but i am not sure
ModdedCardKeys = {'Tetra', 'Seabird', 'Convict', 'Tetra'}
SMODS.Keybind{
key = 'CheckJokers',
key_pressed = 'm',
action = function(self)
if G.jokers and G.jokers.cards then
for i, card in ModdedCardKeys do
print(next(SMODS.find_card(card)))
end
end
end,
}
game.lua contains the numbers
though remember that vanilla is different than smods so youll need to make some changes to be smods compatible
those are not the keys
assuming consumables, c_prefix_key
Hmmmm
ModdedCardKeys is a list of the names of the keys
these are custom jokers
Weirdly enough, effect still works with SMODS.Joker, so you can use that with Suit Mult to make a joker act like the 4 vanilla suit jokers. Its not documented in SMODS.Center on the wiki though.
ah, okay
it's not documented because it's Bad
exactly
Myst, would passing the consumables through that same context as the jokers work for what you’re trying?
Or maybe it should be a different context
Is using context.other_joker to refer to consumables confusing?
it would, yeah, since the effect i'm aiming for is just "Each consumable held gives [value] if [cond]"
it's Bad because it's Hardcoded
hardcode is bad. Offers no flexibility, which means interactions between that code and anything else will be...difficult. Annoying.
HUH
do you seriously just have 100 poker hands 😭
200*
why would you do this
Cryptid has a better framework for this, I know
I gotta ask, is there some sort of library available for SMODS? I'm using Notepad++ and have been watching this tutorial that has a bunch of drop-down / auto-complete references
may not be a technically correct question but im very out of practice
😭
i am not mr john cryptid
it's just a base feature of VSC i think
That doesn't mean you can't look at their code!
when you have the game's code and smods code in the workspace
(i didn't)
Half of coding is taking what other people made and adapting it to what you need.
I can second that. I adapted Cryptid’s method of updating values for The Clock for one of my Jokers
Ws
👁️
OPERATEING SYSTEMS
now that i have all the tools i need i can make almost everything :evim emojj:
have you made one for windows xp
there we go
any editor that has luals (https://luals.github.io/)
Lua Language Server uses the Language Server Protocol to offer a better Lua development experience for your favourite editors.
I’ll add it this evening 👍
which is all of them practically
Just 95, 98, ME and NT4 for now. I stretched myself thin on ideas for those 4 already.
Perkeo synergy gonna go nuts
can someone tell me how to write this 🙄
man, you guys make so much mods that no matter what i think of its already taken
swag, i need to sleep anyway
"Steamodded (>=1.0.0*~)"
gn
True, but it's definitely a bit more useful early game... not as effective late game. Maybe I'll rework 98 later.
thanks a bunch, its crazy the first example for newbies doesnt help
peakkkk
what am i suppose to make when every idea is taken lmao
not everything is taken lmao
and who said you can't do stuff other people have done
everything that i can think of
just think more smhhhhh
what HAVE you thought of...
the fun is in discovering how to make it yourself
make them again ig
nothing ive done is original
my whole steam library
games i got as gifts
games my friends play
games i like to watch on youtube
i have some ideas that i wanna make. unfortunately, i have a mod to maintain
even lobotomy corporation is taken, hell their sound effect is made as template
'unfortunately' doesnt bode well
LMAO SORRY
sorry for what?
basically taking the entirety of lobcorp lol
fuck
at least ruina is partially free, and limbus is completely free
lethal company cards whe-
explodes
oh wait you the modder of it? lmao
nice to meet you in person
your
even if i did, it could be any lobotomy corp fan aswell
how exactly do i do this in VSC? I just swapped to that and installed Luals (looks way better already) but not certain how to do this
OH
never mind
And the small cameo of the Space Cadet Pinball icon.
im looking at the cryptid source to see how they define custom loc_colours and I found this. Is the Code in this case the key for the Code collectibles?
G.ARGS.LOC_COLOURS.cry_code = G.C.SET.Code
yes
this should still be a flush 6 doesn't it
i guess mr john balatro would not expect it to go above that
theoretically 7oak is higher than f6
problem in my mod
because you need more resources
how the fuck do i arrange houses from this
true
ghelp i tried eveyrthing and still cant resize jokers
Oh more zodiacs I wonder what these ones do
do i just imagemagick
😭
:D i wanted to make the art because i knew it'd be fun, i don't actually have abilities though ^^
but i'll invent some!
modpack where only content thats similar between mods is added
I think im defining the color wrong, but im not sure which part (or if its all of it). I want it to use the color from the SMODS.Suit. How would I achive that?
-- Init color
G.C.SUS_SUS = { 0, 0, 0, 0 }
-- Setup Localiation Colors
local lc = loc_colour
function loc_colour(_c, _default)
if not G.ARGS.LOC_COLOURS then
lc()
end
-- Define custom colors
G.ARGS.LOC_COLOURS.sus = G.C.SUITS.Sus
for k, v in pairs(G.C) do
if string.len(k) > 4 and string.sub(k, 1, 4) == 'SUS_' then
G.ARGS.LOC_COLOURS[string.lower(k)] = v
end
end
return lc(_c, _default)
end
I don’t know if any zodiacs other than ortalab have even been implemented, it I can’t think of at least 5 different times I’ve seen them
have runes ever been done?
because im like 50% through with them and i havent thought to ask
How can i play a custom sound when destroying a card? I have a joker that i want to play a toilet flushing sound when it gets destroyed
also while im here, im gonna ask: Does this seem too powerful? like it should be less Xmult gain or instead be normal mult?
which card is destroyed?
The joker
ah the oker
I don't think it seems strong? I feel like it scales way slower than some of the vanilla xmult yokers
I tested it and wasnt fully sure because i realised im too used to finding flushes
and i destroyed almost immediately lol
does the hand type chqnge
No its only flushes
oh
including flush, straight flush, flush house and flush five
ive already got it destroying i just need to figure out the sound part really
something like this
if not from_debuff then
play_sound('prefix_flush')
end
end,```
do i have to create a sound like how i'd create an atlas?
it runs when the card is removed
ah hold on
ahh thank you
god what the fuck
this is so cursed 😭
yep
i am now trying to automatically make it create multiple flushes
this is the challenge
there ain't no planet cards for this shit tho it's gonna be painful to draw
imagine you had it also automatically generate drawings for planets
that's crazy
but what if
LITERALLY CRYPTID!!!
speaking of hands
Yeah, but I'd like to see them again cause codex arcanum is dead these days.
I think Codex is the only mod of note with runes?
i used this
SMODS.Sound {
key = "3xr_flush",
path = {
["default"] = "fish_flush.ogg"
},
volume = 0.6
}
and then the play_sound function with the same key. But its crashing and apparently its looking for that key in a resources folder. Is there a different function for playing an SMODS.Sound?
lemme check
i did this
remove_from_deck = function(self, card, from_debuff)
if not from_debuff then
play_sound("3xr_flush")
end
end,
am i supposed to not put the prefix in the keys?
just when i get the keys?
your mod's prefix that you specified in the json
the prefix is 3xr
alright
If key = "fish_flush", then play_sound("3xr_fish_flush").
ah right, remove the prefix from the key
your sound will be 3xr_3xr_flush
otherwise you need to write it twice
cause your key is 3xr_flush and your prefix is 3xr
yes
smods checks for it yes
you can disable the prefix if you want to but its mostly there for internal stuff
When a joker triggers off of a card scoring and you provide a message in the return table, the message displays next to the card. Is there another field to provide a message that will display next to the joker?
9 runes to go!
it wouldn't be self
probably card = card
self is the cetner
card = card makes the joker juice like I'd expect, but the message still shows beside the playing card
printaholic over here
Actually scratch that, it doesn't even juice up the joker, I'm doing that manually
DebugPlus has a lot of printing but it doesn't actually use print often
never used a breakpoint in my life personally
pro tip with DebugPlus master branch you can print(table) and it get expanded
Lua doesn't seem to properly have them
would card_eval_status_text work here?
is there a context.first_hand_drawn but for the last hand? i’m trying to make this mult only apply on the last hand of the round
check acrobat
we can't really know if it'll be the last hand or not
oh unless you mean hands == 1
if so iirc its G.GAME.current_round.hands
What smods version?
and i’d still put that in an if statement right?
oh it's hands_left
oh lmao
if G.GAME.current_round.hands_left = 0
idk depending what you want to do
assignment mentioned
if G.GAME.current_round.hands_left == 0 then
synyactical error mentioned
am tired. 🍞
grammatical error mentioned
everything is
i am dead
pretty sure anything that prevents the code from being compiling is considered a syntax error
it’s like the way dusk works where the retrigger only applies on the last hand
except with this i want the mult on the joker to only apply on the last hand
Just copy the dusk check then
yeah I saw that the way you do it is very interesting
It allows me in DebugPlus to insert a return statment to the beginning of your code, then I can check if it's syntax error and remove it
Have you seen what I've done in js to get a similar effect?
when I view this in the poker hands screen, the cards in the example render as blank. the Suit's card_key is SUS. does my mod prefix come before that, like prefix_SUS_A?
local base_sus_flush = SMODS.PokerHand{
key = 'Sus_Flush',
chips = 35,
mult = 5,
l_chips = 15,
l_mult = 2,
example = {
{ 'SUS_A', true },
{ 'SUS_K', true },
{ 'SUS_10', true },
{ 'SUS_5', true },
{ 'SUS_4', true }
},
no and i don't want to i hate js
i don’t know what the dusk check is…
luckily I only need the return in async statments
Open card.lua, ctrl+f Dusk
if you lose a shotgun just show me js code and ill find the first one in a thousand feet radius. it'll cost you a shell though
thsi functions does a lot
soon 🙏🙏🙏
when you eval love.keyboard.setKeyRepeat(true) (this breaks hold keybinds)
I probably could just turn that on and off automatically when console opened
however, I am lazy
its become habit for me to butterfly click the backspace button
me too
how is this a flush house
theres a flush, 2 twos, and 3 fours
3 4'S 2 2'S
where i2s the other 2 of spades
hold on
i am stupiod
ok it is a house
it is a flush and a house
thanks
its a flush and a full house
Hand evaluation doesn’t like extending the selected limit
all that a flush house needs to be is a flush and a full house
whether or not they're all the same suit doesnt matter
fair
me with a weird keyboard just spamming my repeat key
repeat key?
How do i check for a specific joker in hand
if SMODS.find_card(key) then where key is "typeprefix_modprefix_itemkey" so "j_joker" for the vanilla joker and "j_mymod_myjoker" for a mod defined with prefix "mymod" that made a joker with key "myjoker"
Thanks
I think you'd want #SMODS.find_card(key) > 0 cause empty lists evaluate to true
K
oh yeah
my keyboard has a thumb key that just repeats my last input
next(SMODS.find_card(key)) works too
wouldn't you just have to spam tap that too or
idk
meow
Is there a way to tell from context the total number of repetitions a card has?
oh
that's one of the few cases I actually use it for, I never bothered to learn to use to properly since I added it lmao
mostly because I don't think double taps are that bad
i don't think so, you should use a lovely patch to pass that info if you need it, alternatively use debug.getlocal
Oh I should implement ctrl + backspace
(I use it all the time I am just stupid)
also merry christmas (I just pushed key repeat in the console)
I was liek I don't tbhink delete works in the console maybe I should add that but then realized I don't have mvoing the cusor so it would be useless
on the seventeenth day of christmas wilson gave to me
wait i can't count
fourteenth
we made new ones up just now
Evidently, my ideas are very bad.
everyday is a day of Christmas (except the day before Christmas on a leap year)
me when I knew something was possible before I made the console but didn't implement it until someone compained
i think we could do it i remember one night me and 3 other fellas were in cryptid vc repeating the same joke with slight variation for like 2 hours
idk why
it was about doing balatro stuff in irl casinos and we just . didn't stop laughing
not me playing the entire fucking deck
how would vantablack work with psychic
sir you cannot summon omegatranscendent entities at this poker table
me shwoing up to the casino with my baron mime perkio cryptid steel kings
jen should make it so only one person on the planet can have kosmos at any given time
that would be really funny
balanced almanac fr ..
would make development hard
So long as all of the cards you’re playing have Vantablack, you can play less than 5
@everyone guys please stop playing the mod i need to test my kosmos change
But if there’s even one you play without Vantablack, fuck you go back to discarding i guess
oops
my dumbass turned my phone sideways
little blunder here
LMFAO
if I wanted to check if a hand has a pair, and that pair is the same suit (e.g. a pair of 2 of Ace), how would I format the if statement for that in the evaluate method in SMODS.PokerHand?
local flush_count = 0
for i=1, #hand do
if hand[i]:is_suit('Hearts') then
flush_count = flush_count + 1
end
end
if flush_count == 2 and next(parts._2) then
return { SMODS.merge_lists(parts._2) }
else
return {}
end
poker: table 0xdeadbeef
(if you had the master branch DebugPlus installed it would have expanded that)
Where does joker calculation actually happen in the game files? It's not in any of the places I'd expect it to be
card.lua
well
thats where the joker part of it happens
in Card:calculate_joker
Yeah, I'm thinking of what makes all of the calculat_joker calls
not sure bit I iirc evaluate_play calls it
I think i messed up y'all
idk where it is
How do i limit this to one
need more context
Alright
If I wanted to make a collectible that acts like a planet card, but stored under a different collectible type and with its own packs, would I need to recreate the planet card logic for them?
I feel like it's a bit too OP with stuff like OA6 making it a 1/2 chance effectively
to get the joker you need a special tarot card, which chooses 1 out of 12 jokers so its pretty hard to get
i dunno though
is this on a joker or a collectible
its a joker
I see
but i dont know if i should limit it
Must have room would be nice
I have a Joker I'm trying to create but I'm not really sure how the coding for it works, I've made a few Jokers already but I can't figure this out from the example Jokers
Does anyone know how to make a Joker that gives every other Joker a 1 in 2 chance to retrigger?
boredom
Heard
1 in 2 chance to retrigger all jokers and played cards
Oh well without the played cards part tho
you can just
remove the code that does that i don't know
And does Cryptid code the same way I have been?
¯_(ツ)_/¯
If it does I'll use it as my example
SMODS.Language{key = "en-us", path = "en_us.lua", label = "English"}
SMODS.Language{
file = "riskofsquares.ttf",
render_scale = G.TILESIZE*8,
TEXT_HEIGHT_SCALE = 0.83,
TEXT_OFFSET = {x=10,y=-20},
FONTSCALE = 0.11,
squish = 1,
DESCSCALE = 1
}
Gang
am I formatting this correctly
cause it keeps throwing me this error
oh wait
I'm looking at it now
Not what I wanted
I don't want a 1 in 2 chance to retrigger all
I want each individually to have a 1 in 2 chance
no, why do you have two separate calls to SMODS.Language?
the second table is supposed to the the font of the first
gotcha
I'm also attempting to change some aspects of en-us
for this mod
SMODS.Language{key = "Rainglish", label = "Rainglish", font = {
file = "riskofsquares.ttf",
render_scale = G.TILESIZE*8,
TEXT_HEIGHT_SCALE = 0.83,
TEXT_OFFSET = {x=10,y=-20},
FONTSCALE = 0.11,
squish = 1,
DESCSCALE = 1
}, }
this seems to let me launch
Ok, so I've gone and changed it to english, but it still won't apply the font naturally
have you switched to the language?
wdym
so ill click the english one
There's 2 English options
Ah
Even changing the name breaks it for some reason
uhhhhhhhhhhhh
wraparound straights don't exist
Game crashed, issue seems to be Cryptid.
Any help?
now all i have to do is figure out how to make it load a custom language file
like a modified en-us
any ideas, my g?
it should do that automatically if you name the file after the language key
rewriting straight logic just for a silly mod
anyone? is there a support server for cryptid?
so the directory should be assets\localization\en-us.lua ?
alr
cryptid has a tendecy to crash, it could litterly be anything
no assets
localization/en-us.lua
like adding a description?
yeah, whatever you made the game recognize it as
@crisp coral can now use context.other_consumeable to check the consumables that you have (thunk spelling lives on)
I'm trying to use a string variable in a description and it keeps giving me nil
right now I'm just trying to make it display a string at all and it doesn't seem to want to
are the variables in your loc_vars function?
oh does it call from that
done for today
it's called m6x11plus
oooooh
awesome
I'm using it in photoshop but it tries to anti-alias it or something so it looks blurry
any ideas on how to make it more like the one on the left?
never mind got it I think
rn I'm using add_to_deck for this joker does anyone know what function is called as soon as a joker spawns
basically I just want to call the function whenever the joker is spawned in so if you check it from the collection it will do this function and give you the right information
does anyone have a K in the legendary font
none of my mods have a legendary with K in its name
does it use the same font as the tarots I don't remember
perkeo?
fuck
i am genuinely stuck
someone please help me rewrite the straight evaluation algorithm
maybe just giving a lot of value to single straight flushes
how does context.destroying_card work exactly
do you need to reimplement everything or would a lovely patch work better?
the existing implementation doesn't work well when you select more than 5 cards at a time
ah gotcha, that's fair
