#💻・modding-dev
1 messages · Page 612 of 1
no
fuck
is there a context for entering the blind select screen
no but there's one for exiting the shop which might be the same
since i literally do not get how to get it to not reset after clicking the cash out button at the end of round screen
i guess that works but i dont want the scoring calculation screen to change between default and my deck specific one every time you enter exit shop
yeah thatd work
evil hook where i modify what happens when you click the cash out button :clueless:
maxbo-ism
Can I bump an issue that seems to be some sort of conflict between my mod and the multiplayer mod?
yes
I'll give that a test
Yes it is
Since the issue seems to be apparent when my mod comes into play
It's incompatibility with latest smods and MP preview
Oh
Well that would be a nice patch later in the future
Yea it works but now I might just fix the phantom edition spawning from my deck effect
raaah the best i can get with states is it flashing back and forth while transitioning to shop
ts pmo 🥀
check_for_unlock = function(self, args)
return args.type == 'win_deck' and get_deck_win_stake('b_checkered') > 1
end
is there a reason why it isnt unlocking?
raaah
Have you tried printing get_deck_win_stake('b_checkered')?
I could do that in a moment doing some excersing with the wiifit
I dont understand why I crash
i suspect your loc_vars return is fucked
yeah probably
But im trying to switch my upgrade check to the card itself so people can implement them by easily
is it possible to have a enhancement detect if it returns to the deck?
Red Card kicks in when the player skips a Booster Pack. Is there any way to tell what kind of Booster Pack is being skipped?
Yes, hook CardArea:emplace
Yes, context.booster.config.center.kind
So, would if context.skipping_booster and context.booster.config.center.kind == 'Spectral' do the trick?
ok it flashes for a single frame now 🙏
i have no idea where in the code the change back to normal is coming from
Yes.
is there a way to force a specific boss blind order in a challenge deck besides just banning unwanted blinds? for example, making the manacle always the ante 1 boss, the wall always the ante 2 boss, psychic ante 3, etc.
G.GAME.perscribed_bosses = {}
G.GAME.perscribed_bosses[1] = 'bl_fish'
G.GAME.perscribed_bosses[2] = 'bl_flint'
G.GAME.perscribed_bosses[3] = 'bl_house'
G.GAME.perscribed_bosses[4] = 'bl_wall'
G.GAME.perscribed_bosses[5] = 'bl_serpent'
G.GAME.perscribed_bosses[6] = 'bl_psychic'
G.GAME.perscribed_bosses[7] = 'bl_final_heart'
essentially set G.GAME.perscribed_bosses (not typo) to a table containing each ante's boss
utdr code spotted
i love the deck that stops you from rerolling prescribed bosses for some reason
are yall aware of any mods that handle music in smart ways? (changing tracks at certain times, overriding vanilla music behavior, properly looped tracks etc)
The base steammodded implementation is barebones at best
I just want to add that to the vanilla seal 😭
all the ones i know use the smods functions
i mean v1 in the yahi mod over takes the blind and boss blind music to be music from the cybergrind
hotpot has a ton of music tracks
lobcorp is the only one i know that extends music functionality to sync lyrics
dk why eternals not modified
but it should be fine
ittl look a lil jank but ehhh
im back
@daring fern
It would be > 0 not > 1
lobcorp is sick ty for pointing me that way
awww shit it doesnt work with modded stickers
does this
just like w/ eternal
ideally the entirety of the stickers' displays would be rotated 90°
are you sending the rotation to draw_shader
also draw_shader is what im using here
doesnt work on anything but perishable and rental afaict
maybe eternal is drawn somewhere else?
yea and all modded stickers
Whyyyyyyy 😭
When I select a card with no seal it crash the game but if I select a card with a seal and one with no seal it doesnt crash
if G.P_SEALS[selected_card:get_seal()].giga_data.seal_upgrade then
its this line but I dont understand
giga_data might not exist sometimes
do if G.P_SEALS[selected_card:get_seal()].giga_data and G.P_SEALS[selected_card:get_seal()].giga_data.seal_upgrade
no i think its selected_card:get_seal() returning nil
ohh true
and then indexing on the nil value
oh so I add a condition like if G.P_SEALS[selected_card:get_seal()].giga_data
because thing[nil] doesnt exist
ok do uh
if selected_card:get_seal() and G.P_SEALS[selected_card:get_seal()].giga_data.seal_upgrade
ok
Am I cooking (I know it doesn't exactly follow tarot card "rules"
if selected_card:get_seal() and G.P_SEALS[selected_card:get_seal()].giga_data and
G.P_SEALS[selected_card:get_seal()].giga_data.seal_upgrade then
Thats the full condition btw
final !
woof
May anyone tell me why active_message returns "nil"?
config = {
extra = {
odds = 4,
ready_to_sell = false,
active_message = localize {
type = 'variable',
key = 'k_lapsems_when_ready',
vars = {
localize('k_active_ex')
}
}
}
}
i think localization is not loaded at that point
even if it was it wouldn't work when changing languages
When does localization kick in?
after the game finishes loading but that's not important here
you want to localize at the point you want to use the text, not before
why isnt the code transfering properly to the trib ingame im so confused
i dont think i did anything wrong
what is it doing
its not doing anything
is it just acting like vanilla or something else
i want the trib to be modified so instead of just kings and queens it uses jacks as well and before you say to use the is_face() thing i tried that it just broke trib entirely
I defined it within loc_vars instead and that worked.
thats a cool mechanic
ok but what does it do now, does it act like normal or does it do nothing at all?
do you have debugplus
yeah'
hmm actually it doesn't matter what I was going to suggest because I think this code should crash if it was being read
yeah no idea take_ownership is evil
okay im probably gonna scrap all the joker modifications i was gonna do
if take_ownership doesnt wanna work
i do have these ideas as well but like how do i code the majority of this LOL
You'll get there eventually. Also, funnily enough, I've also got a Joker named Hitman!
Mine's gonna be some unassuming guy holding up a pistol, à la Juggler/Drunkard.
And if you really do "know very little ab(out) lua", then you'd be well served to read through these pages.
https://www.lua.org/pil/contents.html
you should make the hand change after defeating the boss blind, so that you can make a strategic choice if you see it in the shop
I had considered that, but wanted the hand assignment to be a surprise instead.
that's fair too
i tried
dyslexia makes shit hard LOL
i tried making the jokermancy thing in jokerforge its time to painstakingly figure out how to make it not crash just to display the card ingame
oh dear god i am so fucked
okay i have the custom pool and an if statement that tracks when a joker is sold
i assume i have to get the joker key and add it to the pool
what exactly are u trying to do with the pool
(also do you have prior experience with programming and are new to lua or are you new to programming in general)
yeah jokerforge code is not very neat
if true 🔥
1: im tryna add the key of a joker that gets sold to a pool so it has a chance from jokermancy to be reformed in your inventory
2: im not rly new to programming, i used to do it a good bit a handful of years ago but im recently getting back into it and am very new to lua lmao
im tryna learn via the lua website but im dyslexic and can barely read any of it lmao
Joker forge spitting out 30 lines of code for 1 block
^
what programming languages are you familiar with
scratch and thats about it LMAO
even then im not very adept at scratch so
it does
because we need to track which jokers have been sold
config = {extra = {sold_joker_keys = {}}}
the {} basically tells lua that the data is stored in the form of
key: value
you're aware of for loops and lists, though
correct?
a list is just a collection of data
[1, 2, 3, 4]
has 4 items
okay yeah
and so u can access a particular item
by using list[2]
to get the 2nd item
in the case of lua
lists start counting at 1
other languages count from 0 for lists
mhm
You can also use 'em like dictionaries in Python.
config = {
extra = {
odds = 4,
ready_to_sell = false,
}
}
card.ability.extra.odds -- returns "4"
That's pulled from my Orange Juice I showed earlier.
in lua
the expression {}
indicates an empty table
which can act as either a list or a hashmap (which is not what we need right now, though lua lists act as hashmaps under the hood)
sounds ab right
list = {"joker_1", "joker_2"}
is a list of 2 strings (string is the programming term for text)
ya
to access a joker's config values you would check
card.ability.extra
ye i learned this from the other 2 jokers i made
okok
so if we set config = {extra = {sold_joker_keys = {}}}
as our initial config table
then card.ability.extra.sold_joker_keys
will initially be an empty table
i have this if statement
that hopefully will track when a joker is sold
i think
that checks if card.ability.extra.c_jokers_sold exists as a config value
ah
no
heres a grand list of all contexts
SMODS uses contexts to check whether effects should trigger or not
https://github.com/Steamodded/smods/wiki/Calculate-Functions
the relevant one is context.selling_card
okay gotchu gotchu
so inside the calculate function
if context.selling_card and context.card.ability.set == "Joker" and not context.selling_self and not context.blueprint then
-- the code inside here will only trigger if a Joker that is not this Joker is sold (provided this effect is not being triggered because of a Blueprint-like effect
end
alright
hopefully im not being too overwhelming
local jokers_to_create = math.min(card.ability.extra.cards, G.jokers.config.card_limit - (#G.jokers.cards + G.GAME.joker_buffer))
G.GAME.joker_buffer = G.GAME.joker_buffer + jokers_to_create
G.E_MANAGER:add_event(Event({
func = function()
for _ = 1, jokers_to_create do
SMODS.add_card {
set = "Bitter",
key_append = 'NxkooBreeder'
}
-- card:add_to_deck() -- these two are probably not needed, not the issue tho
-- G.jokers:emplace(card)
G.GAME.joker_buffer = 0
end
return true
end
}))
why does this cause the crash bad argument #1 to 'ipairs'
theres no ipairs
and the issue is not that the mod prefix isnt in set isnt the issue since I've tried both
theres also a bunch of different jokers in the set so thats also not a problem
is this another moment where i've looked over smth
whats the crash message
like the trace
I won't ask however I will judge
ill check if the crash is different with the prefix in set
D:
NOT THE HORSE
horse'd
can i see the bitter object pool def
💥
wdym
u tried to spawn a joker from a custom pool, correct?
istg do i need some SMODS.objectpool or smth
SMODS.ObjectType
i do have another issue thats similar i think
lemme get the code
nvm
i just forgot to finish the code
how do i get the center_pool for every consumable
local is_part_of_object_type = (card.config.center.pools or {}).modprefix_custom_pool -- See "How do I create a `pool/set?""
where is this in vremade?
a consumable can be a part of multiple pools
implementing a custom pool?
no with finding if its consumable
wait
no yes
no wait
getting all cards that are consumable
?
is the intent to spawn a random consumable?
yes
i see
specially 2
but doesnt matter
heres the entire calculate function
calculate = function(self, card, context)
if context.end_of_round then
-- main if statement
for _=1, card.ability.extra.cards do
-- card will look like {card = key, negative = boolean}
if #G.consumeables.cards + G.GAME.consumeable_buffer >= G.consumeables.config.card_limit then
-- check for space
goto continue
end
local other_card = SMODS.create_card({ key = pseudorandom_element(G.P_CENTER_POOLS[""], "glitchkatcard").key, area = G.consumeables })
other_card:set_edition("e_polychrome")
-- so we can skip the card incase
::continue::
end
end
end```
hold on im testing something
i got other bugs i can fix in the mean time
and if i think it works how it works
hi
thank you thunder edgeee
Omg its god
would I just put it as key?
i am shigure ui
🙏
right
oh i think its the misspelled version for the set
bit more than usual
should of only created 4 since i have bitter copying him
thats a bit odd
could be bitter shenanigans
SMODS.add_card({set = "Consumeables", area = G.consumeables})
yea i accidentally used create_card
wdym goto
this is a funny idea for a legendary joker dont yall think
this
skipping
ig i could make it return
wait
no
its a loop
i have to skipp to the end
pretty good yea
but its not that much mult
since it wont be retriggered as much as photograph or baron can
i was actually just thinking of making a rarity above legendary and make a few mythic cards to put into a super rare pack that has all 3 that you have to choose
and that wastumok would be one of those
i can buff it
true
oh i know why
u need context.main_eval in addition to context.end_of_round
you'd need to buff it through different means
oh what?
because context.end_of_round is called multiple times
maybe like it can trigger all the seals in the hand as well?
yea thats about right
context.main_eval ensures that end of round effects only trigger once
in other words what do yall think about this sticker
hmmm
yea
its hard to use but in a good way
makes you use hands you probably wont use if you're getting rid of cards that are in that hand
see stickers have the potential to add new gameplans
yesssssss
... what is jimbo doing in the consumable slots 😭
no idea
whats the code for the end of round card creation again
local other_card = SMODS.add_card({ set = "Consumeables", area = G.consumeables })
other_card:set_edition("e_polychrome")```
unless this is a different thing
no...
uhm
lemme just add the return
i know that sometimes people use the default jimbo sprite as placeholder sprite
gimme ideas
better so it doesnt accidentally create more than should be possible
but doesnt make sense on the multiple
calculate = function(self, card, context)
if context.end_of_round and context.main_eval then
for i = 1, math.min(card.ability.extra.cards, G.consumeables.config.card_limit - #G.consumeables.cards - G.GAME.consumeable_buffer) do
-- create cards here
end
end
end
try this???
bruh
could you join cold beans so i can show you?
im in cold beans
calculate = function(self, card, context)
if context.main_eval then
-- main if statement
G.GAME.joker_buffer = G.GAME.joker_buffer + card.ability.extra.cards
for _=1, card.ability.extra.cards do
-- card will look like {card = key, negative = boolean}
if #G.consumeables.cards + G.GAME.consumeable_buffer >= G.consumeables.config.card_limit then
-- check for space
goto continue
end
G.E_MANAGER:add_event(Event({
func = function()
local other_card = SMODS.add_card({ set = "Consumeables", area = G.consumeables })
other_card:set_edition("e_polychrome")
G.GAME.joker_buffer = G.GAME.joker_buffer - 1
return true
end
}))
-- so we can skip the card incase
::continue::
end
end
end
Wait, what's the ::continue:: used for? I've never seen anything like that in Lua!
cat
cat :3
its lua
ilovecars
it just skips to the next thingy
thats same name
its used in alot of coding langs
using goto instead of not is crazy
thats what im saying
im used to my continue in luau
can u give me the cato mod pls :3
chat thoughts?
Does Cliphtonyke function like Splash?
yes and no?
like you can play any and all cards you have in your hand like you dont have to worry about the selection limit
but it wont give a splash effect if you use it
so like
if you play a hearts flush and you have 2 spades in there the spades wont trigger
but the other hearts do
calculate = function(self, card, context)
if context.main_eval then
-- main if statement
G.GAME.joker_buffer = G.GAME.joker_buffer + card.ability.extra.cards
for _=1, card.ability.extra.cards do
-- card will look like {card = key, negative = boolean}
if #G.consumeables.cards + G.GAME.consumeable_buffer <= G.consumeables.config.card_limit then
G.E_MANAGER:add_event(Event({
func = function()
local other_card = SMODS.add_card({ set = "Consumeables", area = G.consumeables })
other_card:set_edition("e_polychrome")
G.GAME.joker_buffer = G.GAME.joker_buffer - 1
return true
end
}))
end
-- so we can skip the card incase
-- ::continue::
end
end
end
no cato mod
Mega stupid idea
bitter mod
yea?
wait public or?
bitter mod
link pls :3
if buggy its oke :)
thank woo
actually fk it ima make 2 more and plan up a good amount more legendaries
done
what do we think
also any other ideas for pnostia i have none LOL
also im gonna come back to this and instead focus on other small things i have planned like the vouchers and maybe even the stakes idk
<@&1133519078540185692>
<@&1133519078540185692>


How does a for loop work?
I mean i've used them but like how do they work

||nsfw better pls dont ban me me joking||
dev questions idiot
Okay okay
why is "attempt to index local 'center' (a nil value)" popping up when i use card:set_ability to enhance a card
first they for then they loop
let's for loop
4 loops
4 for loops made of of fours for looping the four 4s
for for for for
if not result_area.cards[1] then crrd = SMODS.create_card { set = "Base", enhancement = resultenhancement, rank = resultrank, area = result_area }
G.playing_card = (G.playing_card and G.playing_card + 1) or 1
table.insert(G.playing_cards, crrd)
G.result:emplace(crrd) else
crrd = result_area.cards[1]
crrd:set_ability(resultenhancement)
end
this is the snippet of code causing it specifically
its a bug with smods i think
n' told be one time
or was it eremel
lemme get it
that sucks
cant find
just like set it outside of create card
also you should use add_card instead so you can remove table insert and emplace
ill just try to put the actual center as the arguement
okay it completely breaks drawing hands for no reason
odd
well now I have a balala question, how do I set the seal, edition and enhancement of a chosen playing card
im doing```lua
crrd:set_ability(G.P_CENTERS[resultenhancement])
and the game shits itself
i think the not drawing cards was caused by something else which is weird
okay i checked the dump and im more confused now
supposedly its crashing at line 281, which is ```lua
if center.name == "Half Joker" and (center.discovered or self.bypass_discovery_center) then
H = H/1.7
self.T.h = H
but previous code also indexes the center
so its just breaking here for no reason
isnt that how you get them
robably should use center.key
then do
j_modprefix_jokerkey
lolll
please someone answer
card:set_seal("seal_key"), card:set_ability("enhancement_key"), card:set_edition("edition_key")
tyyy ampll,e
calculate = function(self, card, context)
if context.playing_card_added then
print(context.cards)
for _, other_card in pairs(context.cards) do
SMODS.change_base(other_card, pseudorandom_element{SMODS.Suits}, pseudorandom_element{SMODS.Ranks})
other_card:set_seal(pseudorandom_element{G.P_CENTER_POOLS.Seal})
other_card:set_edition(pseudorandom_element{G.P_CENTER_POOLS.Edition})
other_card:set_ability(pseudorandom_element{G.P_CENTER_POOLS.Enhanced})
end
end
end
why does this crash?
which line is 614
the stack trace should provide an exact line of code in this calculate function somewhere
i've checked through them and a majority is from tangents, aiko or from my own hooks
okay well its the seal's fault ig
oh
its cause i didnt add .key
new crash log 
this isnt right...
that line is for half joker
bold to test your mod with aiko and tangents installed
actually insane to test your mod with aiko and tangents installed
my mod edits tangents
and aiko cuz i forgot to change it
is this checking vanilla card.lua or lovely dump
uuh
like are you checking vanilla source or the card.lua found in the lovely dump
yea
ight
you mean the joker?
cause i'm not sure what you're really trying to do and your stack trace is a bit fucked up
whatever the file is that's crashing
unless you have everything in one file
ig just send the section if so
SMODS.Joker {
key = "yandev",
loc_txt = {
name = "Yandare Dev",
text = {"Added playing cards have everything {C:,E:1}randomized"}
},
pronouns = "he_him",
blueprint_compat = false,
config = { extra = {} },
loc_vars = function(self, info_queue, card)
return { vars = {}}
end,
atlas = 'JokeJokersAtlas',
pos = { x = 4, y = 0 },
rarity = "Bitters_baddev",
cost = 6,
pools = {["BitterPool"] = true},
calculate = function(self, card, context)
if context.playing_card_added then
print(context.cards)
for _, other_card in pairs(context.cards) do
SMODS.change_base(other_card, pseudorandom_element{SMODS.Suits}, pseudorandom_element{SMODS.Ranks})
other_card:set_seal(pseudorandom_element{G.P_CENTER_POOLS.Seal}.key)
other_card:set_edition(pseudorandom_element{G.P_CENTER_POOLS.Edition}.key)
other_card:set_ability(pseudorandom_element{G.P_CENTER_POOLS.Enhanced}.key)
end
end
end
}```
all on same file
probably separate your files eventually
thinking of seperating by rarity
thats a lotta files
nxkoo shouldn't have separated by rarity
you get used to it
also the amount of jokers dont really matter since they take up 2 lines atleast
using ctrl-k -> ctrl-0 will collapse everything
i'm not really sure what the issue could be because this should totally work
how many hooks do you have on those functions
you could always try changing to a for i = 1, #context.cards do loop
set_seal(), set_edition(), etc
oh, you'll probably want to use SMODS.poll_seal, poll_edition, etc
you may be setting variables incorrectly
it's still not really good practice
so how would I implement? instead of pseudorandomelement I'd do poll seal or smth?
separating into individual files makes things much easier to parse
card:set_ability(random_enhancement) -- Set an enhancement on an existing card```
which is why i have it be fully random
i guess i could just use poll
mmmm
if we cant find a way to fix it then i will
can you post the entire crash log
you never really gave detail on that aside from the vague starting crash message
if context.playing_card_added then
for k, v in pairs(context.cards) do
SMODS.change_base(v, pseudorandom_element(SMODS.Suits, 'seed').key, pseudorandom_element(SMODS.Ranks, 'seed').key)
v:set_seal(pseudorandom_element(G.P_SEALS, 'seed').key)
v:set_edition(pseudorandom_element(G.P_CENTER_POOLS.Edition, 'seed').key)
v:set_ability(pseudorandom_element(G.P_CENTER_POOLS.Enhanced, 'seed').key)
end
end
a seed isn't necessary but it was likely the missing .keys that i definitely should have picked up on
it did have .key?
not suit and ranks
No, it is.
nah nothing changed
calculate = function(self, card, context)
if context.playing_card_added then
print(context.cards)
for _, other_card in pairs(context.cards) do
SMODS.change_base(other_card, pseudorandom_element{SMODS.Suits}.key, pseudorandom_element{SMODS.Ranks}.key)
other_card:set_seal(pseudorandom_element{G.P_CENTER_POOLS.Seal}.key, 'yandev_s')
other_card:set_edition(pseudorandom_element{G.P_CENTER_POOLS.Edition}.key, 'yandev_e')
other_card:set_ability(pseudorandom_element{G.P_CENTER_POOLS.Enhanced}.key, 'yandev_a')
end
end
end
current code
a
would this not still work without a seed present?
i'm less familiar with math and its seed stuff
calculate = function(self, card, context)
if context.playing_card_added then
print(context.cards)
for _, other_card in pairs(context.cards) do
SMODS.change_base(other_card, pseudorandom_element{SMODS.Suits, 'yandev_suit'}.key, pseudorandom_element{SMODS.Ranks, 'yandev_rank'}.key)
other_card:set_seal(pseudorandom_element{G.P_CENTER_POOLS.Seal, 'yandev_s'}.key)
other_card:set_edition(pseudorandom_element{G.P_CENTER_POOLS.Edition, 'yandev_e'}.key)
other_card:set_ability(pseudorandom_element{G.P_CENTER_POOLS.Enhanced, 'yandev_a'}.key)
end
end
end
added the stuff, still no work
wait
the {}
okay it works
god damn that took far longer than it shouldve
For accomplishing something after cards in hand finish scoring but before Jokers begin scoring, would a patch be the easiest way to do it?
Folks, how do I make my custom rank to NOT have any suit or rank?
and make it so it's not a part of all decks by default
in_pool = function(self, args) return not args.initial_deck end
Hook SMODS.has_no_rank and SMODS.has_no_suit
Should I add those to my main.lua?
or to hooks.lua?
Yes, because you need to hook it.
like this?
a hook is a redefinition of a function to include your own logic;
local function_ref = function_name
function function_name()
local ret = function_ref()
# your logic here
return ret
end
so what you need is;
local smods_hnr_ref = SMODS.has_no_rank
function SMODS.has_no_rank(card)
local ret = smods_hnr_ref(card)
if card.base.rank == "your_rank_key" then
ret = true
end
return ret
end
and the same for SMODS.has_no_suit
No, it would be card:get_id() == SMODS.Ranks['modprefix_key'].id
👌
I mean card.base.value would also work would it not?
oh wait no because stone cards
right
replace if card.base.rank == "your_rank_key" then with the above card:get_id() == SMODS.Ranks['modprefix_key'].id
kk
if card:get_id() == SMODS.Ranks['modprefix_key'].id then that is ofc
Wouldnt that stack overflow
my games crashes
Because Card:get_id() calls SMODS.has_no_rank too
👌
Is there a way to assign cutom amount of chips/mult/xmult to this rank?
instead of default +chips
Also it seems like it still doesnt ignore suits
I did smth wrong?
It's done via loc lua?
Handled in Card:generate_loc_vars
Hook Card:get_chip_bonus, Card:get_chip_mult and Card:get_chip_x_mult
I think
It would override default chips?
No, because that doesn't exist.
Yes, if you don't return the original functions chips.
It definitely does, ive patched it for showing perma bonuses on cards
No, it definitely doesn't.
Where do I define how much xmult?
in the lua file of the custom rank itself?
No, it's Card:get_chip_x_mult not SMODS.get_chip_x_mult
No, you return the xmult
No, it would be Card.get_chip_x_mult for the old function, also you would return the xmult as a number.
Oh, I saw it my bad
Like this?
also local ret got grey'ed out
do I need to return ret?
Yes.
is this overpowered ?
then say so "and lose $1" ("$1" in red color)
Compare it Green Joker/Ride the bus
and decide
I think it's alr for uncommon ig
i will change the text and play some runs with
It should be function Card:get_chip_x_mult(context) and it should be self not card also move the 1.5 out of the table.
Should ret and 1,5 be in the same return?
Im totally lost
what are you trying to do?
Custom playing card
with no rank or suit
(basically a new rank)
and x1.5 mult
It is a token created by a Joker
(added to your deck)
in SMODS.Rank there are no settings for no rank/no suit so it got complicated
local chip_x_mult_ref = Card.get_chip_x_mult
function Card:get_chip_x_mult(context)
if self.base.id == SMODS.Ranks['hnds_creepycard'].id then
return SMODS.Ranks['hnds_creepycard'].config.xmult
end
return chip_x_mult_ref(self, context)
end
and then put config = {xmult = 1.5} in your Rank definition
though you should probably just be using an enhancement for this, no?
Its supposed to be able to be enhanced too
It's supposed to be enhanceable
yeah
it's a playing card
Or you meant quantum enhancements?
the ones that can be on card without taking ehn slot
iirc
I don't
kk
regardless, the code I sent should work
It still adds 13 chips
try adding nominal = 0
👌
The last thing: how exactly can I customize the text box/name (remove "of suit") of a playing card?
or nominal = 0 is all I can use?
ic ic, thanks a lot regardless!
you can actually, gimme a sec
# generate_card_ui() patch '[rank] of [suits]' -> '? of [suits]'
[[patches]]
[patches.pattern]
target = "functions/common_events.lua"
pattern = '''localize{type = 'other', key = 'playing_card', set = 'Other', nodes = full_UI_table.name, vars = {localize(specific_vars.value, 'ranks'), localize(specific_vars.suit, 'suits_plural'), colours = {specific_vars.colour}}}'''
position = "at"
payload = '''localize{type = 'other', key = 'playing_card', set = 'Other', nodes = full_UI_table.name, vars = {((card.seal == 'uni_shattered' and '?') or localize(specific_vars.value, 'ranks')), localize(specific_vars.suit, 'suits_plural'), colours = {specific_vars.colour}}}'''
match_indent = true
This patch makes it so that a card with a certain seal displays '? of [suit]' instead of the rank
oooo
adjusting it like so should make it work for suits;
# generate_card_ui() patch '[rank] of [suits]' -> '? of [suits]'
[[patches]]
[patches.pattern]
target = "functions/common_events.lua"
pattern = '''localize{type = 'other', key = 'playing_card', set = 'Other', nodes = full_UI_table.name, vars = {localize(specific_vars.value, 'ranks'), localize(specific_vars.suit, 'suits_plural'), colours = {specific_vars.colour}}}'''
position = "at"
payload = '''localize{type = 'other', key = 'playing_card', set = 'Other', nodes = full_UI_table.name, vars = {localize(specific_vars.value, 'ranks', (card.base.value == "your_rank_key" and "?" or localize(specific_vars.suit, 'suits_plural')), colours = {specific_vars.colour}}}'''
match_indent = true
<@&1133519078540185692>
thanks <3
however this will display "Rank name of ?", not just "Rank name"
if you want just the rank name I'll have to dig a little deeper..
but that's a very destructive patch
☢️
ultimately, this specific effect sort of needs a new SMODS.PlayingCard class
alternatively, you could add a check before this line
localize{type = 'other', key = 'playing_card', set = 'Other', nodes = full_UI_table.name, vars = {localize(specific_vars.value, 'ranks'), localize(specific_vars.suit, 'suits_plural'), colours = {specific_vars.colour}}}
like;
if card.base.value == "your_rank_key" then
localize{..., nodes = full_UI_table.name, vars = {localize(specific_vars.value, 'ranks'), "", colours = {specific_vars.colour}}}
else
localize{type = 'other', key = 'playing_card', set = 'Other', nodes = full_UI_table.name, vars = {localize(specific_vars.value, 'ranks'), localize(specific_vars.suit, 'suits_plural'), colours = {specific_vars.colour}}}
end
and have the upper localize point to a localization entry that mimics the playing card one
Is that like a raw G.P_CARDS entry? Ive never heard of that
just without the "of"
no eris, it's not a thing that exists
Wait, why is it SMODS.Ranks that exists and not SMODS.PlayingCard?
I feel like the latter should include rank settings
and have more options on top
Probably because making every rank+suit combination seperately is rather inconvenient
Since every rank+suit combination has an entry in G.P_CARDS
Afaik
because nobody has made it
where as custom suits and ranks are much more likely to be wanted
hello again, another question that i want to ask:
how can i make the text color change with the custom value?
No I meant SMODS.PlayingCard should be superior functionally speaking since it implies that it can adjust both suit/rank and other stuff at the same time
instead of just being one or the other
I hope this makes sense
V:1 is the first colour returned in loc vars as a text colour, B:1 is the same but background colour
Is how it works
Iirc
why so?
ill show you the entire code for loc_vars and other part of the file
returned colours should be in a colours table in vars
because these are some of the very first SMODS objects that were created
and nobody has ever really needed an implementation of specific playing cards that aren't just suit + rank
In that case how can I go about my problem?
make it into enhancement?
you either revise your aim so that it functions as an enhancement, or your program all the stuff you need yourself
but at this moment in time, the SMODS api can't really do what you're trying to do for you
never thought Id come across smth smods can't handle huh
👌
there are lots of things smods can't do
it's far from being a complete api for modding
what are the most desired features atm?
for Balala modding that is
a lot of people want quantum ranks but that is inherently scuffed imo
huh, this is the one that sounds way too specific to me
it's very scuffed gameplay-wise I think
in terms of making hands
soo like this?
never know what would take priority
or at least it'll be hard to track
colours = {...}
And it would be B:1 since its the first colour
<@&1133519078540185692>
<@&1133519078540185692>
Oh my god bruh
who was that?
how did i miss that when i was sitting right here
A bot
how do i change the jimbo that pops up at the end of the run to a different joker sprite (more specifically one from my mod)
if that’s even possible
search for JimboQuip https://github.com/Steamodded/smods/discussions/919
What would take priority is obvious
Quantum Suits already exist, this is a natural extension. The main complication is that Straights exist, unlike Flushes
Its more about actually understanding what options you have at a given moment
Could be confusing
Quantum ranks absolutely is not a priority over other features
Outside of Quantum Ranks, probably applying Edition Shaders to arbitrary sprites and putting things on a grid
That’s upon game designers
Unless you think Wild Cards are confusing
👌 thanks for clarifying
I’m totally unbiased 
Wild cards are way way less so since there are only 4 in the base game
Those also aren’t widely requested features, they’re just things victin wants
Opposed to 13 ranks + face cards definitions
I don’t think it would be harder to understand if there were 60 suits
I mean 7 people have reimplemented the former by themselves
Or are trying to
The latter I only mentioned because Winter said she was going to try and implement it for a Credits page, and I realized a Grid would address 2 other features that have been brought up
Automatic Sticker placement and automatic CardArea positioning
And I want SMODS.Playing card 😭 we all want more smods upgrades nothing bad in that, its just all up to priority list ig
So while by itself it’s not a requested feature it’s a
You
Awwww
🫵
me
its me tfym
resident chat GPT apikoyori
i added 2 banger features to SMODS
I contributed nothing
but no bugs as well😎
Wrong you forgot the door open and the moths flew in
Now they’re eating the cards
it seems I was a fool [Creates a copy of the last used tarot or planet card] all along
Creates a copy of the last used tarot or planet card
Everyone (in theory)
The wonders of open source software
Anyone can contribut
E
E indeed
What was the second?
Alpaca, Theta and Delta?
therian
The DeckSkin template
Also my contributions didn’t get removed
I was making a joke
not exaaaactly what i was looking for, i want to change the sprite on the default win/loss quips and nothing else
i do know it's possible to change sprites like that because i already have the jimbo on the bootup screen changed to a custom joker i just wanna know what path i need to change the one at the end of the run
Change the quips that already exist
i. still need to know the pathing to do that 
wait hang on i might already
but i might not
I GOT IT
...almost
works flawlessly on *most of the win quips, but only the text works for some win quips and all the lose quips
ehhhh whatever i'll just do custom text instead of having a custom sprite too this is too much of a headache
how are you doing it
i think you can take ownership of the jimboquips
local _card = SMODS.create_card {set = "Base", rank = tostring(random_rank), suit = random_suit, seal = random_seal, enhancement = random_enhancement, edition = random_edition, area = G.deck}
why this not work
I am doing this inside the apply function of my deck
what doesnt work
it creates a random card instead of the assigned rank and suit and it also places them in the free roam way
for the first problem how are you getting the rank and suit
for the second change create_card to add_card
local random_rank = pseudorandom("flush five", 2, 14)
local random_suit = pseudorandom_element({"Clubs", "Hearts", "Diamonds", "Spades"}, "flush five")
for the random rank 11, 12, 13 and 14 wont work, it needs to be the rank key
what smods version do you have
latest version
ok but I will have to send it in a .txt file bc me have no nitro
ok
here is my terribly crafted code
ok so when the math.random hit a non face card rank it worked
yeah you need to change that to the keys, also in that code pseudorandom_element is missing the seed
yeah I am trying to make it true random bc I realised that pseudorandom not good for decks
you shouldn't use math.random because the same seeds will produce different results
lol i mixed it up
pseudorandom should do the same thing here
yeah that is the point
the deck is supposed to generate 5 copies of a random card
ok but you want the same seed to always be the same
when I used pseudorandom it always hit jack of clubs
you probably need to use pseudorandom inside the event
you would need to use pseudorandom_element anyway to get the rank keys
So does rank kays work with card:get_id()
no
you need card.base.value
iam making a joker that gives x0.25 mult if your hand played isnt the same as the last one
if context.before and not context.blueprint and G.GAME.last_hand_played then
how do i make the correct context check?
context.initial_scoring_step and G.GAME.last_hand_played ~= context.scoring_name
with this the joker doesnt gain anything
fuck
calculate = function(self, card, context)
if context.initial_scoring_step and G.GAME.last_hand_played ~= context.scoring_name then
card.ability.extra.Xmult = card.ability.extra.Xmult + card.ability.extra.Xmult_mod
end
if context.joker_main then
return {
Xmult = card.ability.extra.Xmult
}
end
end
this is the full func btw
What is the goal?
oh just curious
i think last_hand_played gets updated to the current hand before that
Then no, it doesn't exist.
Ah alr
oh really? what other context do I use then
uhh context.press_play and save last_hand_played to the joker and then check if it's the same in joker_main
hold on how do you save last hand played to the joker
card.ability.extra.last_hand_played = G.GAME.last_hand_played
i must admit im a little confused on how to actually implement this
calculate = function(self, card, context)
card.ability.extra.last_hand_played = G.GAME.last_hand_played
if context.press_play and card.ability.extra.last_hand_played then
return {
}
end
end
because from what i understand this is the start of what im supposed to do
but how do i do card.ability.extra.last_hand_played == true ?
how do i clear all or a specific tag?
for k, v in pairs(G.GAME.tags) do
if v.key == 'tag_modprefix_key' then
v:remove()
end
end
calculate = function(self, card, context)
if context.press_play then
card.ability.extra.last_hand_played = G.GAME.last_hand_played
end
if context.joker_main then
if card.ability.extra.last_hand_played ~= context.scoring_name then
card.ability.extra.Xmult = card.ability.extra.Xmult + card.ability.extra.Xmult_mod
end
return {
Xmult = card.ability.extra.Xmult
}
end
end
ohhh
i see thank thank you
https://github.com/Steamodded/smods/wiki/G this has a lot of them i think
but not all G.GAME.current_round stuff
thats what i want to see specifically
also what exactly is G.GAME.played_hands is it the amount of played hands or like the blue number near discards?
look at Game:init_game_object
or just
?
type in G.GAME.current_round. in vscode
and see what comes up
also what are you even looking for
? what
in my mods folder i presume?
nothing specific
nvm
i said type it in vscode
and see what comes up
where tho
like
anywhere where you have the lovely dump and smods in the library?
i still recommend this
hello modding dev i need help with a custom deck
ive been making a ghost deck clone called "holy deck" that functions identically, except it uses sephirots
in order to unlock it, you need to beat ghost deck
here is the code
key = 'holy_deck',
pos = { x = 1, y = 0 },
config = {{ sephirot_rate = 2, consumables = { 'c_hatchet_kether' } } },
loc_txt = {
name = 'Holy Deck',
text = {
[1] = '{C:green}Sephirot{} cards may appear in the',
[2] = 'shop, start with a {C:green}Kether{} card'
},
},
unlocked = false,
atlas = 'CustomDecks',
loc_vars = function(self, info_queue, back)
return { vars = { self.config.sephirot_rate, self.config.consumables[4] } }
end,
locked_loc_vars = function(self, info_queue, back)
local other_name = localize('k_unknown')
if G.P_CENTERS['b_ghost'].unlocked then
other_name = localize { type = 'name_text', set = 'Back', key = 'b_ghost' }
end
return { vars = { other_name } }
end,
check_for_unlock = function(self, args)
return args.type == 'win_deck' and get_deck_win_stake('b_ghost') and true
end
}```
it comes with an error on line15, saying i was indexing a null value
you have one extra set of {} in config
wait where
it should be config = { sephirot_rate = 2, consumables = { 'c_hatchet_kether' } },
oo oke
also sephirot_rate wont work in the config like the vanilla ones do, you need to use an apply function
with this setup, is it possible ti make the joker display the last played hand?
uh oh, new error
not with the ability one, but you can use the g.game one
i just fixed vanillaremade :3
return { vars = { card.ability.extra.mult, card.ability.extra.mult_mod, G.GAME.last_hand_played } }
'last played hand is {C:attention}#3#{}',
so like this?
you need to localize it but yes
alright thank you 🙂
<@&1133519078540185692>
key = 'holy_deck',
pos = { x = 1, y = 0 },
config = { sephirot_rate = 2, consumables = { 'c_hatchet_kether' } },
loc_txt = {
name = 'Holy Deck',
text = {
[1] = '{C:green}Sephirot{} cards may appear in the',
[2] = 'shop, start with a {C:green}Kether{} card'
},
},
unlocked = false,
atlas = 'CustomDecks',
apply = function(self, back)
-- Apply the spectral rate
G.GAME.sephirot_rate = self.config.extra.sephirot_rate
-- Apply the consumables
delay(0.4)
G.E_MANAGER:add_event(Event({
func = function()
for k, v in ipairs(self.config.extra.consumables) do
SMODS.add_card({ key = v })
end
return true
end
}))
end,
loc_vars = function(self, info_queue, back)
return { vars = { self.config.sephirot_rate, self.config.consumables[1] } }
end,
locked_loc_vars = function(self, info_queue, back)
local other_name = localize('k_unknown')
if G.P_CENTERS['b_ghost'].unlocked then
other_name = localize { type = 'name_text', set = 'Back', key = 'b_ghost' }
end
return { vars = { other_name } }
end,
check_for_unlock = function(self, args)
return args.type == 'win_deck' and get_deck_win_stake('b_ghost') and true
end
}```
hhmm
💔
when blind is selected, gain +3 hands and lose all discards
yes
remove the .extra
i think i know the issue
o
sephirot_rate isnt defined anywhere
so it has no idea what sephirot rate is
it is
it does that automatically for consumable types
hmmm,
ok so
ive redone the code
now it creates 2 kethers instead of just 1
and sephirot cards still dont appear in the store
remove the apply the consumables part
how does localizing work? i read up on how you do it in zany mad and those jokers but i get this error
hmmm, unexpected symbol =
locked_loc_vars = function(self, info_queue, back)
key = 'holy_deck',
pos = { x = 1, y = 0 },
config = { sephirot_rate = 2, consumables = { 'c_hatchet_kether' } },
loc_txt = {
name = 'Holy Deck',
text = {
[1] = '{C:green}Sephirot{} cards may appear in the',
[2] = 'shop, start with a {C:green}Kether{} card'
},
},
unlocked = false,
atlas = 'CustomDecks',
apply = function(self, back)
-- Apply the spectral rate
G.GAME.sephirot_rate = self.config.sephirot_rate
loc_vars = function(self, info_queue, back)
return { vars = { self.config.sephirot_rate, self.config.consumables[1] } }
end,
locked_loc_vars = function(self, info_queue, back)
local other_name = localize('k_unknown')
if G.P_CENTERS['b_ghost'].unlocked then
other_name = localize { type = 'name_text', set = 'Back', key = 'b_ghost' }
end
return { vars = { other_name } }
end,
check_for_unlock = function(self, args)
return args.type == 'win_deck' and get_deck_win_stake('b_ghost') and true
end
}```
what am i even doing
whats the code
you're missing an end,
it works!!!!
oh oops i was scrolled too high lol
yee i just fixed it
text = {
"If your hand played isn't the same as last played hand",
'gain {C:mult}1{} Mult, if you don\'t lose it all',
'last played hand is {C:attention}#3#{}',
'{C:inactive}(Currently,{C:mult}+#1#{}{C:inactive)){}'
}
},
atlas = 'Jokers',
pos = { x = 4, y = 1 },
config = { extra = {
mult = 0,
mult_mod = 1
} },
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.mult, card.ability.extra.mult_mod, localize(G.GAME.last_hand_played, 'poker_hands') } }
end,
calculate = function(self, card, context)
local reset = true
if context.press_play then
card.ability.extra.last_hand_played = G.GAME.last_hand_played
end
if context.joker_main then
if card.ability.extra.last_hand_played ~= context.scoring_name then
card.ability.extra.mult = card.ability.extra.mult + card.ability.extra.mult_mod
end
return {
mult = card.ability.extra.mult
}
end
end
}
this is is obviously with the faulty localize
thank youuu
have you tried G.GAME.last_hand_played or "High Card"
in the loc_vars return{}?
in localize
this just displays error
previously it would crash my game if i hoverd over it so its an improvement XD
how do i add text here saying smth along the lines of "beat ghost deck to unlock this deck"
nvm it somehow unlocks after winning a run on any deck LMAO 😭
nvm got it fixed
Im having issues loading a sticker, specifically the tooltip and badge
I've added its name in misc.labels and a description in descriptions.Other, yet it doesn't display either the tooltip or the badge when hovered over, does anyone have an idea as to why?
oh yeah one more questoin now that youre here, is it possidble to make a joker change the language?
possible yes, no idea how sorry
okay okay, ill have to do some more research into how then
nvm ignore this it was an issue in how i was loading it
Ok new problem
I used this to define that my sticker can only be applied on jokers, and yet hum
what am i doing wrong here
is it because the rate is 1? i just set it to 1 to test
edit: no it's not that
whats the full code
should apply is overriding all the defaults
yeah
kinda weird but ok, i already found a workaround anyway
you need to call the original as well
is there a way i can get specifically the new cards drawn after discarding in a list?
i know i can just scan the whole hand before and after discarding but i want to know if there's a better way
set a flag in context.discard
and then check in context.hand_drawn
for the drawn cards
like give a flag to all the cards in hand when you discard, when heck for the cards without the flag in hand_drawn?
@broken rivet it still crashes w/ this and im so clueless
its only modifying p_centers 🥀
try commenting out the entire hook
ok it appears modifying the function at all is causing it to crash Lol
im going to do some debauchery and see what happens #brb
also sorry but i am going to kill valk_censored_loc_vars because i really dont think anybody is going to use it and it just kinda adds to the lack of clarity anyway
fair
it's fairly niche anyway
i feel like the other half shouldn't break anything though
also im going to obliterate pseudorandom because its visual anyway
also fair
i really should've just used math.random
but pseudorandom_element was convenient
fair
i know
tried testing my jokerforge mod but apparently one of my jokers crashes the game??
Went into the code and found this, any ideas?
this doesn't have to be
this is a purely visual thing
it only changes text to a random thing between two options to obfuscate it
which is something that doesnt have to be consistent
this is the full error message btw
how is that getting there dude what
🤷♂️
oh
i know
lol, lmao
it doesnt check if [x].loc_vars exists before setting it to the new function
probably being copied over when you start a run when it shouldnt even exist
also adding itself to a deck
might as well add it to decks rather thanadding to everything but decks
as long as it safely adds to decks
i guess though decks normally don't have editions
ya its just like
might as well not have an extra check since it supposedly wont hurt
maybe if like parakmi does something weird
don't wanna interrupt the conversation but does anyone know how to fix this?
do i just quit modding now this is such a sinful line
you have invalid syntax in jokers/thenoise.lua line 71, try checking it
idk if it even works
it's funny though
@keen atlas already checked and found this
what the fuck