#💻・modding-dev
1 messages · Page 401 of 1
I mean it's worse ice cream
it lasts longer though
ice cream loses its value far before it runs out
imo
is that even true?
oh ice cream is per hand isn't it
anyone know how to use the deckskin crediting from the steamodded PR merge? 
in that case I think it's fine, fills a slightly different niche than ice cream
ok, but now i'm trying to do this, and it doesn't trigger at all
wait no jokers at all?
yup
i see no problem with this it's just 5 painted decks
Inside the loop access the joker with G.joker.cards[i]
they won't magically appear in the context
you don't need the outermost for loop, that's what other_joker is for
and my guess is that there's something wrong with the expression context.other_joker.label == "j\_CRB\_"..COOKIE_TEAMS.brave_team[j]
they will actually
it's context.other_joker
is it even possible to win with that?
jokerless challenge exists
jokerless is possible
mmm
this is jokerless with a cluttered shop and +10 handsize
this is just worse because in theory they'll still show up in the shop
they do in practice
i feel like the handsize makes up for it though
simply take ethereal voucher
Actually, lets start from zero, what do you want to achieve
can someone tell me why the mult gain doesnt trigger?
^
yeah antimatter still exists for 1 (1) joker slot
it will be a good idea if tarots card have x2 stats?
negative tag goes crazy though
i also added another effect since then
uh i forgot that exist xd
doing anything more than x5 painted deck kinda ruins the joke
and yes it does switch to 1
sorry what is eval or evale? i see it in various mods but dont know what it means, like for "evalue"?
nvm i lost to ante 2 needle
trying to check if a scored card is a queen, and if it has no edition or isn't polychrome it's turned into a polychrome queen but i'm getting an error for the second if statement
eval is a command you can type into the console in DebugPlus to run lua code
- +4 base mult
- +2 base mult for each common joker
- if an eligible joker exists from the list, x0.1 mult after the other joker scores
i'm having a hard time making the 3rd effect work
share the error?
accidentally put : instead of . on the polychrome check
oh nvm don't use a : for edition
oooohhhh, thx
is it better to do separate instances of take ownership when it comes to the same card
or just use the same one (what im doing now)
I don't get the 3rd effect, what gets multiplied?
the joker's mult, the hand mult or smt else?
whatever the other joker scores
can you show where you define COOKIE_TEAMS
so your joker increases the amount of mult some certain other jokers give after they score?
yeah
is it meant to be a permanent upgrade to that other joker
do scored cards/cards in your deck have a field where they store the amount of chips they give?
card.base.nominal iirc
that's just the chips from the rank
awesome, thanks
otherwise card:get_chip_bonus()
this doesn't account for bonus cards, does it?
that one should
damn, I want just the base + any upgrades like from Hiker, but not a card's enhancement
Which music track gets replaced?
that should be card.base.nominal + card.ability.perma_bonus
i think...
the variable names might be a bit different, it's been a while
I'll try it out, thank you so much
so, is there a way to do this?
What music can I replace?
What can I use to debuff a joker?
What music can I replace?
never messed with music before, so I'm not sure
Try adding a check for if context.other_joker in addition to filtering only the jokers you want to modify, then you'd have to modify the ability table of that other joker to upgrade it
I'm not 100% sure that will work as it's not very clear what other_joker does specifically
better look at my code. im 99% sure that the ownership and hook work fine, since the eval returned 1 , but what can i do to get the joker to actually use that variable chudhit, because apparently using the G.GAME method doesn't work?
1: joker's calculate function (where i think the issue is)
2: hook into igo (note chudhit)
3/4: ownership of WOF (inverse of my previous wheel failcheck, which is used for a joker's unlock condition rather than an effect)
if anyone has any ideas/solutions, ping me just in case i miss it
You can replace any music in the game if you make an SMODS.Sound object
it needs to contain the word music in its key and you have to add a select_music_track function that will return a number, the higher the number the higher the priority it will have over other music tracks
Yes yes but what tracks?
can you explain what you want in detail
Music 1 through music 5
you want to replace the original music files with custom ones?
update on my x5 painted deck:
lost to ante 5 fish
I'm actually not too sure, my guess reading the wiki would be to use the select_music_track function in your Sound object to replace the music when the result of SMODS.Sound:get_current_music() is one of the ones you want to replace
just a guess btw
now that i think about it, the extra effect is useless for mult-only jokers
never done that
chat what do we think
isn't there a stake that removes 1 hand
so you would start at 0 with that deck in that difficulty
not in vanilla, no
blue stake removes one discard though
ah right, it was a discard
yeah, i'm scrapping this idea. there's already the element thing to buff jokers
chat ok so i got a joker and everytime i hover over it i get the error [Smods bruh "HarmfulJokers.lua":37: bad argument #1 to 'ipairs' table expectes, got nil, i based it off of the cloud 9 code so idk what the problem is. here is the jokers code ```SMODS.Atlas {
key = "HarmfullJokes",
path = "HarmfullJokes.png",
px = 71,
py = 95
}
SMODS.Joker {
key = 'GraffJ',
loc_txt = {
name = 'Street Art',
text = {
"{C:mult}+#1#{} Mult for each Seal in your deck"
}
},
config = { extra = { mult = 4 } },
loc_vars = function(self, info_queue, card)
-- Count sealed cards in the player's deck
local seal_count = 0
for _, c in ipairs(G.playing_cards) do
if c.ability and c.ability.seal and c.ability.seal ~= 'None' then
seal_count = seal_count + 1
end
end
-- Calculate total Mult gain
local total_mult = seal_count * card.ability.extra.mult
return { vars = { total_mult } }
end,
rarity = 1,
atlas = 'HarmfullJokes',
pos = { x = 0, y = 0 },
cost = 6,
calculate = function(self, card, context)
if context.joker_main then
local seal_count = 0
for _, c in ipairs(G.playing_cards) do
if c.ability and c.ability.seal and c.ability.seal ~= 'None' then
seal_count = seal_count + 1
end
end
local total_mult = seal_count * card.ability.extra.mult
return {
mult_mod = total_mult,
message = localize { type = 'variable', key = 'a_mult', vars = { total_mult } }
}
end
end
}```
honestly this is incredibly difficult, you have only 1 hand to work with, no money cus no hands left at end of round, and there's no point to the joker slots if you can't fill them cus no money
I had an idea for a deck called Void Deck:
No Tarot cards,
All Planet cards are replaced by
Black Hole
Does it crash when you hover in collection
ALSO its only when i hover over the card
that is a significantly better idea
feel free to use it 🙂
no mine is funnier
The error is saying you passed nil to ipairs, since it happens when you hover it it's most likely the loc_vars function, so presumably G.playing_cards is nil when you hover over it
is there a function that scored cards call to be scored? like a card:score or something like that
uhhhh, im kinda new to this so what does that mean o-o
oh, in that case try replacing this line for _, c in ipairs(G.playing_cards) do in the loc vars function with for _, c in ipairs(G.playing_cards or {}) do
hmm ill try that, just to be sure this is just getting the amount of playing cards in your deck and hand right?
How do I make this debuff stick? Currently it gets wiped at the end of the round.
use = function(self, card, area, copier)
local debuffed_joker = pseudorandom('bomb', 1, #G.jokers.cards)
G.jokers.cards[debuffed_joker].debuff = true
delay(0.5)
ease_dollars(card.ability.extra.money)
delay(0.3)
end,
can_use = function(self, card)
return G.jokers.cards
end
it's getting the amount of cards with seals in your full deck
... :O
just easier Jokerless smh
alright yeah, thats what i thought
not really
jokers still appear and you have 1 hand
I guess that's true but you can make them negative and if you're somehow dying with a 16 card hand and 2/3 discards its your fault i think
also @normal crest is there a way to make it show how many cards it finds?
i also didn't ban blank or antimatter so you can take one (1) non-negative joker if you get lucky
me taking blueprint:
jk even I'm not that greedy
i kinda want to get rid of consumable slots
are you 100% sure it only happens when you hover over it, also is that the entire HarmfulJokers.lua file
what rarity would unconditional X2 Mult be?
yes 100% sure and yes
ill check again but :I
rare if the duo is anything to go off of
you can just straight up mess with consumable slots mid-run, I tried it with a joker but it gets really buggy if you sell the joker while holding 3 consumables
bump
the duo is not anything to go off of
@normal crest
what they mean is that The Duo is X2 and its pretty much unconditional
ah
photograph is also pretty much unconditional though
alr
your loc_vars is probably written wrong
photo is also one of the best jokers so
can you show your current code, after the modification i said
just to be sure you changed the right thing
true
balancing jokers off of the best jokers is bound to become power creep
might be less of a "x2 mult is common" thing and more of a "photograph should be uncommon/rare" thing
yea
key = 'GraffJ',
loc_txt = {
name = 'Street Art',
text = {
"{C:mult}+#1#{} Mult for each Seal in your deck"
}
},
config = { extra = { mult = 4 } },
loc_vars = function(self, info_queue, card)
-- Count sealed cards in the player's deck
local seal_count = 0
for _, c in ipairs(G.playing_cards) do
if c.ability and c.ability.seal and c.ability.seal ~= 'None' then
seal_count = seal_count + 1
end
end
-- Calculate total Mult gain
local total_mult = seal_count * card.ability.extra.mult
return { vars = { total_mult } }
end,
rarity = 1,
atlas = 'HarmfullJokes',
pos = { x = 0, y = 0 },
cost = 6,
calculate = function(self, card, context)
if context.joker_main then
local seal_count = 0
for _, c in ipairs(G.playing_cards or {}) do
if c.ability and c.ability.seal and c.ability.seal ~= 'None' then
seal_count = seal_count + 1
end
end
local total_mult = seal_count * card.ability.extra.mult
return {
mult_mod = total_mult,
message = localize { type = 'variable', key = 'a_mult', vars = { total_mult } }
}
end
end
}```
this is why i balance all my jokers around loyalty card
S&B + Smiley > Photo + Chad, don't @ me
yeah you added the or {} in the wrong loop, I was referring to the first one, in the loc_vars function
the one you added in that snippet is not needed
bump
7 mult or under, S&B smiley is better, anything higher, photochad is better
alright one sec
use SMODS.debuff_card
how would I tell if a sold card is a joker
if context.selling_self in the Joker's calculate
or are you doing like a "each joker sold" situation
dont think thats what they meant
each joker sold
@normal crest it works perfectly, time to add the other 4 jokers. mind if i ping you again if i need help?
if context.selling_card and context.card.ability.set == "Joker"
thank u :3
sure, feel free
does context.remove_playing_cards count discarded cards or just destroyed cards
nvm I can't read
How would I target specifically destroyed cards tho
Ok, how would i make a shop items price be set to 0?
how do i stop a joker from selling itself until its done doing the effects on sell?
nvm
What item specifically?
what is the joker's code?
and whats the actual effect
SMODS.Joker{
key = "Yuu",
loc_txt = {
name = "Yuuri",
text = {
"A girl who aclaims being a God.",
"To prove it, she gives {X:mult,C:white}6{} and",
"{X:chips,C:white}160{} Chips to you!."
}
},
atlas = "Yuu",
pos = {x = 0, y = 0},
rarity = 4,
soul_pos = { x = 0, y = 1},
cost = 6,
unlocked = true,
discovered = true,
blueprint_compat = true,
eternal_comat = true,
perishable_compat = true,
config = { extra = { chips = 120, mult = 6 }, },
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.chips, card.ability.extra.mult } }
end,
calculate = function(self, card, context)
if context.joker_main then
return {
mult = card.ability.extra.mult,
chips = card.ability.extra.chips
}
end
end
}
is it X6 mult?
put it in triple `
where
they mean it's discord, so it's shown like this
SMODS.Joker{
key = "Yuu",
loc_txt = {
name = "Yuuri",
text = {
"A girl who aclaims being a God.",
"To prove it, she gives {X:mult,C:white}6{} and",
"{X:chips,C:white}160{} Chips to you!."
}
},
atlas = "Yuu",
pos = {x = 0, y = 0},
rarity = 4,
soul_pos = { x = 0, y = 1},
cost = 6,
unlocked = true,
discovered = true,
blueprint_compat = true,
eternal_comat = true,
perishable_compat = true,
config = { extra = { chips = 120, mult = 6 }, },
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.chips, card.ability.extra.mult } }
end,
calculate = function(self, card, context)
if context.joker_main then
return {
mult = card.ability.extra.mult,
chips = card.ability.extra.chips
}
end
end
}
oh
ohhh
got it
but what i have to do
i dont actually see anything wrong here
I don't see any obvious problems, make sure to start a new run and get a new copy of your joker
my joker doesnt joker
oki
+6 mult and +120 chips is incredibly weak by the way
for a legendary at least
unless its meant to be X6 mult?
i use the legendary to have it on the legendary deck
and test it faster
and you can click 3 on a joker in collection to spawn it
oh
is this a good way of doubling the nebula deck effects
(note: "good" as in makes sense not "good" as in good game design)
wouldnt you return one normally and then a second one in extra
not my code but returning both like that should still work
oh ok
what rarity should this be?
steel cards are very good, so i feel like this should be pretty high rarity right?
idk
I'd make it Rare
i have all of my uncommon at 6
maybe 7 or 8 bucks
captain american understanding reference gif
you can use gifs
do yall think this is a good (as in makes sense) way to double nebula deck effects
Just all shop items being givin a 1-5 chance to be 0 dollars
but not tenor gifs?
@normal crest ill send what i got in a sec if you need an example of what i mean
wdym no tenor gifs, all should work
anyways is unconditional X2 mult fine as uncommon?
imo yes
doesnt work
idk whats wrong with my balatro
if it's uncommon yeah
uhhh you will probably have to loop through 3 different lists to cover all shop items
Wut 
check cryptid's divide code card
that sets item cost
Hmm i can check that ig
G.shop_jokers, G.shop_vouchers and G.shop_boosters, looping through all of those and having a 1 in 5 chance to set card.ability.couponed = true on each
using other mods and vremade to find stuff is very useful
i think enough has happened that i can bump this
How would I go about copying a specific card
I'm looking at DNA but I don't quite understand the parameters of the copy_card function
why does this crash when i try to play with this deck?
SMODS.Back{
key = "cosmicdeck",
unlocked = true,
config = {extra = {
consumable_slots = -2,
vouchers = {'v_telescope', 'v_observatory'}
}},
atlas = 'Backs',
pos = {x = 0, y = 0},
loc_vars = function(self,info_queue,card)
return {vars = {localize{type = 'name_text', key = self.config.extra.vouchers[1], set = 'Voucher'}, localize{type = 'name_text', key = self.config.extra.vouchers[2], set = 'Voucher'}, self.config.extra.consumable_slots}}
end,
apply = function(self, back)
G.GAME.starting_params.consumable_slots = G.GAME.starting_params.consumable_slots + self.config.extra.consumable_slots
for k, v in pairs(self.config.extra.vouchers) do
G.GAME.used_vouchers[v] = true
G.GAME.starting_voucher_count = (G.GAME.starting_voucher_count or 0) + 1
G.E_MANAGER:add_event(Event({
func = function()
back.apply_to_run(nil, G.P_CENTERS[v])
return true
end
}))
end
end
}
what's the crash
ah
the error is caused by back.apply_to_run it should be back:apply_to_run
Either way
I don't think your code is ideal
blame vanillaremade
bump
I am pretty sure Backs can start with vouchers from just their config
how
games, infinite games, but no games type deck
real
not as bad as this though
Remove your apply function for now, then in the config just do
config = {
consumable_slot = -2,
vouchers = { 'v_telescope', 'v_observatory' }
}
no extra
literally just:
- create a copy variable
- make the variable equal to a use of
copy_cardlikecopy_card(context.full_hand[1], nil, nil, G.playing_card)(this is a cleaner DNA version) - make sure to update the card limit by 1
- then do a table.insert using G.playing_cards and your copy variable
- then emplace using your variable and set the visibility to nil
I saw that part
I'm grabbing the card from context.removed tho so I don't know how that will work with the context.full_hand[] stuff
this is gonna be fun to debug
what's context.removed again
I think it's where all the destroyed cards go? it wasn't very clear on that
I hope it's that because that's what I'm going for
you probably have to use an earlier context
I think there is one called modify_scoring_hand
it's in context.before, same as Midas Mask
yeah that's not early enough for what you're trying to do unfortunately
I see
that's not the name
let me look it up for oyu
seems like it's a table of all the destroyed cards
thank you
oh wait it is
that's small, anyway that's the info you have in that context
it happens for each card individually it seems
o
Was making a joker that creates a copy of any destroyed card
calculate = function(self, card, context)
if context.modify_scoring_hand then
local debuffed = 0
for _, scored_card in ipairs(context.scoring_hand) do
if scored_card.debuff then
debuffed = debuffed + 1
G.E_MANAGER:add_event(Event({
func = function()
scored_card:set_debuff(false)
scored_card:juice_up()
return true
end
}))
end
end
if debuffed > 0 then
return {
message = localize('k_buffed'),
colour = G.C.PURPLE
}
end
end
end
this is what I got
the thing is, I can get the card to work but visuallly it looks terrible. I want the un-debuff to happen at the same time as the juice-up but I can never get them to line up without using a ton of delay, but then the player has to wait for the delay which is obviously bad
I can show what I mean if you want
and youre aware that context.removed is within context.remove_playing_cards
yea
Hey all, I am trying to read through the game's source code to understand how randomness is implemented. I essentially am trying to generate similar information to "The Soul", or rather understand how it is done. I've been trying to analyze it myself, but I am really struggling to see how pseudorandom, pseudoseed, pseudohash, etc. interact with one another to create values. Any help in my quest to understand this is greatly appreciated.
i have my code like this
let me see if i can whip something up
thank uuu 
are you trying to understand randomness in lua in general?
cus it's just using the math library of lua
Nono - just how the game takes it and turns it into generating tags and bosses and shop order, etc.
also bump
G.playing_card = (G.playing_card and G.playing_card + 1) or 1
local copy_card = copy_card(context.removed[1], nil, nil, G.playing_card)
copy_card:add_to_deck()
G.deck.config.card_limit = G.deck.config.card_limit + 1
table.insert(G.playing_cards, copy_card)
G.hand:emplace(copy_card)
copy_card.states.visible = nil
G.E_MANAGER:add_event(Event({
func = function()
copy_card:start_materialize()
return true
end
}))
try this maybe
chat what do we think
@normal crest super strange idea, what if i used the stuff from the free shop skip tag? I wouldnt know how to make it work with a joker so i might need a lot of help with this one but :P
Also how would i even find that
Honestly I'm not an expert on it, but from my understanding it's just using a seed to guarantee the same random numbers are generated each time, then using those numbers it decides what to spawn ingame
then using those numbers it decides what to spawn ingame
This is the part I am trying to find/understand
truthfully it makes me sad too
but i'm not making the textbox even taller so
that's actually what my suggestion was, pretty sure that tag just sets card.ability.couponed = true
it kinda worked
Tried to do a straight full of glass cards and it duplicated the first one five times
why is green deck in there
honestly it's incredibly messy, but in Mods/lovely/dump/functions/common_events.lua in the create_card function you will see a lot of it
im fusing it with super black deck later
so you have awful income
well youve gotta change the numbers around silly
it's using dna numbers rn
once i get it done ill put it in here
is this where I would use the _ variable
lua's system is confusing to me
unfortunately it's not all done in one place, there's a bit of everything in every file so trying to understand all of it will take a lot of patience and time
I gotcha. I appreciate the direction. I'll see what I can do!
good luck soldier o7
Can you tell me how to make text animation like in the misprint joker?
you can find the source code of the game in your Mods folder, under Mods/lovely/dump
tag codes is in tag.lua
and you'd just ctrl + f for "coupon tag"
you should get a pretty good idea of what to do with that
or actually what context do you have it in
wdym
oh
#💻・modding-dev message it would be in context.remove_playing_cards
(the variable didn't seem to work ;-;)
Why is it so...
DECK
ingredients:
- x2 Nebula Deck
- x1 Green Deck
- x3 Black Deck
- x8 Painted Deck
why
funny
dude decking decks with decks to make more deck, that surely will be used to deck another types of decks
does a deck of all decks contain itself
why do you have a for loop
I was looking at glass joker
just replace the xmult with duplicating and get rid of the "glass" requirement I thought
ok but glass joker doesnt look for specific cards
it's literally just whenever a glass is destroyed
yea
the joker I'm going for duplicates a card whenever it's destroyed
oki
like dna does it like
local copy_card = copy_card(context.full_hand[1], nil, nil, G.playing_card) (thanks n)
but you don't want it to be about your hand, you want it to be about your destroyed cards
so i changed it to
local copy_card = copy_card(context.removed[1], nil, nil, G.playing_card)
does that still work if there are multiple destroyed cards at the same time
@normal crest ok this is what i have, but when i load up a run i get 3 errors saying stuff considering the shop spots are not instantiated: ```SMODS.Joker {
key = 'jshatt',
loc_txt = {
name = 'Its free... :3',
text = {
"{C:attention}1 in #1#{} chance for all shop items to be free"
}
},
config = { extra = { chance = 5 } },
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.chance } }
end,
rarity = 2,
atlas = 'HarmfullJokes',
pos = { x = 1, y = 0 },
cost = 7,
calculate = function(self, card, context)
if context.type == 'shop_final_pass' and not G.GAME.shop_free then
local chance = 1 / (card.ability.extra.chance or 5)
if pseudorandom('jshatt' .. G.GAME.round_resets.shop_uses) < chance then
G.GAME.shop_free = true
if G.shop_jokers then
for _, v in pairs(G.shop_jokers.cards) do
v.ability.couponed = true
v:set_cost()
end
end
if G.shop_booster then
for _, v in pairs(G.shop_booster.cards) do
v.ability.couponed = true
v:set_cost()
end
end
if G.shop_vouchers then
for _, v in pairs(G.shop_vouchers.cards) do
v.ability.couponed = true
v:set_cost()
end
end
card:yep('+', G.C.GREEN, function()
return true
end)
return {
message = localize{type='variable', key='a_mult', vars={0}},
extra = { card.ability.extra.chance }
}
end
end
end
}```
nvm
wait nvm nvm I did the wrong joker
oh no
replace the first param with removed_card?
no no keep the for loop the same it worked fine
yea I mean get the loop back and do that
local copy_card = copy_card(removed_card, nil, nil, G.playing_card)
so if anyone has ideas please help, what this is tryna do is on shop open and reroll it has a 1-10 chance to make everything free
yeah
ping me if ya got any
works like a charm 
hell yeahhhh
yeeee
glad i caught myself before i overthought it
bump
how do i directly set the player's mult
mult is a global variable
Tho I think it has to be done in certain contexts
mult = global
your if context.type == 'shop_final_pass' and not G.GAME.shop_free then should be replaced with if context.starting_shop, also what are the errors you get?
so just do mult = 1
ye
that's fine but it won't update the text on the left
I found that if you set it directly it doesn't update, so return { mult = 0 }
there's probably nicer ways though
update_hand_text({}, {mult = mult, chips = hand_chips}) is what I know of
whats the first table
i think settings, like playing a sound or adding a delay
should be fine to leave empty iirc
I think itssss shop_voucher not isntantiated, shop_booster not isntantiated and shop_jokers not istantiated
Im afk rn and on my phone
what starting parameter would i change to alter the number of shop slots?
they popup as orange text in the game console?
if so they're a warning and not an error
and unrelated to your code
Nope, red text that pops up on my screen apon entering a new run
And it specifically states error
Doesnt happen without the mod
your code was never triggering cus the context check was wrong
and it was never true
And didnt happen before
also booster packs
G.GAME.shop.joker_max for jokers, G.GAME.starting_params.boosters_in_shop for boosters
trying to use this to retrigger Jokers in the BI.POISONOUS table:
calculate = function(self, card, context)
if context.repetition and context.cardarea == G.jokers then
if not BI.POISONOUS[context.other_card.config.center_key] == nil then
return {
repetitions = card.ability.extra.repetitions
}
end
end
end
I put Jimbo in there to test:
j_joker = true,
but he doesn't retrigger
⚰️ why does the voucher have to work this way bsdjbhsg waaaaah I wanna make a joker that increases edition rate but if it doesn't stack with hone what's the point lmao dbnfhbsjd
wait, isn't there a way to, like, override this? is that a good idea here maybe? replace the set to with multiply? :333
you can take_ownership of it and modify the redeem function
hmmmm, I am not yet sure how to do this lol hmm
how would I take_ownership of the hone and glow up vouchers? :3
SMODS.Voucher:take_ownership('v_hone', {
redeem = function(self, card)
-- your replacement
end
})
I believe
ok, I will try this out, thanku :3
@normal crest whenever i reroll i now get this error
And when i entered the shop it didnt crash
can you show the code again
My prnt screen buttons broken
Yep
WIN + SHIFT + S
windows shift s
i dont mean this in a mean way
but im pretty sure i already said how to
key = 'jshatt',
loc_txt = {
name = 'Its free... :3',
text = {
"{C:attention}1 in #1#{} chance for all shop items to be free"
}
},
config = { extra = { chance = 1 } },
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.chance } }
end,
rarity = 2,
atlas = 'HarmfullJokes',
pos = { x = 1, y = 0 },
cost = 7,
calculate = function(self, card, context)
if context.starting_shop then
local chance = 1 / (card.ability.extra.chance or 1)
if pseudorandom('jshatt' .. G.GAME.round_resets.shop_uses) < chance then
G.GAME.shop_free = true
if G.shop_jokers then
for _, v in pairs(G.shop_jokers.cards) do
v.ability.couponed = true
v:set_cost()
end
end
if G.shop_booster then
for _, v in pairs(G.shop_booster.cards) do
v.ability.couponed = true
v:set_cost()
end
end
if G.shop_vouchers then
for _, v in pairs(G.shop_vouchers.cards) do
v.ability.couponed = true
v:set_cost()
end
end
card:yep('+', G.C.GREEN, function()
return true
end)
return {
message = localize{type='variable', key='a_mult', vars={0}},
extra = { card.ability.extra.chance }
}
end
end
end
}
Im using 1 out of 1 chance for just testing perpose btw
how can i check the number of discards for calculation?
Purpose*
I'd remove the card:yep part, that's only for tags, also just remove the concatenation .. G.GAME.round_resets.shop_uses
And remove the G.GAME.shop_free = true thing too
the entire lines of code or just those parts
if its both then what one for what
for the card:yep all 3 lines, for the shop_free the entire line, for concatenation just the part i sent
so, this should work right?
bump
I think so, make sure that multiplying the values mantains vanilla functionality
so that without any other effects the edition_rate is the same as it would be in vanilla
but that's not really an error just a good practice
there's a specific context for retriggering jokers
Wym concatenation, the thing in brakets. Or the if pseudorandom part aswell
remove just this .. G.GAME.round_resets.shop_uses from that line
that's what I meant
do you know what context it is off the top of your head?
in lua .. is used to concatenate strings, aka "hello" .. " world" results in "hello world"
context.retrigger_joker_check but you also have to opt in to enable that feature since it's not vanilla and is added by smods
I see
SMODS.current_mod.optional_features = {
retrigger_joker = true
}
you should put this somewhere in your entry file
I did all this, still doesnt work
what is the error now?
No errors
Just doesnt set shop to 0
I may write the code in the correct format, and i act like i understand what this means, but in reality. My work is held together by glue, duct tape, and hopes
tbh idk what's wrong with your code either
can you send it again lol
to see the current state
Sure
key = 'jshatt',
loc_txt = {
name = 'Its free... :3',
text = {
"{C:attention}1 in #1#{} chance for all shop items to be free"
}
},
config = { extra = { chance = 1 } },
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.chance } }
end,
rarity = 2,
atlas = 'HarmfullJokes',
pos = { x = 1, y = 0 },
cost = 7,
calculate = function(self, card, context)
if context.starting_shop then
local chance = 1 / (card.ability.extra.chance or 1)
if pseudorandom('jshatt') < chance then
if G.shop_jokers ```
oop
thats not all the code
key = 'jshatt',
loc_txt = {
name = 'Its free... :3',
text = {
"{C:attention}1 in #1#{} chance for all shop items to be free"
}
},
config = { extra = { chance = 1 } },
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.chance } }
end,
rarity = 2,
atlas = 'HarmfullJokes',
pos = { x = 1, y = 0 },
cost = 7,
calculate = function(self, card, context)
if context.starting_shop then
local chance = 1 / (card.ability.extra.chance or 1)
if pseudorandom('jshatt') < chance then
if G.shop_jokers then
for _, v in pairs(G.shop_jokers.cards) do
v.ability.couponed = true
v:set_cost()
end
end
if G.shop_booster then
for _, v in pairs(G.shop_booster.cards) do
v.ability.couponed = true
v:set_cost()
end
end
if G.shop_vouchers then
for _, v in pairs(G.shop_vouchers.cards) do
v.ability.couponed = true
v:set_cost()
end
end
return {
message = localize{type='variable', key='a_mult', vars={0}},
extra = { card.ability.extra.chance }
}
end
end
end
}```
There
@normal crest
please do, cus starting_shop only happens the first time each shop is created
not when it's loaded from a save file
It was a new shop, i defeat a diff blind to open them
OOP
Yep
soooooo, uhmmm 😭
But all the re-rolls dont work @normal crest
you probably want to put the exact same code in if context.reroll_shop lol
or do
if context.starting_shop or context.reroll_shop then
what is the code at voucher.lua in line 16?
- the hone and glow up from the vanilla remade
vs - the attempted overrides I made
Uhh where
Page 1 done
replacing your current if context.starting_shop then line
Also in the message output, it says 0 mult, how would i make it say money
Is it just a_money
might be, i don't know that exactly
a_dollars? Etc
how do you get if a card is highlighted?
Oh, so you should just do card.ability.extra without the rate, as that does not seem to be a thing
it looks like vanilla remade adds a new voucher alongside the vanilla one? if you want compatibility with that mod specifically you'll need to take ownership of theirs too
Would it just be message = localize{"Its free :3"} if i wanted it to be text
if you want it to be plain text just do message = "here is my text"
Alright i guess its time for the next joker... yaaaay
oh my, hehehe
How do you destroy a specific card in your hand
Like if you wanted to destroy the second card
context.other_card doesn't exist in context.destroy_card
this is what, like, 12 of these vouchers combined looks like, hehehehe
does anyone know this?
I think G.jokers.highlighted might have a list of highlighted cards
in the order they were highlighted tho
not in the order they are in hand
yeah that's how you do it
oh
if you're on the latest dev build of SMODS i believe they added SMODS.destroy_cards
they did
I see
How would I use it here
SMODS.destroy_cards(G.hand.cards[2]) for example
of course with additional checks to check that a 2nd card in hand even exists
Ooo
Based
(i mean, its a reference so it makes sense if you get that)
actually cards might have a highlighted field in them
eh
peak
if you're able could you check if using if card.highlighted works too
yuh
it does
yippie
i just watched a guy shoot a cow in an ad
what the hell are these ads even for anymore
lucky slots joker showcase
seems very situational
just like gambling
kinda the point yes
also you might be recording at a very low brightness
idk why that's happening but i'll fix it eventually
Bogos Binted
- Retriggers Photograph 13 times
its like the lights of the room are turned off
XD
What if I wanted to destroy a card in my hand based on its rank
Like if I wanted to destroy all 4s in my hand
context.destroy_card is the card it's looking at.
i'm trying to make a mod where the card itself has a different color, but i realized enhancements go behind the sprite goes behind so you can't see them. how would i edit that texture instead?
also i'm using this lua template
how do i get a joker's name
Name from localization?
nothings working so idk
also i dont think my jokers have localization so
but sure if that works
G.localization.descriptions.Joker["j_modprefix_key"].name
so G.localization.descriptions.Joker[v.config.center.key].name would be the name of v?
Yes.
thats the joker it was for
this joker is probably better in other languages
and thats really funny
wait can you not change languages in balala?
i thought thats what localization was for
You can.
where?
ok
hilarious joker
its literally better if youre german
arent a lot of words in german way longer than in other languages
honestly I think it's fine. who cares if its buffed in German if it's funny, since the whole point is the joke anyway
german buff
uncommon German buff
How do I go about increasing the selection limit in booster packs
Try looking at Off By One from Cryptid
okii
where's the joker data stored in Cryptid actually
I can't find it on the github
It's not a joker, it's a code card.
o
I forgot
Japanese Meanwhile:
+0 
It seems like it's handled higher up
It seems to be using a patch.
yea
not sure if there's a better way
Been awhile since I've had to ask a question instead of being the one answering questions lol
I'm trying to make an enhancement that renders a sprite on top of the rank/suit sprite. It'll look roughly like the first image. I've found one other mod that does something like this, being Grim with its "Statuses," so I used that as code to base off of. I've gotten to here (image 2 and 3) but the sprite is not showing. Anybody have any ideas on why?
I have a feeling this one's gonna need a lot of bumping lol
How easy/hard would it be to do a patch for that kind of thing
like relatively
Can confirm oboe uses a patch, as I referenced it for a similar function myself. It is not a hard patch at all
lovely/misprint.toml
I can lessen that pain for ya. Here's what I patched
G.GAME.choose_mod is something I define in my Game.init_game_objects hook
o
Where do I put this 
Never done a patch or a hook before
I think
either in a lovely.toml file in the root of your mod's directory or a folder titled 'lovely' that can have .toml files of any name you'd like
okii
does the hook u mentioned go in a similar place
And this is the hook. Put this in your main lua file
o
thank uuu
no problem


yeeeeee
lol
how does the "inactive/active" here get written in code for the description?
does it just work with #2#?
Yes.
alr
bump (let the bumping begin, tho I can't imagine anyone who can help with this is up this late 😭 )
Mayhaps, but even with Europe being ahead in time, this chat is always in low-activity mode at this time lol
Bumping is my friend once more

I am here to help
Eremel jumpscare 🔥
SMODS.DrawStep {
key = 'chisel',
order = 35,
func = function(self)
if self.ability.chiselled then
if not Ortalab.chisel_sprite then Ortalab.chisel_sprite = Sprite(0, 0, G.CARD_W, G.CARD_H, G.ASSET_ATLAS['ortalab_chisel'], {x=0, y=0}) end
Ortalab.chisel_sprite.role.draw_major = self
Ortalab.chisel_sprite:draw_shader('dissolve', nil, nil, nil, self.children.center)
Ortalab.chisel_sprite:draw_shader('ortalab_mythos', nil, nil, nil, self.children.center)
end
end,
conditions = { vortex = false, facing = 'front' },
}
This is my drawstep for something similar
It’s probably better to have a global sprite that you draw on the cards similar to seals, and have the enhancement sprite as just a plain card
That was the plan so I’m glad that’ll work out
I’ll give it a whirl in the morning as I just shut everything down for the night and my bed is too comfortable right now. I appreciate the guidance tho
can someone just straight up tell me how to make this destroy 2 cards when defeating a blind? its 3am and i wanna sleep
ignore the ```
just where to add it and stuff
and what code to add
i have been doing this for 10 god damn hours
only the 3rd joker i made
i don't think this is normal behaviour
keep it >:3
balala the looong way
the problem is it's not scoring anything
OH THATS NEGATIVE WAIT
it's ignoring the base mult
It’s dividing the score instead of multiplying it if its lower than 1, adding 1 to it should fix it
the problem is, it's completely ignoring the base mult
Try adding +1 to whatever it scores
like... i've set it to give x1 mult + x0.5 for each common
but it's completely skipping the x1 mult
0.5 makes it divided i thought
Yeah it does
yeah then just make it 2 so if it gets devided its halving itself
if you divide 1 you get a number below 1
wait, xmult divides it???
And that gives negative score
No
But see it like this
X1 mult does nothing
Lower than that it divides it
bruh... this is so peak frfr
Thats why x2 is doubling and not x1
what my fellow screen for a face fellow said
Real
me when someone asks something and gets a solution but ignores it and continues saying the same issue
iirc making it x1 mult + x1.5 should make it work

0.5x = 1/2x = dividing mult into half
@daring heron can ya help with this?
Not very good at lua myself lol, started like 1 or 2 months ago, and i’m not home rn
Sorry
so what should i change to fix the dividing problem?
Make it x1.2 for each common
prolly the thing that says 0.5 and 0.2
are you adding X0.2 or X0.5 mult to the rest of your X mult?
If so it's fine
And x1.5 for each for gingerbrave
Yeah that might also be a problem
if you're multiplying the Xmults together then it's problematic but if you're adding them then it's fine
May we see the code?
ok, so it looks like having multiple of these jokers just divide the value too much
i think?
ah so you're multiplying them then
so how do i make it so it adds these xmults rather than multiply it?
Just change it to [xmult] + [xmult] instead of [xmult] x [xmult]
bump
extra = {
xmult = 1.5,
bonus = 0.2,
bonus2 = 0.5,
bonus3 = 2,
}
},```
i mean this seems like a wording issue already i expected things to be added
You are returning Xmult that is less than 1?
multiplying by 0.2 is division by 5
you could do something in context.destroy_card
you need to add all the values then return
?
What jank ass AI have you got this code from
well you wanted to destroy a card
so just set up a counter in context.destroy card and have it return "remove = true" for 2 cards
please Read Documentation
i guess if you call a protogen an ai, then myself lmao. but i made it myself so you can see why it took me like 3 hours just to get that, like i said its my 3rd joker
i code in python and c++ normally so im not used to lua
mainly c++
isn't protogen that goofy fake antivirus trojan
nah, a furry species
what am i thinking of
But you’re just making random functions up that don’t exist, why would you do that?
I'm thinking of protegent
because i dunno what im even doing and i cant understand what anything means so i glue everything with hopes and dreams tryna see if things do or dont exsist 
-# undertale reference :0
-# nah
-# yuhuh
peak undertale ost song 
So real
Is there a way to find out what the last consumable used is and create another one
check out the code cards in cryptid, theres that exact thing there for referance
true
so like... something like this?
xmult = (card.ability.extra.bonus * normalcount) + (card.ability.extra.bonus2 * brvcount) + (card.ability.extra.bonus3 * brgcount)
is everything in cryptid just patches
every time I look up a cool thing from cryptid it's just like "yeah so reference this one property that very clearly doesn't normally exist"
Why does this only remove half of my deck?
for i=1, #G.playing_cards do
if G.playing_cards[i] and G.playing_cards[i] ~= context.full_hand[1] then
G.playing_cards[i]:remove(self)
end
end
Use start_dissolve()
ok, i tried this, and it looks like it's still multiplying one by one rather than adding all mults
if context.other_joker and (context.other_joker.config.center.rarity == "CRB_common") then
if context.other_joker ~= card then
local brvcount = 0
local brgcount = 0
local normalcount = 0
if context.other_joker.label == "j_CRB_brave" then
brvcount = brvcount + 1
elseif context.other_joker.label == "j_CRB_bright" then
brgcount = brgcount + 1
else
normalcount = normalcount + 1
return {
xmult = (card.ability.extra.bonus * normalcount) + (card.ability.extra.bonus2 * brvcount) + (card.ability.extra.bonus3 * brgcount)
}
end
end
end
end```
you can store a variable.
make a local total_xmult variable
and return everything at the end
You wouldn’t loop like this in context other joker
It depends what you want the effect to be, is it a baseball like effect, or just one bundle of Xmult all at once?
Is it possible to make text small ({s:0.8}) AND colored?
use commas
{C:mult,s:0.8}
Thanks!
if G.jokers and G.jokers.cards do
for i = 1, #G.jokers.cards do
if G.jokers.cards[i] ~= card then
local total_xmult = 1.5
if context.other_joker.label == "j_CRB_brave" then
total_xmult = total_xmult + 0.5
elseif context.other_joker.label == "j_CRB_bright" then
total_xmult = total_xmult + 2
elseif G.jokers.cards[i].config.center.rarity == "CRB_common" then
total_xmult = total_xmult + 0.2
end
end
end
end
return {
xmult = total_xmult
}
store the increases in extra
store the end total_xmult
as a loc var
oh yous hould also be doing G.jokers.cards[i] instead of other_joker
fixed
Does anyone know how to make text animation like the misprint joker?
this is happening
oh
if G.jokers and G.jokers.cards do
for i = 1, #G.jokers.cards do
if G.jokers.cards[i] ~= card then
local total_xmult = 1.5
if G.jokers.cards[i].label == "j_CRB_brave" then
total_xmult = total_xmult + 0.5
elseif G.jokers.cards[i].label == "j_CRB_bright" then
total_xmult = total_xmult + 2
elseif G.jokers.cards[i].config.center.rarity == "CRB_common" then
total_xmult = total_xmult + 0.2
end
end
end
end
return {
xmult = total_xmult
}
this whole thing is getting ignored by the game. the joker only applies the base xmult (x1.5)
also, the logger says this
Code?
-- x1.5 mult
if context.joker_main then
return {
xmult = card.ability.extra.xmult
}
end
-- x0.2 mult for each common cookie, x0.5 for each GingerBrave and x2 for each GingerBright
if G.jokers and G.jokers.cards then
for i = 1, #G.jokers.cards do
if G.jokers.cards[i] ~= card then
local total_xmult = 1.5
if G.jokers.cards[i].label == "j_CRB_brave" then
total_xmult = total_xmult + 0.5
elseif G.jokers.cards[i].label == "j_CRB_bright" then
total_xmult = total_xmult + 2
elseif G.jokers.cards[i].config.center.rarity == "CRB_common" then
total_xmult = total_xmult + 0.2
end
end
end
end
return {
xmult = total_xmult
}
end
}```
You need that in a context.
did that, it's not working
Code?
my local is in the wrong place
put the local_xmult above the context.other.joker
also
what
no don't use context_other joker
just use joker_main
working as intended now
my Joker effect is that it gains XMult when a randomly picked card from the deck is destroyed (like Idol + Canio). I want to make it so the randomly picked card changes when previous card is destroyed, so I made a counter of how many times the Joker scaled (stored in config). Problem is - I can't use the counter in the pseudorandom function that picks the card
It would be better to set a flag on the cards similar that you’ve marked that you can reset when you identify it being destroyed
how do I set flags on cards?
How would I get a Joker to copy a Joker that the player doesn't currently have
My naive approach would be to iterate through the player's jokers and all existing jokers, and if no match is found for each entry, add it to a new list. Then you have a list of all jokers the player does not have in a given run.
Not like specifically a Joker like that
I wanted to copy the ability of the last sold Joker
oh uh... no idea how to make functions passively do shit every frame.
actually I'll try something
you can check if played cards don't score but is there a way for a joker to check if other jokers don't trigger
Do card.flagname = true
thanks
card.ability.flagname if you want it to save
huh
you can just
use blueprint_effect even it doesn't exist
I am right now
I just tested it
the joker was sold and ceased to exist
and yet it could be copied
Jokers that don't exist can't be calculated.
I'm back from depression and have decided to continue on modding
yet I fail to understand the issue my code has
so if there's any1 with a bunch of time and decent knowledge here willing to spend some time to help me with various problems pls contact me in any way
it's like 80 lines of code to read (and understand)
That's not possible.
I can try.
I don't know how helpfull I can be, but it is worth the shot, right?
give it a minute my internet is slow
would u like to switch to dms or create a thread here? would prolly be annoying for others to be drowned in my issues
DMs
From what I recall, context.main_eval literally just means not context.individual and not context.repetition, that's all
What does your code look like?
SMODS.Joker {
key = 'stand_whitesnake',
config = {extra = {lastJoker = nil}},
rarity = 1,
cost = 4,
loc_vars = function(self, info_queue, card)
return {vars = {card.ability.extra.lastJoker}}
end,
calculate = function(self, card, context)
if context.selling_card and context.card.ability.set == "Joker" then
card.ability.extra.lastJoker = context.card
return { message = localize('k_upgrade_ex') }
end
return SMODS.blueprint_effect(card, card.ability.extra.lastJoker, context)
end
}
You can't save jokers in a joker.
hm
I can probably find a workaround
how do you instantiate a joker
like what does the constructor of a joker look like
The datatype
Are you trying to create a fake joker?
wdym
I mean how the joker is supposed to work is exactly how it does work in the recording
But if it crashes on reload then the next idea would be to just instantiate the type of Joker that got copied
and then copy the ability of that
So you are trying to create a real joker?
I'm not exactly sure what fake or real means here
this wouldn't be something you'd be able to see happening as a player, it would be behind closed doors
"real" means it's an actual Card that exists, "fake" means it's a fabrication of a Card, but it's not actually a Card.
It would be of the card datatype I guess
Okay so to describe what I'm thinking of in more detail
reloading the game causes issues
So the solution is to, instead of storing the sold Joker itself, store the key of the Joker
And then whenever you want to copy its ability, you just instantiate a new member of the Card class with that key and then copy whatever ability that has
and then you delete that now that you don't need it anymore
The player sees none of this; it's visually identical to just storing the Joker except it doesn't crash because it's not a memory reference
This sounds way more complicated and unnecessary then just making a fake joker or putting a real joker in a secret card area.
what would a fake joker mean in this context
tho I don't think it's too bad
It's just storing a Joker's data because storing the Joker itself is kinda messy
I feel like making an entirely different secret card area would be more complicated
eh I'll focus on it later i guess
is there a way to modify rarity text on a joker without modifying the rarity itself?
If cryptid can change the mod badge, then you could probably change the rarity badge aswell.
I think if you override the badges function on an object, you immediately remove all badges. In this case, it'd allow you to basically change the rarity badge if you opt to manually add the others back
bump.
and does anyone know how to use the deckskin crediting from the steamodded PR merge?
it was way simpler than that, just needed an ui_definitions patch
how can i make it so if it fails the 50/50 this joker dissolves and spawns another joker?
You put the pseudorandom in its own if and use else
so i do
calculate = function(self, center, context) if context.individual and context.cardarea == G.play and if pseudorandom('xmpl_gambler') < G.GAME.probabilities.normal / center.ability.extra.odds then return { Xmult = center.ability.extra.Xmult } else card:start_dissolve({G.C.RED}) end end end
?
calculate = function(self, center, context)
if context.individual and context.cardarea == G.play then
if pseudorandom('xmpl_gambler') < G.GAME.probabilities.normal / center.ability.extra.odds then
return {
Xmult = center.ability.extra.Xmult
}
else
card:start_dissolve({ G.C.RED })
end
end
end
thanks!
how would i insert the description of joker from the localization file?
the guide mentions "or localization entry", but i have no idea how it looks like
doing this now crashes the game
Why did you remove the context check?
what context check?
first, what are you trying to localize?
and second, you need a folder and file like this.
a joker card
and i already have this made
so do i still have to define loc_txt?
return {
descriptions = {
joker = {
prefix_key = {
name = "",
text = {}
},
otr_joker= {
-- and so on
}
}
}
}
Something like that.
Not 100% certain if I nailed it.
But that should give you an idea.
that inside en_us.lua
i've already made that, the question is how do i insert it?
the joker name and description? do i still have to mention loc_txt?
Try removing the localization entry inside your joker
i'm getting this error when trying to use an edition i made using the example script from the smods github
remove loc_txt from inside your joker
loc_vars needs to be self, info_queue, card
okay now when i play the cards with the enhancement nothing seems to happen?
oh
it's crashing now
hi, quick question, i have this to set hands at 1 at the start of the blind (put 2 events so it takes into account burglar), although it seems to put hands into negative if i hvae two samples of this joker (the print returns same value twice), any idea how i could keep it's interactivity with burglar w/o making having 2 auto-countering?
if context.setting_blind and not context.blueprint then
G.E_MANAGER:add_event(Event({
trigger = 'after',
delay = 0.1,
func = function()
G.E_MANAGER:add_event(Event({
trigger = 'after',
delay = 0.1,
func = function()
if G.GAME.current_round.hands_left > 1 then
print(G.GAME.current_round.hands_left)
local lost = G.GAME.current_round.hands_left - 1
ease_hands_played(-lost)
card.ability.extra.xmult = card.ability.extra.xmult + (card.ability.extra.xmultmod * lost)
card_eval_status_text(card, 'extra', nil, nil, nil, { message = 'Ungeziefer!' })
end
return true
end
}))
return true
end
}))
end
You could either count the number of jokers, or you could only make the first one set hands.
although making it only the first one, would make it that if i have my joker, burglar, and my joker, the 2nd wouldn't do anything despite having more than 1 hand
like,
if i have burglar it does : 4 > 7 hands
Make the last one do it then.
isn't there just a way for my if to actually work?
can anyone tell why it's crashing?
No.
Code?
for what? i don't have misc_functions.lua
Yes, that is the vanilla file, what is the code that caused this?
Hi hi, i'm trying to make a tarot card for my custom enhancement, but the card would crash when i use it, the error says the center is a nil value, apparently i'm not if it exactly means the CENTERS down in my code, can someone help me on this please ?
key = 'topenta',
set = "Tarot",
effect = "Enhance",
atlas = 'topenta',
pos = { x = 0, y = 0 },
cost = 3,
sell_cost = 2,
config = {
-- How many cards can be selected.
max_highlighted = 2,
mod_conv = 'pseudoregamod_sol',
},
loc_vars = function(self, info_queue, card)
info_queue[#info_queue+1] = G.P_CENTERS[(card.ability or self.config).extra]
return {vars = {(card.ability or self.config).max_highlighted}}
end,
loc_txt = {
name = 'Two of Pentacles',
text = {
"Select up to 2 cards to",
"turn them into {C:attention}Sol Cards{}"
},
},
}```
card.ability.extra does not exist.
ok, it seems like it's crashing because of my entry in the localization file
j_CRB_brave = {
name = 'GingerBrave',
text = '{C:mult}+#1#{} Mult',
'{C:mult}+2{} Mult for each',
'{C:crb_common}Common{} Cookie',
'{C:inactive}(Currently {C:mult}+#2#{C:inactive} Mult){}',
},
},```
Put {} around everything in text
ah okay, so just [ ( self.config).extra] and '[ ( self.config).extra].max_highlighted }}' then right ?
bump
No, self.config.extra doesn't exist either.
Alright thanks !
how would one do this?
You could hook poll_edition or you could take ownership of both.
in burglar, what nil and true are args of? ease_discard(-G.GAME.current_round.discards_left, nil, true)
instant, silent
thx
What secret does the frog hold? Now I'm curious
hi, i wanted to make a joker upgrade itself when a card is destroyed and made this code but im getting a crash, whats wrong with the code? calculate = function(self,card,context) if context.remove_playing_cards then for playing_card in context.removed do card.ability.extra.Xmult_bonus = card.ability.extra.Xmult_bonus + 1 end end end,
its crashing in the line with the for
for i = 1, #context.removed do
I think i still messed up somewhere, it now shows the extra block but says error, my enhancment doesn't have the pool for my mod since otherwise it wouldn't somewhat show during debug (i simply disabled the code), but regardless of it is on or not i still get that local 'center' [a nil value] error when i try to use my tarot card, not sure what to do
i removed the card.ability extra and the self.config.extra as well, only the max_highlighted is left sooo
actually is G.P_CENTERS even working or should i have to replace it ?
key = 'topenta',
set = "Tarot",
effect = "Enhance",
atlas = 'topenta',
pos = { x = 0, y = 0 },
cost = 3,
sell_cost = 2,
config = {
-- How many cards can be selected.
max_highlighted = 2,
mod_conv = 'pseudoregamod_sol',
},
loc_vars = function(self, info_queue, card)
info_queue[#info_queue+1] = G.P_CENTERS
return {vars = {max_highlighted}}
end,
loc_txt = {
name = 'Two of Pentacles',
text = {
"Select up to 2 cards to",
"turn them into {C:attention}Sol Cards{}"
},
},
}```
ok thanks!
= G.P_CENTERS["c_".. card.ability.mod_conv]
okay last question but is there a way for a joker to be able to tell what enhancement a card has?
thanks again, hopefully it won't crash this time
SMODS.get_enhancements(card) or SMODS.has_enhancement(card, "m_key")
thank you
bump
why does two ease_discard(-(G.GAME.current_round.discards_left) in events of two jokers dont get them under 0, but ease_hands_played(-G.GAME.current_round.hands_left) does?
so like this?
yes
has_enhancement*
hi :3
I promise I'm not undergoing Northerlionification.
Try out Joyous Spring:
►https://github.com/nh6574/JoyousSpring
Affiliate Links and Discounts
►https://mbtyugioh.bio/
Patreon:
►https://www.patreon.com/mbtyugioh
Twitter:
►https://twitter.com/mbtyugioh
Twitch:
►https://twitch.tv/mbtyugioh
Discord:
►https://discord.gg/ZdJBKSV
#YuGiOh...
that one
yeah!!
Eyyo, I'm just starting to learn how to mod, so in the API Docs it says that if I want a Joker to be locked by default I do unlocked = false right? 🤔
But then what function do I make to set it to true?
I've looked at a lot of Mods and they either don't have Jokers locked by default or they use a very convoluted mess that I have failed to follow...
so i have to patch it?
i watch mbt like everyday even though i dont play ygo anymore, so its a very pleasant surprise that he made a vid on your mod lol
-# i didnt even know he plays balatro too
with this if math.abs(math.max(G.GAME.current_round.hands_left, mod)) == 0 then return end ?
probably? you can also just do what the function does manually probably
could anyone help make this a bit clear, i don't get why what im trying to do here does not work, i happened to test this without the return function and set the holders of the sticker to give mult as a test, somehow the return statement does not want to do as told, sorry if this looks like a repetitive issue, im new to modding.
got it like this, doesn't do anything
if context.setting_blind and not context.blueprint then
local lost = G.GAME.current_round.hands_left - 1
card.ability.extra.xmult = card.ability.extra.xmult + (card.ability.extra.xmultmod * lost)
if math.abs(math.max(G.GAME.current_round.hands_left, lost)) == 0 then return end
G.E_MANAGER:add_event(Event({
func = function()
G.E_MANAGER:add_event(Event({
func = function()
ease_hands_played(-lost)
card_eval_status_text(card, 'extra', nil, nil, nil, { message = 'Ungeziefer!' })
return true
end
}))
return true
end
}))
end
you probably just want ease_hands_played(G.GAME.current_round.hands_left <= 1 and 0 or -lost)
if you want to cap it at 1
trying this
still pushes under 0 when i have multiple
it doenst accurately detects G.GAME.current_round.hands_left in the event
makes sense
so a patch i guess
does that function have an immediate field
(mod, instant)
tried to set nil, true
but didn't seemed to change
i could try with your settings
ease_hands_played(G.GAME.current_round.hands_left <= 1 and 0 or -lost, true)
A question to be sure, enhancments doesn't need the pools line or does it to for the tarot cards ?
hey y'all, i'm stumped on a simple problem. what would i put in place of the comment to force the current played poker hand into being a new poker hand (called "_hand")? This is a lovely patch for changing the function evaluate_poker_hand
if next(SMODS.find_card("j_picubed_mountjoker")) then
local _hand, _tally = nil, -1
for _, v in ipairs(G.handlist) do
if G.GAME.hands[v].visible and G.GAME.hands[v].played > _tally then
_hand = v
_tally = G.GAME.hands[v].played
end
end
print((_hand or "hi").." AAAAAAAA")
--poker hand is now _hand (what do i put here?)
end
so it changes the hand to be considered the most played hand?
well i'm really not sure what doesn't work, using pools on my ehancement card will somewhat break and make it impossible to get trough debug mod unlike the other enhancement, so i don't even know if my key for the SMODS.ObjectType being pseudoregamod, i tried to use "sol", "c_sol"
"c_pseudoregamod_sol" for the G.P_CENTERS part but it doesn't show any bubble, and the card still give me a error that says that local 'center' [a nil value]
i'm not sure if it's an error that is from my tarot card or just my enhancement because that last one works well on its own
key = 'topenta',
set = "Tarot",
effect = "Enhance",
atlas = 'topenta',
pos = { x = 0, y = 0 },
cost = 3,
sell_cost = 2,
config = {
-- How many cards can be selected.
max_highlighted = 2,
mod_conv = 'pseudoregamod_sol',
},
loc_vars = function(self, info_queue, card)
info_queue[#info_queue+1] = G.P_CENTERS["c_pseudoregamod_sol".. card.ability.mod_conv]
return {vars = {max_highlighted}}
end,
loc_txt = {
name = 'Two of Pentacles',
text = {
"Select up to 2 cards to",
"turn them into {C:attention}Sol Cards{}"
},
},
}```
what are you trying to do? pick a random enhancement from a pool?
no, i actually want the card to use the modded enhancement i made, the last one work well by itself but i struggle making the tarot card from it
here's the code my enhancement, i disabled the pool since otherwise i couldn't change the card's enhacements
key = 'sol',
loc_txt = {
name = "Sol Card",
text = {"{C:blue} +20{} chips",
"Has no rank",
"Is considered as any suit"
},},
atlas = 'sol',
pos = { x = 0, y = 0 },
--pools = {["pseudoregamod"] = true},
--unlocked = true,
--discovered = true,
config = {
bonus = 20,
},
replace_base_card = true,
no_rank = true,
no_suit = false,
any_suit = true,
always_scores = false,
}
Yes, that's basically what I'm trying to do (there's some conditionals stuff I've removed that are irrelevant for this post)
mod_conv = m_prefix_sol
is it any played hand as long as you have the joker?
there might be more conditions but im asking if it can be hands from vanilla or other mods
both. is there a difference for doing vanilla or modded hands?
nah im just asking if they are not from your mod
you probably want to hook G.FUNCS.get_poker_hand_info instead
i suppose the prefix is meant to be sent in the main.lua ?
it's whatever you put as your mod's prefix
Ah i see now, i don't think i did set a prefix before, and i do suppose the SMODS.ObjectType's key doesn't count as a prefix
no, yeah do you have a .json or do you use the header?
yeah
ah alright, so i should activate the prefix simply my removing the --- or something ?
no, just use m_pm_sol
AAAAAAAAAAA
okay thanks, hopefully it'll work this time
1st letter of the alphabet jumpscare
jpjpqujapjwu
?
nope, it seems to still crash when using the card, still with center value thing
wait
i think i see what's wrong
any idea on what could possibly be causing this?
a UI table should be nested one deeper
I got this funky ass error when I tried booting up pokermon. I think my folder is set up correctly and all the other modding stuff should be fine, so I'm quite stumped
my mod.json does have a prefix set already with "prefix": "Foolish Dreams" , i used that instead of pm since otherwise under my modded cards it would simply show 'pm', so i should just rename my prefix then ?
I think prefix is not meant to have spaces and shit.
I think the prefix just helps SMODS to not getting confused when loading mods and stuff.
update to the latest version if you haven't already
okay i think i understand a lot more now i just goofed myself from the start with non working prefix
let's hope it works now
i would also remove the smods header just in case
not useful i suppose?
I swear I am
Oh crap it does now, thanks i really fumbled myself on this
Could be tripping tho
kinda
anything you register includes the prefix
eg j_prefix_joker