#💻・modding-dev
1 messages · Page 430 of 1
Cryptid does something similar
and then simply index that by doing something similar to
for i = 1, #G.jokers.cards do if G.jokers.cards[i].pools and G.jokers.cards[i].pools.Your_Pool then <do mult whatever stuff you want here> end end
adding them to a joker makes them exist
it's just a variable you set
No, it's G.jokers.cards[i].config.center.pools
ah you're right, mb that was just pseudocode
the only time i index pools is for general centers, not specific objects
how would I run a global function through the console?
eval globalfunction()
would you have an example of this function? I'm not entirely sure how to implement something like this.
thanks
thank you
would it be possible to add icons that you can put in text?
You mean putting images in a jokers description?
I think they mean like the suit icons in bunco
yes
Then yes, but I don't know how though.
is there a way to modify the deck selection ui?
what does the i = 1 mean
Yes.
how 🥺
Yes there is
I'm guessing you have to either patch or hook the functions related to that, probably in ui_definitions.lua
I'd really recommend the mod Galdur for deck selection tho
i acts as a variable that goes up by 1 for every object in the table G.jokers.cards, so G.jokers.cards[i] will be equal to every joker one by one as the loop continues. it then ends when there are no more objects in the table
Do you think you could explain what quantum enchantmnets are and how to use them or link me seomthing for that?
Also read the UI guide on the smods wiki if you really want to go through with this
though see this message @signal lotus, my code was incorrect (i wasn't referencing anything)
You have to enable them then you would do ```lua
if context.check_enhancement and context.other_card.config.center.key == "m_mbm_rat" then
return {m_steel = true, m_stone = true}
end
like this
to elaborate, #G.jokers.cards is equal to the total number of jokers, so it could vary from 1 to infinity, but the loop would still work fine as it always adjusts to the total number, and ends if it goes past the number of jokers
set the ability up in a context and that should work just fine
alright
thanks
given that you're looping through all jokers, smods has a built in context that does that btw
i would modify your code to
if context.other_joker and context.other_joker.config.center.pools and context.other_joker.config.center.pools.Kanye_Joker then
return {
mult = card.ability.extra.mult
}
end
How does one change joker slots without changing visible joker slots?
Check #1326135270759993364
just throw this in your calculate function and you should be golden, it'll operate like baseball card
i have the like, set message working but not the actual mechanic, is there an extra function im missing somewhere?
context.other_card.base.nominal = 0
card is equal to your joker in this scenario
ohhh that makes sense actually now that i look at hiker
OHHH no i understand completely now thats what was confusing me
@signal lotus pinging just in case you didn't see
I did
alr
Yes, because they are sorted by nominal.
thats so bizarre i never noticed that before
It's possible to fix though.
How would I change the text styling of a joker throughout the run?
i guess thats why rubber ducky from extra credit has the +-10 chips thing going on?
You mean change the description?
idk it doesnt do anything
Yeah, specifically the colors and such.
you added the pool to other jokers right?
yeah lol
legit just change mult to xmult in your return
How would I check if a card is being removed or added to joker slots in a hook of Card.remove_from_deck and Card.add_to_deck?
Return key = self.key.."_alt" in loc_vars and set j_modprefix_key_alt in your localization file.
you were referencing a variable that doesn't exist and also adding mult rather than xmult
is the process for this documented anywhere :3
because it works other than that which is awesome
probably a common question but how is the "(Currently Xnumber Mult)" text in loc_txt should look like,,
use {C:inactive}
Hey, this is what I got so far, i defiently feel like i'm missing something. And how do you enable quantum enchantments?
so {C:inactive}(Currently {X:mult,C:white}X#1#{C:inactive} Mult)
assuming you want to do it vanilla style
thankksss
SMODS.current_mod.optional_features = function()
return {
quantum_enhancements = true
}
end
Can i use game shaders ?
I'm making a joker card that turns 4s into aces, the problem is that the resulting aces still score 4 chips
What's wrong?
calculate = function(self, card, context)
if context.individual and context.cardarea == G.play then
if context.other_card:get_id() == 4 and not context.other_card.debuff and pseudorandom('j_rdjk_dyslexia') < G.GAME.probabilities.normal/card.ability.extra.odds then
assert(SMODS.change_base(context.other_card, nil, "Ace"))
SMODS.recalc_debuff(card)
play_sound("tarot1")
return {
message = localize('b_rdjk_dyslexia'),
colour = G.C.PURPLE,
message_card = context.other_card
}
end
end
end
You need to change chip value
Yes.
...no i don't think so
Really? How
try doing this in context.before
Never really tried it LOL
It’s probably a context error
What is the goal?
change_base() changes chip value, the problem is that the cards are being changed after they're already going to be scored
bump
so it still applies the previous chip value
I wanna use the hologram vanilla shader and apply it to another joker
You would use SMODS.DrawStep or the draw function.
And how can i use the game shaders
And not a custom one
Sorry I really don’t know how draw step works i never used it
I tried before using "scoring_hand" as well, but only a 4 was changed from the hand played
wdym?
would this also fix my issue where the cards get set in a weird order after losing chips? or is this specifically for changing ranks
just a function for changing ranks, which by default will change the order
No.
since you're changing ranks, it's kinda intended to change order and therefore it doesn't have its own thing to change order - it's totally good with the fact order is changed by changing the base chips
This
calculate = function(self, card, context)
if context.before and context.main_eval then
local fours = 0
for _, scored_card in ipairs(context.scoring_hand) do
if scored_card:get_id() == 4 and not scored_card.debuff and pseudorandom('j_rdjk_dyslexia') < G.GAME.probabilities.normal/card.ability.extra.odds then
fours = fours + 1
assert(SMODS.change_base(scored_card, nil, "Ace"))
play_sound("tarot1")
scored_card:juice_up()
G.E_MANAGER:add_event(Event({
func = function()
scored_card:juice_up(0.3, 0.3)
return true
end
}))
end
end
if fours > 0 then
return {
message = localize('b_rdjk_dyslexia'),
colour = G.C.PURPLE
}
end
end
end
Based in midas mask
💔 later problem then the rest of it works
pretty happy with progress so far its been cool to bring these ideas to reality
So, I'm trying to make a joker that gives 2$, and loses 1$ of sell value when an 8 or ace is played, I just have no clue where to start with this specific context, the closest I have to a starting point is the code for retriggers so this is gonna be a pain :/
use context.individual for the rank detection
as for giving money, reference vanillaremade's golden joker implementation
you can do that in context.individual, it's just modifying a variable
you can check how gift card changes sell value, and just do that if you detect the ranks
plus a fancy effect if you like
is there a way to have a context where it only checks for something if you do it during a blind? like specifically not in the shop or blind selection
bump
I think I did most of this right, just gotta make sure this actually changes the sell value of only the current joker and not other jokers
calc_dollar bonus is a function independent of anything, put that after calculate
actually there's a lot going on here hang on
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.sell_value, card.ability.extra.dollars } }
end,
calculate = function(self, card, context)
if context.individual and context.cardarea == G.play then
if context.other_card:get_id() == 8 or context.other_card:get_id() == 14 then
card.sell_cost = card.sell_cost + card.ability.extra.sell_value
return {
message = "Placeholder message"
}
end
end
end,
calc_dollar_bonus = function(self, card)
return card.ability.extra.dollars
end
not perfect but i think that should work
i would definitely recommend familiarizing yourself with the lua language
quick question: card.base.value gives the number of chips the card would give, right?
thank you for this!!! I was able to find how cryptid did it and it worked perfectly
I think you can use: :get_chip_bonus()
That works, ty!
hey guys i got a smol doubt here
note to anyone else or myself on how to do this:
{n=G.UIT.O, config={object = sprite, scale = 1}}
sprite = Sprite(0,0,1,1, G.ASSET_ATLAS[[atlas name or var]],[position as a table])
i want to include my second joker here but with this sintax its giving me bugs:
SMODS.Atlas{
key = 'beerimg',
path = 'beer.png',
px = 71,
py = 95
}
SMODS.Joker{
key = 'beerjoker',
loc_txt = {
name = 'Beer',
text = {
'Sell this card to',
'create a free',
'{C:attention}uncommon tag{}'
},
},
atlas = 'beerimg',
pos = {x = 0, y = 0},
rarity = 1,
cost = 6,
blueprint_compat = false,
calculate = function (self, card, context)
if context.selling_card then
add_tag(Tag('tag_uncommon'));
end
end
}
SMODS.Atlas{
key = 'wineimg',
path = 'wine.png',
px = 71,
py = 95
}
SMODS.Joker{
key = 'winejoker',
loc_txt = {
name = 'Wine',
text = {
'Sell this card to',
'create a free',
'{C:attention}rare tag{}'
},
},
atlas = 'wineimg',
pos = {x = 0, y = 0},
rarity = 2,
cost = 14,
blueprint_compat = false,
calculate = function (self, card, context)
if context.selling_card then
add_tag(Tag('tag_rare'));
end
end
}
shrimple right?
well this is not supposed to be done because the wine joker actually will give you both a uncommon and a rare tag
which makes no sense
its probably something to do with item reference, im not using .this
but im not sure how
:p anyway i should sleep some more gn
I don't know if this is actually the problem, but maybe you could use "context.selling_self"
my guess is the context.selling_card is triggering on both of the jokers
ah?
AH!
rightio
that sounds accurate
thank you
Well im going to test but i think it werks tyvm
getting a crash from this code when using a tarot card, not sure what im doing wrong?
its supposed to additionally not do anything when youre in the shop but using it in the shop or in a blindcrashes
bump
that should work
I mean where can I find the 812d version because I only see 530 on the website?
you shouldnt need it
its minimum version not only that version
I just want to know where I can find an alpha 812)
hey guys, why this no work? Its adding the text for the -mult and -chips, but when scoring it ignores the chips and always does -1 mult???
SMODS.Enhancement{
key = "backstabbed",
loc_txt = {
name = "Backstabbed",
text = {
"{C:chips}#1#{} Bonus chips",
"{C:mult}#2#{} Bonus mult"
}
},
atlas = "centers",
pos = {x = 1, y = 0},
order = 100, -- Higher order means it appears on top
config = {
chips = -2,
mult = -1
},
loc_vars = function(self, info_queue, card, specific_vars)
if not card or card.fake_card then
return { vars = { "-2x Chip Value", "-1x Chip Value" } } -- Show multipliers in collection
end
local chip_value = card:get_chip_bonus() or 0
card.ability.chips = chip_value * -2
card.ability.mult = chip_value * -1
return {
vars = {
card.ability.chips,
card.ability.mult
}
}
end
}
can you help me 🥺
idk i cant find it
irregardless: YOU DONT NEED IT
its worse than the current version
is there a way to make this deck not crash at the drop of a hat
I ain't sure I understand, the point of this particualr enchantment is that it's bad
oh, ok
does it take away the chips from your card's current chip total? whats the intention with negative chips
oh wait
hold on
for enhancements, in the config, chips are noted as bonus, not chips
Ok, that fixed the problem of the chips not being scored, can you tell me why the value used in scoring is always the config and these lines aren't changing it?
local chip_value = card:get_chip_bonus() or 0
card.ability.bonus = chip_value * -2
card.ability.mult = chip_value * -1
and thanks for the help 🙂
because the config is what enhancements use when scored?
can you put variables in the config? and if not can you change the config values after they are set?
why do you want to change the values
isnt that what config is for?
i dont think enhancements use extra
What i am trying to do is have
negative 2 times current cards chip value in chips
negative 1 times current cards chip value in mult
added to the card having the enchantment applied
wouldnt that make the overall value 0
it would make the total chips negative of the original chip value and the mult just what the original chip value was but negative
multiplying a negative number by a negative number gives you a positive number
I am adding to the card -2 times original chip value in chip and -1 times original chip value in mult
if a = original chip value then I would have -2a + a -> -1a chip and -a mult, Unless I am seriously confused
then why do you have config set in the first place
if the config doesnt do anything why is it set
does anyone know how to check, when hooking remove_from_deck and add_to_deck, if a joker is being added to/removed from joker slots specifically?
I was udner the impression it was required for enchantments as that was what they all used in the vanilla modded thing
if you want them as variables you need extra, not just config
does get_chip_bonus also take editions like foil
it should, as well as hiker buffs, which is intentional
let me try that
jsyk if youre using them as variables you need a calculate function for them to work
and how would that calculate function work exactly, as when ive attmepted to do so before it didn't work for some reason
this is what I have now, and it didn't work 😦
config = {
extra = {
bonus = -2,
mult = -1
}
},
loc_vars = function(self, info_queue, card, specific_vars)
if not card or card.fake_card then
return { vars = { "-2x Chip Value", "-1x Chip Value" } } -- Show multipliers in collection
end
local chip_value = card:get_chip_bonus() or 0
card.ability.extra.bonus = chip_value * -2
card.ability.extra.mult = chip_value * -1
return {
vars = {
card.ability.extra.bonus,
card.ability.extra.mult
}
}
end,
calculate = function(self, card, context)
if context.joker_main then
return {
bonus = card.ability.extra.bonus,
mult = card.ability.extra.mult
}
end
end
}
context is main_scoring
joker_main is when joker effects happen, not when cards are scored
alright, this is what I have now, and it results in ignoring the bonus and having -1 mult when scored isntead of what is one the card
config = {
extra = {
bonus = -2,
mult = -1
}
},
loc_vars = function(self, info_queue, card, specific_vars)
if not card or card.fake_card then
return { vars = { "-2x Chip Value", "-1x Chip Value" } } -- Show multipliers in collection
end
local chip_value = card:get_chip_bonus() or 0
card.ability.extra.bonus = chip_value * -2
card.ability.extra.mult = chip_value * -1
return {
vars = {
card.ability.extra.bonus,
card.ability.extra.mult
}
}
end,
calculate = function(self, card, context)
if context.main_scoring then
return {
bonus = card.ability.extra.bonus,
mult = card.ability.extra.mult
}
end
end
}
in the return statement it would be chips not bonus i think
idk how to fix the other issue other than actually grabbing the chip value of the card and not the bonus chip value
that is card.base.nominal correct?
idk
i havent messed with base cards other than my enhancement overwriting them which is built in
center is nil
what should i do?
what is the goal of the deck
I'm excited to have worked this much out so far, and I wanted to share it here. Making a scrollable uibox
remove all modded jokers from the pool
it mostly works but it crashes at random points for seemingly no reason
is v actually the full key of all jokers that it looks through
it should be i think
what does original_mod do
checks if each joker is vanilla or not
if it contains original_mod its vanilla
hm
I needed to add the change for the chips and mult inside the calcaulte function as well, but Its woroking Thank you very much for the help. I now also understand what you were refering to about the negative and negative becoming a positive when both cihps and mult are negative for the total score 😭
so its fixed now?
Yeppp
thank yooouuuu
just a fundamental flaw with the idea itself, that im working on now
np
if I wanna find out if the player has a specific Joker I can use next(find_joker("name")) right
if next(find_joker("Cricket's Head")) then did I just make the if statement wrong then
this is inside of another Joker's calculate function
im pretty sure you call it by key
mod prefix included?
id imagine so
alr I'll try that
i used next(SMODS.find_card in my code that detects a certain joker so idk exactly the difference here
that's probably a better function to be calling anyways
full thing is if next(SMODS.find_card('j_modprefix_jokerkey)) then
worked, thanks!
np (i cant believe how many times i had to use that parameter while taking ownership of vanilla consumables so i could have jokers change stuff about said consumables)
Yeah, my Joker amplifies the mult effects of any Jokers that give mult. When its added or removed from the deck it messes with the config of other Jokers so that they get amplified, and divides by the same amount when its lost. Obelisk was giving me issues bc it would reset to 1 and then selling it would cause you to be at like 0.66X mult lol
Is there a check to see whether a card has been destroyed
Currently making a Joker where it will grant effects after a specific enhancement has been destroyed
if playCard.config.center == G.P_CENTERS.[enhancement] and [card destroyed detection logic] then
-- do stuff
end
Sometimes you need global variables for that kind of thing. For example Cavendish can only spawn with Gros Michel goes extinct, and the game uses a custom global variable for that
I see I see
I've never implemented something like that myself but that's where I would start
Alright, I'll take a look, cheers
Yep there it is, but it's a global value for one criterion, so it's pretty simple
I don't know how I'm going to figure out global variables when there are multiple cards with the same enhancement, I'm worried about potential conflicts
Could you give me a hint on how this line works?
card. ability. extra = math.min (math.floor (card.ability.extra), 1000)
oh btw, does this method work when the player has multiple copies of the Joker?
actually nvm I figured it out lol
i dont think it makes it happen multiple times if thats what youre asking
yeah but I found a workaround
oh ok
why is this still repeating so much
it probably prints once for every card because context.full_hand[5] returns a value every time, but you might also need to check something like context.other_card == context.full_hand[5]
just a guess though
whats the effect here
plan is to give a chip bonus (additive factorial) like hiker to each played card if hand contains 5 cards
there's a context.scoring_hand that you can use
isnt that for poker hands though
you could use context.before and context.main_eval, context.joker_main, or context.after depending on the timing
so something like if #context.scoring_hand.cards == 5 then
try taking the .cards off of scoring hand thats my bad
Could you give me a hint on how this line works?
card. ability. extra = math.min (math.floor (card.ability.extra), 1000)
hm, still nothing
...no return statement?
I think they're just trying to get the conditional to pass before programming the behavior
yeah
does anyone know what causes this crash? I want to know if its one of my Jokers
@manic rune don’t know if I missed your response to this or if you were sleeping
oh yeah it was 2 am for me lol
yeah this looks much cleaner, people wont put card = card in their calculate now
can context.other_joker be called upon doing something specific (ie, selling a card or starting blind) or does it only work after scoring?
Help me how to do.
In the game there is Flush Five, and I want to create for example Flush Six or Seven, how to fit it correctly in SMODS.PokerHand?
hey real quick
how do i get a joker to do that <Nope!> thing
that appears with wheel of fortune
how can i use perma bonuses? do i need to create the calculate file to calculate the bonus?
no you don't:
playing_card.ability.perma_bonus = playing_card.ability.perma_bonus + card.ability.extra.upgrade
I have this in one of my cards and it works great
What about permanently upgrade the x chips and mult?
that line permanently upgrades a card's chips. Mult I wouldn't know how to do though
Ok thanks
seems like it doesnt, played a foil 2 and it only gave 2 chips worth
no, because the chips from foil is an entirely different thing unlike enhancements lol
yup
This is new-
Is there a way to tell if a card was created without manually applying a flag to each card that's created?
Do you mean knowing the history of the card or just calculating whenever a card is created?
The former
You could just mark cards that started in the deck
Maybe you need to be a bit clever to handle copying
But marking cards that start in the deck is easier
I wouldn't know how to do that without redoing the flag every round...
(Doing this from a Joker, if that wasnt obvious and is relevant)
What do you mean?
Just mark the cards at the start of the game
The cards remember
How would i do that from a joker that can be acquired at any time, though? would I just flag every card regardless, and how would i even do this option?
You don’t do it from the joker
You just do it at the start
I'e never done smth like this before, i'd need a bit more elaboration
See the Castle example
In SMODS
The... what?
The example that recreates Castle
How does one change the text on a button?
whats the buffer stuff for G.jokers 🤔
did you try using :recalculate()
Nothing happened.
huh
i mean you could try using DynaText instead of G.UIT.T or smt
it will update if you use ref_table and ref_value instead of a string
Yoo hoo!
If it only needs to change occasionally, I'd just destroy and recreate it with the new text as needed. DynaText is good too, but might be overkill if you don't need fancy animations or constant changes every frame
how would i go about putting a clearance sale effect on my deck but specifically for boosters?
unlocked = true,
loc_vars = function(self, info_queue, back)
return { vars = { self.config.consumable_slot } }
end,
apply = function(self,back)
G.E_MANAGER:add_event(Event({
func = function()
G.GAME.discount_percent = center_table.extra
for k, v in pairs(G.I.CARD) do
if v.set_cost then v:set_cost() end
end
return true
end
}))
end,```
Oh btw I did get the draggable text box thing working, thanks so much once again for that :3
Hook Card:set_cost()
can you trigger a message outside of a returnr?
Yes.
how..?
SMODS.calculate_effect({message = "message"}, card)
Dont know if this is the right chat to ask this, but I've been compiling ideas for a mod that I theoretically want to make, and I would like to work on the art for it but I dont really know how to...start per say
Oh thank you
That... and start with something simple at first, then branch out to said ideas.
-# Or go full hog-
I mean, I could try and go full hog, and some of the joker ideas are simple in nature and shoul be easy to code but most are complicated in both art AND effect. On top of that I've gotta design a new look for a consumable type thats gonna be similar to Tarots and Spectrals. Now im probably going in way over my head-
(and the whole mod concept is kind of complex and open ended)
It seems to just freeze now.
OMG YOU GUYS
LOOK
This is gold
EZ
i was searching for smod docu and i finally found the sauce
:p
how do i make this a percent? and also my joker is getting deleted from the deck
unlocked = true,
loc_vars = function(self, info_queue, back)
return { vars = { self.config.consumable_slot } }
end,
apply = function(self)
G.E_MANAGER:add_event(Event({
func = function()
if G.consumeables then
local card = create_card("Joker", G.jokers, nil, nil, nil, nil, "j_buns_dante")
card:add_to_deck()
G.jokers:emplace(card) -- makes the lil guy stay still
return true --stops king crimson
end
end,
}))
end,
apply = function(self,back)
G.E_MANAGER:add_event(Event({
func = function()
G.GAME.discount_percent =
for k, v in pairs(G.I.CARD) do
if v.set_cost then v:set_cost() end
end
return true
end
}))
end
}
local card_set_cost_ref = Card.set_cost
function Card:set_cost()
local g = card_set_cost_ref(self)
if (self.ability.set == 'Booster') then self.cost = self.cost - G.GAME.discount_percent end
return g
end```
use SMODS.add_card instead
i dont know mate im sorry
is there a way to know if a crash was caused by a mod i added or by smods itself
because im getting a consistent crash in smods/src/overrides.lua but im not sure what the exact conditions are for it so i wouldnt know how to reproduce it
You should be able to read through the traceback
It contains all the steps involved in whatever caused the crash
If it's a mod you added, then it'll be in there
i dont think its in there but i dont really know how to read it
okay its caused by opening the deck while not having any diamonds in my deck
yeah that's a recent smods bug
its only if theyre all removed afterwards it seems
checkered deck does still work
oh well at least its not something i did
If you use the dev version of smods it should be fixed. Or wait for the new release
How would i debuff a card using a consumable?
rn im reading the documentation its helping me figure things out
I've been looking at it
coolio
Meeting a problem with one of my Jokers, its ability is to create this special sticker on a random card that expires after 3 uses, but there are a few problems
- Any subsequent stickers made after the first one either has less than 3 uses or has none, because the player used up all 3 uses of the first sticker
- Multiple stickers shares the same "pool" of uses
- For example, If I have two of the stickers starting off with 3 uses each, after they activate, they'll both have 1 use left instead of 2
I've heard something about shallow and deep copying, so I was wondering if anyone here could give me any pointers
make the counter right on the card itself similar to perish_tally
sounds like you're modifying the base of the sticker, not the instance of the sticker
I'm tampering with both the sticker and the joker to see what works, but yeah, that's fair enough
I never knew perish_tally existed
What Joker or whatever card has that
Perishable sticker
I would like to know, since there's SMODS.has_enhancement/seal/edition to detect modified cards, is there a way to detect non modified one ?
I tried to do something like this but i'm most probably doing the wrong thing :
for i = 1, #G.hand.cards do
if G.hand.cards[i].seal ~= nil and G.hand.cards[i].edition ~= nil and G.hand.cards[i].ability.set ~= "Default" then
end
end
end,```
What i want precisely is to make non modified cards debuffed
Don’t forget to use your mod prefix
Question because i can't figure this out for some reason: why doesn't this debuff the drawn card?
I thought card.debuff = true debuffed it but ig not?
It doesn't have a context, it cant if you look at the use function, it's not a joker this time
mb i'm still learning myself
okay first time trying sounds, how do i play this sound?
(did i even do it right?)
doing this crashes the game
says file doesnt exist
which it does but okay
use SMODS.debuff_card instead
SMODS.debuff_card(selected_card, true)
huh?
it should be "mod prefix"_solitude i think
That crashes the game...
What do i put as the source? Actually, what can i put as the source?
any string
like, how do i explaaain this
im guessing source is there so that until all the source's debuffs are set to false, the card will still be debuffed
so that it wont conflict with other debuffing code, i guess
just put your description in a table
oh
Woo! ty!
-# now how do i undebuff it at the end of the round?
you can also reply with ping but they might not like that xD
similar thing, but set it to false instead of true
hey guys i also need help
I want the card to show a tooltip of a tag
text = {
'Sell this card to',
'create a free',
'{C:attention,T:tag_uncommon}uncommon tag{}'
},
it worked, thanks :3
this does not have the expected behaviour
the tooltip for tag_uncommon is not there :/
despite being in G.P_TAGS
you need to use info_queue lol
that's only for decks
for cards you need to add to loc_vars
info_queue[#info_queue+1] = G.P_TAGS.tag_uncommon iirc
That makes sense, but idk how id tell when the round ends to do that when i can't use context
it werks sankiu
local end_round_ref = end_round
function end_round()
local ret = end_round_ref()
for _,v in ipairs(G.playing_cards) do
if v.ability["a flag so that the code knows which card is debuffed by that"] then
v.ability["a flag so that the code knows which card is debuffed by that"] = false
SMODS.debuff_card(v, false, "source in here")
end
end
return ret
end
this is how i would do it
I'm trying to make a joker that gains mult per wild card scored, but when i spawn it in it crashes the game saying 'attempt to index local 'card' (a nil value)'.
Code:
config = { extra = { mult_gain = 1, mult = 0 } },
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.mult_gain, localize('m_wild'), card.ability.extra.mult } }
end,
calculate = function(self, card, context)
if SMODS.has_enhancement(context.other_card, 'm_wild') then
card.ability.extra.mult = card.ability.extra.mult + card.ability.extra.mult_gain
return {
message = localize('k_upgrade_ex'),
colour = G.C.RED
}
end
if SMODS.has_enhancement(context.other_card, 'm_wild') then
return {
mult = card.ability.extra.mult
}
end
end
I dont really know much about stuff like this if that isn't obvious
I probably did it wrong bc ive never hooked well, anything before
(it didn't work, the card is still debuffed)
are you sure you set the flag of the debuffed card?
like, in here
there should be smt like selected_card.ability.flaggedsmtsmt = true
That's what i was missing lol, it works now! tysm!
you want something like this because context.other_card doesn't exist in every context
calculate = function(self, card, context)
if context.individual and context.cardarea == G.play and SMODS.has_enhancement(context.other_card, 'm_wild') then
card.ability.extra.mult = card.ability.extra.mult + card.ability.extra.mult_gain
return {
message = localize('k_upgrade_ex'),
colour = G.C.RED
}
end
if context.joker_main then
return {
mult = card.ability.extra.mult
}
end
end
ah okay, do i just plug that in place of my other code?
yes
Haiya people, Im trying to set up a joker that converts Jacks/Kings into Queens, is there an existing joker function for turning one card into another?
SMODS.change_base
thanks
is this how i can make the card held in hand upgrade to score more chips when scored later?
Hey 1 question
So
How in god’s green earth you guys make selectable ankh
Instead of random
Select joker copy joker
https://github.com/Steamodded/examples/tree/master/Mods/EditionExamples
towards the bottom has some resources for you
bumping this
do enhancements run calculate if they're in the deck?
i think you need to enable the deck area optional feature
the what
there's an optional smods feature to run calculation in the deck
oh
let me see if i can find the syntax
like this
#💻・modding-dev message
can anyone help me here? I have no idea why this crash is happening
I'm trying to make a joker that upgrades every time a certain amount of diamond cards are scored. I figured out how to make it upgrade, but for some reason every time i try to reset the count it crashes. I've tried having it above the return but it also crashes in that situation
i have a quick question from me, a begginer, how can i make it sothat i have multiples jokers in one mod ? i already have a joker but iwanna add another one in the same mod
you should do it above the return
the problem is that you have a syntax error, you're missing an end or a } or a comma
just add it to the same file
ok but how ?
the same way you did it the first time
when i do it above the return it gives "unexpected symbol" instead
how do I comment out multiple lines?
--[[
]]
--[[ surround them in these brackets ]]
ok thank you
is this the way to make the held in hand cards to score more chips
what's decard
decard is a variable to check if the played hand have multiple suits
So far, if I want a Joker to destroy cards, I set getting_sliced = true to the destroyed card
But I found that it doesn't work with ExtraCredit Ship of Thesus, which checks for context.removed
Hi N
hii
then you're missing an and
also you should have a stricter context check like if context.joker_main and decard then
also do you want the cards to give chips while in hand or when played the next time
i want to give chips when played next time
I've like quadruple checked now, I don't see a single syntax error, it should be working unless it's a problem with the single line itself
if I take out card.ability.extra.cardcount = card.ability.extra.cardmin out, it functions fine
if you're destroying them during scoring you need to use context.destroy_card, else you either need to call the destroying cards context manually or use the new SMODS.destroy_cards function
is there another end below those two
then that's correct yeah
yes
can u send me the whole thing in one pic
here's the whole calculate
oh there's a comma after + 1 that shouldn't be there
that worked! thank you so much!
sometimes i be comma-ing as well
how do I make the text change like baseball card
help, the freak did i do wrong ? i just wantedtoadd another joker
wdym
you probably gave it an atlas that doesn't exist
I want the text of my card to change the value after each round ends similar to how bull increases chips with money
it's supposed to work though no ?
use loc_vars (see the docs)
idk does the "d4rck" atlas exist? did you define it?
mmmmmmmm, great questioni maybeforgor todoit
my spacebar is kinda broken don't mind it btw
I have it as a loc_vars but how do I write it in loc_txt?
is there a context for like
post ease_dollars?
like something i can use to call a return after a dollar bonus
I had to add contexts for all those myself
if you have vars = { 2, 4, 10 }
in your description you can have #1# for 2, #2# for 4, #3# for 10
So now I have a context for dollars changed, hands changed, discards changed, ante changed
Once again if you want em, you can have em
im sensing a pattern (that'd be awesome actually)
so if my code reads vars = { card.ability.extra.xmult } then doing #1# would display the xmult and change with it
yes
k
I'd just recommend changing the fnwk_ prefix I use in these because that's my mod prefix, and I tend to label all my custom contexts to prevent conflicts
--------------------------- Value easing contexts
---------------------------
local ref_ease_hands = ease_hands_played
function ease_hands_played(mod, instant)
local ret = ref_ease_hands(mod, instant)
G.E_MANAGER:add_event(Event({
trigger = 'immediate',
func = function()
SMODS.calculate_context({fnwk_change_hands = true})
return true
end
}))
return ret
end
local ref_ease_discards = ease_discard
function ease_discard(mod, instant, silent)
local ret = ref_ease_discards(mod, instant, silent)
G.E_MANAGER:add_event(Event({
trigger = 'immediate',
func = function()
SMODS.calculate_context({fnwk_change_discards = true})
return true
end
}))
return ret
end
local ref_ease_dollars = ease_dollars
function ease_dollars(mod, instant)
local ret = ref_ease_dollars(mod, instant)
G.E_MANAGER:add_event(Event({
trigger = 'immediate',
func = function()
SMODS.calculate_context({fnwk_change_dollars = true})
return true
end
}))
return ret
end
local ref_ease_ante = ease_ante
function ease_ante(mod)
local ret = ref_ease_ante(mod)
G.E_MANAGER:add_event(Event({
trigger = 'immediate',
func = function()
SMODS.calculate_context({fnwk_change_ante = true})
return true
end
}))
return ret
end```
i mean ywah
You can also ofc edit them to send the mod that just changed
I don't need it for my current purposes so I didn't bother
🙂↕️
And no yeah I'm a firm believer in theft. I want people to steal my stuff so I might as well just give it if ppl need it
me mid updating the credits
Yep, this is way more satisfying
hand over the pack previewer rn

Oh if you want it, sure
i thought it looked so peamly...
I need to make an update to it because it currently requires a lovely patch and tbh it doesn't need one
A hook would work better
there is something i do ill have to dm to see how i can make that work but idk how shrimple it is cause im wack to make it work

It's actually fairly shrimple, only issue is that I ended up recreating the card creation logic because there's no built in way to create a card key without creating a new card and I didn't want to make random keys for the prediction just to destroy the cards initially generated and recreate them
So I guess it doesn’t work with end_of_round?
was trying to prevent it from triggering in any point other than the end of the round, only after the dollar bonus
Yeah the one I made is a kind of naive context that's just universal, any time the dollar ease changes
What specifically is your use case?
literally just want to call a function after the joker's dollar bonus
(sorry i was restarting my computer i accidentally left it on all night)
end of round
joker gives money
same joker calls function
i restarted mine recently after leavin her on for about 2 and a half weeks
-# >horse walks in
you need to patch here probably
hey chat am i stupid
Oh then yeah this one might be a better option
Rather than specifically the dollar ease. Mine is used for a joker that needs to know your current dollar state at all times, and a similar one that needs to know your ante and hands state at all times
SMODS.Sound({key = "visitor", path = "visitor.ogg",})
SMODS.Atlas{
key = 'visitor',
path = 'visitor.png',
px = 70,
py = 95,
}
SMODS.Joker{
key = 'visitor',
loc_txt= {
name = 'visitor',
text = { "{C:red} Pays you a visit.",
},},
atlas = 'visitor',
rarity = 2,
cost = 20,
pools = {["Yahimodaddition"] = true},
unlocked = true,
discovered = true,
blueprint_compat = true,
eternal_compat = true,
perishable_compat = false,
pos = {x=0, y= 0},
config = { extra = {chance = 50}},
loc_vars = function(self, info_queue, center)
return { vars = { center.ability.extra.chance } }
end,
calculate = function(self, card, context, center) --BEHAVIOUR BELOW
if context.selling_self then
play_sound("blasphemy")
return nil
end
if context.joker_main then
-- Play sound and show visual for 850 frames
G.showvisitor = 850
play_sound("visitor")
-- 50/50 chance for either multiplier type
----local visitor_mult = pseudorandom(1, center.ability.extra.chance)
local chance = card.ability.extra.chance
local visitor_mult = pseudorandom(1, chance)
local mult_value = 1
if pseudorandom(1, 2) == 1 then
-- Option 1: XMult between 1 and 50
mult_value = visitor_mult
else
-- Option 2: XMult between 0.02 and 1 (1/50 to 1/1)
mult_value = 1 / visitor_mult
end
return {
message = " ",
colour = G.C.RED,
Xmult_mod = mult_value,
card = card
}
end
end,
check_for_unlock = function(self, args)
if args.type == 'test' then --not a real type, just a joke
unlock_card(self)
end
unlock_card(self) --unlocks the card if it isnt unlocked
end,
}```
(Building off of the yahimod for this specific one in case that matters)
ohhhhh ok
But for a specific dollar giving action, there's def locations for it
do you have an assets/sounds/visitor.ogg
yes! 😭 thats why im so confuse kfjdklgj
Missing modprefix for playsound.
For mine my joker checks the current dollar count and uses a base 10 log to determine the number of digits, and then gives you an extension to your joker count depending on how many digits of money you have
playsound('modprefix_visitor')
whoa sick
oooooooooooh lemme try that
bruh
where is this anyway
state_events
oh i see
how could i add buttons here? ( on the sides )
would this work
no idea
_card.config.center.key == "key"
ahh ok
how we looking
ihave aproblem, my joker addsupthe xmult in his desc but it doesn't multiply the mult while playinga hand
key = "Parada",
loc_txt = {
name = "Parada",
text = {
"This Joker gains {X:mult,C:white}X1{} Mult",
"every time that scoring hand",
"contains three scoring cards",
"{C:inactive}(Currently {X:mult,C:white}X#1#{C:inactive} Mult)"
}
},
atlas = "LegParada",
soul_pos = {x = 0, y = 1},
rarity = 4,
pos = { x = 0, y = 0},
cost = 10,
unlocked = true,
discovered = true,
blueprint_compat = true,
eternal_comat = true,
perishable_compat = true,
config = { extra = {
xmult = 1,
xmult_gain = 1
}
},
loc_vars = function(self, info_queue, center)
return {vars = {center.ability.extra.xmult}}
end,
calculate = function(self,card,context)
if context.before and #context.scoring_hand == 3 then
card.ability.extra.xmult = card.ability.extra.xmult + card.ability.extra.xmult_gain
return {
message = localize('k_upgrade_ex')
}
end
if context.joker_main then
return {
card = card,
xmult_mod = card.ability.extra.xmult,
message = "X" .. card.ability.extra.xmult,
colour = G.C.MULT,
}
end
end,
in_pool = function(self,wawa,wawa2)
return true
end```
you returned center in locvars
change it to card
like this or the 2nd one too ?
both
?
the code is the same but with card insted of center
Hello, what's the best way to have SMODS.create_card use a pool of every jokers from a specific mod?
create an SMODS.ObjectType
oh sry
trying to decipher the frames
saw you offline, sorry
weird
x)
it's indeed a capital X istg if this si it T-T
your never gonna believe me... it was all because of the capital X
-_-
i have the same issues for two cards that works thesame way butthe firstoneuses money and the second one chips
so what do i put for those two?
this description is showing all nils in the collection, for some reason
you need to wrap it in vars = {}
So it's return { vars = {card.ability.extra.mult_mod, math.max(0, cumulative_mult)}}
i got no visible errors, whatcan i do ?
youre not gonna believe this
...
no wait firstly what happened
same asbefore but withchips instead
(CHIPS instead of Chips)
hahahahahahahaha...

How do I make a joker draw cards face down?
wanna hear a story ?
it didn't work
key = "smiley",
path = "Smiley.png",
px = 71,
py = 95
}
SMODS.Joker{
key = "Smiley",
loc_txt = {
name = "This random ass smiley I found",
text = {
"This Joker gains {C:chips}+69{} ",
"every time that scoring hand",
"contains three scoring cards",
"{C:inactive}(Currently {C:chips}#1#{C:inactive})"
}
},
atlas = "smiley",
pos = {x = 0, y = 0},
rarity = 3,
cost = 10,
unlocked = true,
discovered = true,
blueprint_compat = true,
eternal_comat = true,
perishable_compat = true,
config = { extra = {
chips = 1,
chips_gain = 69
}
},
loc_vars = function(self, info_queue, card)
return {vars = {card.ability.extra.chips}}
end,
calculate = function(self,card,context)
if context.before and #context.scoring_hand == 3 then
card.ability.extra.chips = card.ability.extra.chips + card.ability.extra.chips_gain
return {
message = localize('k_upgrade_ex')
}
end
if context.joker_main then
return {
card = card,
CHIPS_mod = card.ability.extra.chips,
message = "+chips" .. card.ability.extra.chips,
colour = G.C.Chips,
}
end
end,
in_pool = function(self,wawa,wawa2)
return true
end
}```
look at how the fish does it
...
you capitalized the wrong chips
i meant the colour
ohhhhhhhh
key = "Smiley",
loc_txt = {
name = "This random ass smiley I found",
text = {
"This Joker gains {C:CHIPS}+69{} ",
"every time that scoring hand",
"contains three scoring cards",
"{C:inactive}(Currently {C:CHIPS}#1#{C:inactive})"
}
},
atlas = "smiley",
pos = {x = 0, y = 0},
rarity = 3,
cost = 10,
unlocked = true,
discovered = true,
blueprint_compat = true,
eternal_comat = true,
perishable_compat = true,
config = { extra = {
chips = 1,
chips_gain = 69
}
},
loc_vars = function(self, info_queue, card)
return {vars = {card.ability.extra.chips}}
end,
calculate = function(self,card,context)
if context.before and #context.scoring_hand == 3 then
card.ability.extra.chips = card.ability.extra.chips + card.ability.extra.chips_gain
return {
message = localize('k_upgrade_ex')
}
end
if context.joker_main then
return {
card = card,
chips_mod = card.ability.extra.chips,
message = "+chips" .. card.ability.extra.chips,
colour = G.C.Chips,
}
end
end,
in_pool = function(self,wawa,wawa2)
return true
end
}```
oh, x)
key = "smiley",
path = "Smiley.png",
px = 71,
py = 95
}
SMODS.Joker{
key = "Smiley",
loc_txt = {
name = "This random ass smiley I found",
text = {
"This Joker gains {C:chips}+69{} ",
"every time that scoring hand",
"contains three scoring cards",
"{C:inactive}(Currently {C:chips}#1#{C:inactive})"
}
},
atlas = "smiley",
pos = {x = 0, y = 0},
rarity = 3,
cost = 10,
unlocked = true,
discovered = true,
blueprint_compat = true,
eternal_comat = true,
perishable_compat = true,
config = { extra = {
chips = 1,
chips_gain = 69
}
},
loc_vars = function(self, info_queue, card)
return {vars = {card.ability.extra.chips}}
end,
calculate = function(self,card,context)
if context.before and #context.scoring_hand == 3 then
card.ability.extra.chips = card.ability.extra.chips + card.ability.extra.chips_gain
return {
message = localize('k_upgrade_ex')
}
end
if context.joker_main then
return {
card = card,
chips_mod = card.ability.extra.chips,
message = "+chips" .. card.ability.extra.chips,
colour = G.C.CHIPS,
}
end
end,
in_pool = function(self,wawa,wawa2)
return true
end
}```
Is there anything that can be done with stuff that's already there? I checked Pokermon for example and it checks for the atlas used, but it doesn't work
send it through
__discord formatting like this though: __
```lua
--code
```
?
wdym
i send you the file ?
when you paste it in
have that surrounding your code
it'll format for lua
[patches.pattern]
target = "functions/common_events.lua"
pattern = "if v.yes_pool_flag and not G.GAME.pool_flags[v.yes_pool_flag] then add = nil end"
position = "after"
payload = '''
if G.GAME.current_alignment ~= "chameleon" then
if v.set == 'Joker'
and v.config.alignment ~= G.GAME.current_alignment
and G.GAME.current_alignment_only then
add = nil
end
else
if v.set == 'Joker'
and G.GAME.current_alignment_only
and v.atlas ~= "CrazyStairs_atlas" then
add = nil
end
end```
oh
i feel like this is overcomplicating it, just use an objecttype
yeah now put "lua" after it (on the top one)
lua exemple
does the object type go there
yes
but wouldn't the type be Joker
no
so it works as subtype
basically yeah
not the subhject tho ._.
easier (for me) to read is all
ty 
oh ok
i think i have an idea now
seal location is sprite based no? just move the sprite
i still don't knowhow to resolve my problem, it got ignored in between T-T
me waiting for you to send:
Yes, but no.
SMODS.Atlas {
key = "smiley",
path = "Smiley.png",
px = 71,
py = 95
}
SMODS.Joker{
key = "Smiley",
loc_txt = {
name = "This random ass smiley I found",
text = {
"This Joker gains {C:chips}+69{} ",
"every time that scoring hand",
"contains three scoring cards",
"{C:inactive}(Currently {C:chips}#1#{C:inactive})"
}
},
atlas = "smiley",
pos = {x = 0, y = 0},
rarity = 3,
cost = 10,
unlocked = true,
discovered = true,
blueprint_compat = true,
eternal_comat = true,
perishable_compat = true,
config = { extra = {
chips = 1,
chips_gain = 69
}
},
loc_vars = function(self, info_queue, card)
return {vars = {card.ability.extra.chips}}
end,
calculate = function(self,card,context)
if context.before and #context.scoring_hand == 3 then
card.ability.extra.chips = card.ability.extra.chips + card.ability.extra.chips_gain
return {
message = localize('k_upgrade_ex')
}
end
if context.joker_main then
return {
card = card,
chips_mod = card.ability.extra.chips,
message = "+chips" .. card.ability.extra.chips,
colour = G.C.CHIPS,
}
end
end,
in_pool = function(self,wawa,wawa2)
return true
end
}```
hate when it's one of those
So I've got this code for a tarot that destroys a card for money
use = function(self,card,area,copier)
ease_dollars(2)
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]
card:start_dissolve(nil, i == #G.hand.highlighted)
end
return true end }))
return {
message = '$2',
colour = G.C.MONEY,
delay = 0.45,
remove = true,
card = card
}
end,
But I've just discovered it doesnt work with Canio. Is there a simple way to make it work or am I going to have to rewrite some code? I know destroy_card is a little funky
chip_mod not chips_mod
only this ?
i dont understand how this destroys cards at all actually
oh wait no i see it
the return doesnt do anything
you need to call the remove_playing_card context manually or use SMODS.destroy_cards
still here
Can you tell me what I need to add to make it work?
right, forgot SMODS had that function
same issues but with money mi boy
SMODS.Joker{
key = "D4rck",
loc_txt = {
name = "D4rck",
text = {
"This Joker gains {C:money}+1 ${} ",
"every time that scoring hand",
"contains three scoring cards",
"{C:inactive}(Currently {C:money}#1#${C:inactive})"
}
},
atlas = "d4rck",
soul_pos = {x = 0, y = 1},
rarity = 4,
pos = { x = 0, y = 0},
cost = 10,
unlocked = true,
discovered = true,
blueprint_compat = true,
eternal_comat = true,
perishable_compat = true,
config = { extra = {
money = 1,
money_gain = 1
}
},
loc_vars = function(self, info_queue, card)
return {vars = {card.ability.extra.money}}
end,
calculate = function(self,card,context)
if context.before and #context.scoring_hand == 3 then
card.ability.extra.money = card.ability.extra.money + card.ability.extra.money_gain
return {
message = localize('k_upgrade_ex')
}
end
if context.joker_main then
return {
card = card,
mod = card.ability.extra.money,
message = "$" .. card.ability.extra.money,
colour = G.C.MONEY,
}
end
end,
in_pool = function(self,wawa,wawa2)
return true
end```
Can you tell me what I need to add to make it work?
oops
if context.joker_main then
return {
dollars = card.ability.extra.money
}
end
if i did a poker hand before i would but uh
yeah i got nothing
i would check how other mods do poker hands
I looked it up, it's not clear at all😀
what's not clear

i can set you free fianlly
yw
does incrementing values with (var += number) not work in lua?
no
no?
time to not play my freshly working mod :)
somecom sleep is a thing btw
somecome ?
What does it mean if next(parts._flush)?
What is the correct spelling of Flush Five right here?
parts._???
i dont think there's one, you would check for parts._flush and parts._5
Hi, I'm trying to use smods post_trigger and its working so far, but when retirgger jokers (like seltzer) trigger it doesn't work
Fix?
Hey itsameeee. How are you doin. I wanted to ask if someone knows how to replace an already existing joker (8 ball in my case)
You mean turn a joker into a different one?
I want my card to increase for each played card would this work for that or what would I need it to change
if context.cardarea == G.play and context.main_scoring return {xmult = card.ability.extra.xmult + ( 1 * G.play )}
something like that
card:set_ability("j_modprefix_key")
No, it would be ```lua
if context.individual and context.cardarea == G.play then
card.ability.extra.xmult = card.ability.extra.xmult + 1
end
Also it wouldn't work bc you forgot a then and a end
The card you want to turn into a different joker?
Help guys
there was an end I just didn't copy it but thanks for pointing out the then
i just want to replace 8 ball by a custom 8 ball. how could ii run the set ability on 8 ball (like ik what set ability does, but wat)
You mean you want 8 Ball to work different?
so if I want something to repeat for each card played I doif context.individual and context.cardarea == G.play then
How the hell would you even select 6 cards, is my first question
also you need to specify the card you're getting the rank of with rank.key, there may be more issues but that's the main one i see
Yes.
thank you that helps with another joker
SMODS.change_play_limit(1)
ye, buut i just wanna replace it
it's that easy? The more you know
do I need the return? if not when is return needed and when is it not?
no matter what i patch into here, the game gets stuck and the cash out button never appears
i can get around it by hitting enter, but i literally gain no money
what do i do?
It is needed when you want to send a message or give mult or chips or similar.
don't return
oh ok
but not for x mult?
xmult is still giving mult.
I can play 6 cards with a joker, I want 6 kings and I wrote key = 13, but the error
so then why doens't that have return or is only when scoring?
Is there a way to track how much money has been earned over a run?
Because it's not needed.
ok i can cash out now, but it doesnt call the function
remove the func = function() part
ohhhh ok
but why, is it never required or is it only required when scoring?
In base SMODs, there's no function to discard a card passed through as a parameter, right? All discarding goes through the discard from highlighted function?
well it called the function
_card instead of card
also context doesn't exist
Replace (rank.key == '13') with j.base.value == 'King'
got it got it
No, it would be xyu[j]:get_id() == 13
it workssssssssss thanks
That would work better and more accurate to what they wanted, i was just using what i knew to help
Hey guys, what does this mean? The line referenced has this SMODS.destroy_cards(card)
Update SMODS
I updated it a few days ago
Syntax error
what's your version
j is a number not a card
Says 1.0.0-beta-0506a
yeah, update
Welp
What do I need to write to make it work, I wanted to make a hand of 6 kings of hearts suit
how do I make it so that I can't get a copy without showman?
xyu[j]
that's how it works by default, what do you mean?
If you're spawning it in with cheats, it can appear in the shop even if you still have the cheated in one
thank you
np
I didn't know it worked like that
i was confused about it for a while as well
what parameters do i have to give to pseudorandom_element() ?
[table], pseudoseed("[seed here]") iirc (ik the first one is right but idk if the second one is the one that's needed)
-# Yay i helped :D
(in the next smods release you can use a string directly as pseudoseed 🙂 )
How could I have a consumable give a card 2x chips and +20 mult that's removed on score?
I choose 6 cards but it still shows flush five😞
Is there a way to detect how much money was earned over the run?
cough cough vanilla remade bull cough cough
-# https://github.com/nh6574/VanillaRemade/blob/d519ea2c28a92ab0abc08a8a83fc7cd8d998d411/src/jokers.lua
how many rows/columns they use in the collection
You can set the size and length of rows for the custom consumable page
oh ive been looking for that link thanks
You mean if money was earned at all during the run?
Not current money?
yeah
You would hook ease_dollars and check if the value is more than 0 and store the number in a G.GAME variable probably.
Im pretty new to this and dont really understand what most of that means
Heeeeeeelp pls
In LUA, it is a very important concept to understand that everything is a variable and all variables may be edited in runtime. This includes functions. With modding other peoples' LUA files, like Klei's basegame code, you may find yourself wanting to run your code before or after the original fun...
alright i'll read that thanks for the help!
You need to make it be above Flush Five
Well, how do you do it
above_hand = "Flush Five"
boop
W Klei
I do this for my own Joker
A joker or playing card?
Played card
It still goes like this
Alright, thank you!
It works, and it works crookedly if you change j = 1 to j = 6
how do i make a mod icon?
You would make an atlas with the key modicon
thanks
how can i make variables persist between sessions? (if you quit out of a game and then continue)
and also how can i make them reset to default at the start of a new run
depends on what you want to do
is this for a joker?
yes
anything you save in card.ability.extra (local) or G.GAME (global) gets saved
ok yeah that makes sense. its a global but not exactly inside of G.GAME, how can i add it there?
just put it there
like G.GAME.yourvariable = value
i recommend adding your mod's prefix tho
well alright, thanks
I found the issue, I got it to work but the fix is currently messy
this is what I have now (the joker on the left uses post_trigger)
stupid question but how do i load in my custom deck? i just cant seem to figure it out
ive looked at a lot of source code but i cant seem to find what im looking for
Someone help me pls :/
I want to make a joker that when another joker is destroyed, it gains chips, but I don't know how the joker will identify when a joker is destroyed.*
You need to hook Card:remove()
are you using smods
yup
Will the sale also count?
writing your mod like this should just work
https://github.com/nh6574/VanillaRemade/blob/main/src/backs.lua
Yes.
but I want only destruction to count
lemme check something real fast
i think im stupid
How would I trigger a sound upon the card being created?
You can make selling not count.
how
Use the add_to_deck function.
not G.CONTROLLER.locks.selling_card I think perhaps.
It triggers when it is added to slots.
Ohhh
can anyone point to a reference mod that adds new consumable types, rarirites etc?
thank you
Bitch, tell me why it's not working.
Aside from this (which i still need help with), how would I discard the first and last cards selected? I've messed with G.FUNCS.discard_cards_from_highlighted but every time it discards every selected card no matter what i try
that's not a straight flush?
@red flower so the issue im having is that my deck does not load onto the deck list and i cannot find what im doing incorrectly
but the code seems to match fine
heres the code if you would like to see
i think you need to unhighlight the rest
is the code in your main file
let me double check
Header spotted 
is that the issue?
Not necessarily but you should be using a metadata .json instead
oh i am
It should be flush six, but for some reason it doesn't work, shows it's flush five
can i remove the steamodded thing then?
Yes
alrighty
well in the code you're checking for a straight flush
How do I check for flush five?
Also the Steamodded version you’re checking for is INCREDIBLY old
i saved and reloaded
oh yea i just put that there cause it looked right
i dont think it contributes anything to the code
i will change it tho
Likely not but it’s better safe than sorry
alright
i still dont know how to make my deck appear in the deck list tho
like when starting a new run
i hate lua so much
If you click on the mods tab on the main menu, does your mod show in that menu?
Not a slave
And is this deck in your main file (or is it being loaded in your main file)
Main file being the one defined by your metadata
you mean in the same location as the json correct?
i mean i didnt say that would solve your problem
No
In your metadata there should be a main_file parameter
What's going to solve it?
ah yes sorry i looked in my metadata and i see what you mean now
one second
forgive me
That worked, now back to trying to solve my first issue, ty!
idk
Is your deck in that specified file or a different one? If it’s in a different one that’s ok, you’d just have to load it in your main file
yea i got that once you pointed me toward that
i appreciate it
i see what needs to change now
i had the wrong file as the main_file it seems
yeesh
Ah rip
Why are you telling me it's right if you don't know how it's supposed to work?
Damn that is some mean tude dude
Don’t expect people to help you if you’re gonna be like this
Coding can be frustrating at times but you don't need to take that out on others :/
People won’t code your mod for you
I can read code to know if it makes sense or not, that doesn't mean I know the solution
@sturdy compassi got it! thank you!! just one more thing
i have a custom sprite for the deck (not in an atlas its a singular png)
how do i make the deck sprite the one i drew
?
You would still need to define an atlas, even if it’s just one png
nah that's smods
oh what
ew
look man i dont like lua
adding more stuff to it makes it mor eof a headache for me
especially after i spent like 2 days readign the lua manual
ok the lua manual is trash
Lmfao
explains a lot honestly
I learned just by doing stuff here and I think I’m having a pretty decent time
FUCK YES I GOT IT
it explains everything
in the most obtuse way possible
lolololol
thanks for making me feel better about it
im not the brightest but reading that manual made me feel like a neanderthal
it was really discouraging to read lmao
i was doing my best
yeah it's not good, thankfully it was easy for me to transition from python
yea that makes sense
I can't belive an idea that stupid worked, but it did lmao
-# (I got the consumable I was asking abt here working)
btw i see it everywhere and im usign one just in case
but whats an src file and why does every mod i see use it
can you elaborate?
is there a way to use blueprint_effect on a joker in the collection rather than in the joker cardarea
prob stupid question
in the mod folders i have (was using them for reference), like cryptid and some other things, they have an src folder
like
just a folder called 'src'
no, i think you need to make a fake card
and it seemed important so im using one but i dont know what it means
yeah thats what i thought
src stands for source and it usually means the source code, it's normal for programs in general to have the code in a folder called src
but it's not mandatory and there's no special function to it
Good you haven't given them the true reason, that's it's a code for the secret cul-
shh
you guys mind looking at this and telling me whats wrong
i think im using atlases wrong but im not too sure
dont ask to ask just ask and show code
not understanding how to fix the ERROR message or how to change the background color
atlases should have their path defined in SMODS.Atlas
whats some example syntax of this?
SMODS.Atlas {
key = "Decks",
path = "Decks.png",
px = 71,
py = 95
}
and i can put this above the code i just submitted?\
i have mine like this
how dod you write this
do i need to do something with create_UIBox? im looking through other mods but i really have a hard time seeing whats wrong about mine in particular, and none of these use create_UIBox
-# like this
so what you do it on both sides?
no
oh I see

my gratitudes