#💻・modding-dev
1 messages · Page 178 of 1
you call SMODS.poll_seal, which returns you a string that is a seal key or nothing
you then put that seal key into card:set_seal(seal)
Also the docs clearly say the arguments are a single table
so like this?
i can't seem to get the full_hand to work ? i probably forgot something in there
I don't recall off the top of my head what the default rate for seals is
reply message
will this work or am i missing anything
reply reply message
you're missing something
well darn
the cards go in cards
oh gotcha
the base rate is 2% from what I can tell, so you'd need like mod = 12.5
would that be modified with the oops! all sixes or the randomness is a different thing?
it's a different thing
if you want it to be affected by oops, you can use mod = 12.5*G.GAME.probabilities.normal
is this right or am i still missing something/formatting wrong
I hate the formatting but seems good
or with my mod's Weighted Dice ;)
ah yes
i should put a random amount of spaces next to every line specifically to bother people who actually know how to code
(I'm still trying to figure out the best way to guarantee all probabilities)
I mean this is your best bet
so isnt this supposed to be guaranteed to add a random enhancement to current??
its giving me this crash
what's m_enhancement_default?
dammit not even sacrificing a jimbo to the twins fixes the issue
i am completely stumped
like this should be fine right
should it be options = default? or i just dont need to use it at all if i want all enhancements to have the possibility to be added
wait
wait
do you have the optional feature for joker retriggers enabled?
the what
you don't need to use it at all
joker retriggers are disabled by default because they're computsrionally expensive
SMODS.current_mod.optional_features = { retrigger_joker = true }
is this a new thing
I tried that before and it also crashes
last time i tested this joker was on the really old build
yes
show code again
that's for editions
thats the whole calculate
I'm on mobile
wait
can you please just send a screenshot
bit wonky with the ui effects but i think its working otherwise
[this is editions, which should mean enhancements no longer crash]
im trying to do a little bit complex effect here
but im getting everything right until the part where it has to add the modification
set_enhancement isn't real, and you're polling an enhancement to use as an edition
same for seals
copypasting my own code is going to kill me someday
you need to use poll_edition and SMODS.poll_seal respectively
the way you set an enhancement is current:set_ability(G.P_CENTERS[newMod])
so no add_edition?
I'm not talking about editions
enhancements, editions and seals are fundamentally different things
okay the enhancement is working now
Also the way you're checking for editions and seals existing is wrong
hoping this'll be less unbalanced
you just check for card.edition and card.seal respectively
why does it only make jimbo 😭
well i messed up the reset message a bit LOL but it's working
How do you return how many cards are in the full hand?
jimbo is the default when the game doesn't recognize a joker or doesn't know what to spawn
so it's not reading the cards table properly i fear
weird the individual jokers were working when i put the same keys into create_card
been staring at talisman and jens alamac code for a while now and can't seem to figure out how i could talk to talisman to be able to use stuff like e_mult for scoring calculations
why does poll_edition doesnt need the SMODS. at the start?
I've learned to not ask questions about why things work the way they do, they just work
Asking the owners is too hard
os.date() returns a string of the date or time formatted according to the format string, the first argument.
Documented here: https://www.lua.org/pil/22.1.html
os.date('%H:%M') would return 20:57, for example.
os.date('%x') would give you the full date formatted according to the system locale, something like 15/2/2025 or 2025-2-15. This will change if users change their locale or date preferences on their system.
os.date('%d') would give you just the day of the month, 15. I'd probably compare that to check if the date has changed.
can you send a screenshot
Wheres can i find this file?
this is my code, but the crash happens in balatro's code (misc_functions) doesnt even try to concat at line 338
This screenshot is from my mod
it's not from vanilla
i need about glass card, rn i trying make my own enhancement, its almost like glass card
why isnt my pool working
I don't think poll_edition takes a table
so just newMod = poll_edition ?
no, it's a function with 5 parameters
im sorry, what does that mean?
you need to call the function and pass the values you need in the order its mentioned here
like this?
Use parenthesis instead of curly brackets
nicee
thanks
now ill try to do the seals
oh wait tha seals already work
:D
Now i just need to make it so this happens 1 in 4 times
is there a function for that so its compatible with oops all sixes?
Not a function, but you can take a look at any chance joker in the base game code
Like bloodstone
im currently looking at gros michel code
if you see G.GAME.probabilities then that line is the one making the random chance
done :)
how do i raise the blind score requirements
i had something similar, try this in pokerhand instead of text
name = "5 Stone Cards",
description = {
"A hand consisting of six cards that",
"all share the stone enhancement."
}
},```
change the text to whatever you want obviously
instead of example = {} ?
oh wait
no, instead of text =
I see
worked like a chram tho the UI still depicts five copies of 2 of Spades
I want to add some delay before the enhancement is added because right now is added instantly as you press "play hand" instead of when the jokers activate
i dont know if Balatro was coded with enhancements in mind for the hand example UI
ig so
So in the SMODS documentation ive seen the function of
update(self, card, dt)
Would it be possible to write a function that makes it so when certain parameters are met the cards update?
Say i want to update the texture of a card when a card gets powered up enough. Like make the vampire's card gain a blood moon behind them when it hits X3.
Is that possible to do using either Malverk or SMODS current systems?
if youre just trying to update the texture of the card you can do
if card.children and card.children.center then
card.children.center:set_sprite_pos({ x = desiredx, y = desiredy })
else
print("Error: Unable to update texture.")
end```
ive got that thrown in my calculate and it updates the texture properly utilizing my same atlas as the prev texture
Hmm not gonna lie, im a little lost with that. Do you have any of the wiki pages related to that i can read up on more?
is there a way to change an specific probability?? e.g glass breaking or lucky cards triggering
is it possible for these kind of effects to not count secret hands?
i want to make something like the dice but for some specific cards
i dont actually know where it would be wiki wise unfortunately, i figured out what i needed to by searching the discord here
Ah alright i appreciate the help regardless!
Trying to get into understanding the calculate systems right now looking over the wiki
Would you be okay if i shoot you a question or two in DM's or ping you here if i get stuck as im trying to look this over?
youre fine to dm yea, ill warn its late for me so i might not respond until tomorrow as long as thats alright
Oh yea its no stress at all mate, I appreciate it all 😄
So for the context of vampire to trigger a update when the power change happens.
Should i use the
if context.post_trigger then (after a Joker has triggered.), if context.post_joker then (used for xmult), or just the one for whenever a card is played?
Also starting to wonder if its better to just set up a new card entirely and disable the original Vampire joker instead to avoid having to mess with taking ownership of the texture
I would need to set m_glass.ability.extra to 1
i dont know if there is a way to do that
Im new in coding and modding, rn trying make my own enhancement, but its cant destroy, whats wrong? can someone help me
needs to be changed on alices annums side
yeah I know, but the author is missing quite a while
so i am wondering if I can modify it a bit in my fork
it's possible for sure
This works now, the issue is that i just want the 4s to not break and if I play any hand containing a glass four, all of the cards of the hand wont break
also, the G.GAME.probabilites.normal stay at 0 after the hand is played
this part is more important
I know it must be possible, just not sure how
Guys how do I check when it's the end of an ante?
base game does it by checking for end of round, and if the blind is a boss blind
so unless you're changing how the blinds work, that should do it
Maybe I could check rounds by checking if the round number + skipped blinds is a multiple of 4 at the end of a round
I don't know though
are you changing how the blinds work, then?
No it's just a fun idea
because otherwise I'd really just do it the same way campfire does it
im trying to take another approach, and im trying to detect if a card is going to be destroyed, and if is a glass 4, changing remove to false, but it doesnt seems to work this way
In Alices Annum.lua, modify get_least_played_poker_hand() and get_least_played_poker_hand_level() to also check if G.GAME.hands[v].visible
function get_least_played_poker_hand()
...
for _, v in ipairs(G.handlist) do
if G.GAME.hands[v].visible and v.G.GAME.hands[v].played <= played_hand_count then
result_hand = v
...
glass cards check for the destroyed property, not a removed property, I think
the removed property is checked for joker interactions, but I think by then the glass cards that will shatter are already in a table. So if you change the remove property afterwards, it doesn't get checked again when .shatter() is called on that card
is there a way to print the table of the cards that are going to be shattered?
and if so, how do i prevent the shattering
i'm not sure, not without an inject, I'd guess
this is what the wiki says about that context
I'm not sure I can think of a neat way without injects or wonky scripts to prevent shattering while also showing the player that a shattered card was prevented. I think in the joker logic, on context.destroying_card, you could call pseudorandom('glass'), and kinda fake the shattering, by just calculating the chance earlier, and then marking the card as not going to shatter. 🤔
no wait, nvm
glass card destruction happens in evaluate_play at functions/state_events.lua
that doesn't matter. You'd need to inject with lovely regardless, I think, because after the calculate_joker() that uses context.destroy_card, the glass shattering is separately calculated and would overwrite it
I found card destruction to be unexpectedly complicated, haha, so I feel you. I'd suggest somethings for lovely, but I haven't found a great guide besides the documentation yet, and I'm just kinda stumbling through it! good luck with it though! 😄
Jesus christ, it's a 500 line single function
it's everything that happens after you press the play button
i almost got the effect that i want here, but the issue on the game probabilities is a big issue
btw make sure to read from the dump instead of the source bcos smods makes that function look very differently
I... I should've realized this earlier because my injects in the evaluate function have been a nightmare to get working, hahaha. That's a good note to have 😥
does anyone know where in the card table the description for a joker is in either G.shop_jokers.cards[] or G.jokers.cards[]?
that works like a charm. thank you very much
Is there a workaround?
Thanks for including SystemClock in your modpacks, by the way, very cool. Ping me if you find any incompatibilities and i'll fix them ASAP
whats the better calc version of this? if G.GAME.dollars >= card.ability.money then
i'm trying to make a sticker that retriggers card but it won't work for jokers, does anyone know why?
calculate = function(self, card, context)
if
-- Joker (doesn't work)
(context.retrigger_joker_check and not context.retrigger_joker and context.other_card == card)
-- Playing Card
or ((card.ability.set == "Default" or card.ability.set == "Enhanced") and context.repetition)
then
return {
message = localize("k_again_ex"),
repetitions = 1,
card = card,
}
end
end
whats "context.retrigger_joker"?
i think it indicates when jokers are retriggered
oh, my joker which retriggers another dooesnt actually use that so i dont think thats necessary, idk
this is what i did
im pretty sure stickers should be the same
does someone know how you can make a joker with a random mult? (like misprint)
ok so how would I make sure this detects if a hand contains a 7 and a 10 because iirc this code doesn't work
maybe it's because i'm referring to "context.scoring_hand" which is a boolean?
you can check the source code for misprint but basically you just have to return a random mult in the joker_main context
context.scoring_hand is a table containing all scored cards
ah so this is all right
in theory your joker should work
because the code flow is this:
-declares "has seven" and "hasTen" flags
-checks each card in scoring hand for 7s and 10s, marks as true if the respective rank is found
- if both are true by end of hand, applys mult
okay thank you
okay, so
the issue i'm seeing with this is that everything operates locally. Looking at Fortune Teller's code shows that there's a separate "tarot usage counter" that's constantly tracked, hence why you can find it with more mult than normal as opposed to having to have it in one of your joker slots to scale it
this code doesn't track the total times Coffee Cup was sold, so the effect doesn't work.
Might need a hook for this
ok I can detect the date, what's the easiest way to check if it's changed
you can try to add a variable in G.GAME to do this
Store the day at the beginning, then check it later to see if it's different
so... how would I go about doing that?
that's what i was thinking, i just wasnt quite sure the best way to store it
local start_day_string = os.date('%d')
...
if os.date('%d') ~= start_day_string then
print("It's a brand new day!")
end
question, currently i have this function which clears some stuff my jokers inflict on playing cards
however, is there a way for me to make it so that this function runs without the need of having to manually put it in jokers' calculation?
If you want it to trigger on every day change (if the game is open for more than 24 hours straight?!):
local previous_day_string = os.date('%d')
...
local current_day_string = os.date('%d')
if current_day_string ~= previous_day_string then
print("It's a brand new day!")
previous_day_string = current_day_string
end
You could also account for if it's open more than a month straight, when the day wraps around again, but that may be overkill
yeah way too much
If you want it to work through the game being closed and reopened, you'll need to store the value in SMOD's config
now how do i have it instantly vanish instead of being whenever i start a blind or something?
i know i need some sort of context, just not sure what one would always be active
Not sure, someone else might be able to assist with that. There's always Game:update, but the less things being checked every frame, the better.
i can live with it being when setting a blin for now
@young dew ?
you could do something like this
if context.joker_main then
return {
xmult = card.ability.extra.currentxmult + card.ability.extra.xmult * (G.GAME.coffeecup_xmult or 1)
}
end
if context.selling_self then
G.GAME.coffeecup_xmult = (G.GAME.coffeecup_xmult or 1) + 1
end
yeah i couldnt figure out how to fix the pool stuff, though i think its coming from the code of Wheel of Fortune*? not sure tho
ok it works i just need to make it more apparent
I'm sure this is really easy but how do i destroy the joker after the day changes? I tried copying the cavendish code but it really didnt like it lol it complained about like all of the variables
i assume there's an smods destroy but i cant find it
i looked on the page with all the creation and debuffing functions, no luck
How would I be able to add my joker to the end of round cash-out screen?
I use the same method that j_madness uses:
local destructable_jokers = {}
for i = 1, #G.jokers.cards do
local current = G.jokers.cards[i]
if current ~= self and skpac_utils.getCardKey(current) ~= 'j_[your_prefix]_[joker_key]' and not (current.ability and current.ability.eternal) and not current.getting_sliced then
destructable_jokers[#destructable_jokers + 1] = current
end
end
if #destructable_jokers > 0 then
local joker_to_destroy = pseudorandom_element(destructable_jokers, pseudoseed('madness'))
if joker_to_destroy then
play_sound('slice1', 0.96 + math.random() * 0.08)
extraMessage = "Random Joker Destroyed!"
joker_to_destroy.getting_sliced = true
G.E_MANAGER:add_event(Event({ func = function()
joker_to_destroy:start_dissolve({G.C.RED}, nil, 1.6)
return true
end }))
end
end
My 3rd line with current ~= self just identifies itself as not able to be destroyed.
The rest of it picks a random destructible joker and destroys it.
It also explicitly excludes eternal and cards already marked for destruction.
try seeing the example joker mod's doc on Golden Joker
np!
how do i make it specifically destroy itself
there's probably something in relation to Gros Michel's code
the examplejokers mod has an SMODS version of Gros Michel and Cavendish
set joker_to_destroy as your card's key. I'm sure you can modify my code to your purposes.
G.E_MANAGER:add_event(Event({ func = function()
joker_to_destroy:start_dissolve({G.C.RED}, nil, 1.6)
return true
end }))
alright
Trying to get a snippet of code to run once for every card in played hand, including unscoring. context.individual only seems to count scored cards, and includes retriggers (e.g. Hack). Should I be doing a loop through every card in context.before instead?
it just crashes now and complains about the key being a nil value
i dont think thats how you are supposed to do it
Can you think of why that might be?
the joker_to_destroy part is supposed to be a card
i used the joker key
so i believe it should be smt like:
calculate = function(self,card,context)
if context.setting_blind then
G.E_MANAGER:add_event(Event({
card:start_dissolve...... etc etc
))}
end
end```
Right, sorry. I'm sick and heavily medicated. I shouldn't be doing code lol
It's supposed to be the table of the card you want to destroy (probably self tbh)
ah
uhh think of a joker key as someone's identification, you want that person in this case, not their id
ok this code works
but the multiplier doesn't change and it starts at 2X per cup
i changed it to self and now it doesnt like the dissolve part
you should use card instead of self in this case i believe
Did you try card?
Thought so. self and card are identifiers pointing to itself, I just haven't investigated their proper use cases. I just usually throw stuff together and bash my head against it until it works.
same, i remember someone explaining what self is and i still havent exactly figured that out lol
but in most cases you use card if you want to refer to the joker which is doing the whole calculation stuff
Is there a global or smods variable for the current blind's score requirement, and the current (or final) round score?
help im having a stroke its been a while since i've been making shit
what is this enhancement missing
Is there a way to change the color of an {X:<color>} in a joker's description using loc_vars?
That's an interesting one
please it wont show up in game
i think its possible actually?
oh mb you should replace the 1s with 0s
is there a table in G that contains the blind information for selection? like blind name, required score, rewards and tag if skipped?
i havent made an enhancement before so i cant help u with this one, sorry :(
ok but the main problem is the aesthetics
lemme record something rq
alright, the problem is that it isnt showing up in the menu
@young dew this is the issue
it's visually still a 1X mult even when it clearly applies 2X, 3X and so on
maybe this?
To clarify:
loc_txt = {
name = 'Joker Name',
text = {
"{X:#1#}I want this to change between chip color and mult color{}"
}
},
loc_vars = function(self, info_queue, card)
return { vars = {
someBooleanCondition and 'chips' or 'mult',
} }
end,
the "self.chips" part seems to be the chip requirement
so i believe it should be G.GAME.blind.chips (for example) to get the chip requirement
I know you can use {V:1} to modify text colors based on desired conditions, but is there a way I can make {X:<color>} behave in the same way?
does anyone have an example for how to do an enhancement
steamodded doesnt have them anymore
uhh lets see, lets say in loc_vars, you have
card.ability.extra.color
...and
{X:#1#} (the #1# part being card.ability.extra.color)
MAYBE if you change card.ability.extra.color to a string which represents color stuffs, like "mult", "chips", "white",... then it will work? im actually curious if this is possible or it will just be
{X:mult}...{} in the description lol
V1?????
lmao
Can someone help me
It recognizes that it's suppoxed to put a box around the text, but the provided color is ignored in favor of the default text color. The first value in loc_vars was "mult", and I set the text as follows:
text = {
"{X:#1#,C:white}Test{}"
}
i'll bite
what with?
Texture changing
X: just means it will change the background color, if you want to change the text color then you will need to have C: too
I'm on Android btw
you mean.. you're trying to mod mobile?
thats actually illegal
no can do.
i will have to imprison you there
I'm not trying to change the text color, i'm trying to change the background color, apologies if I didn't clarify that
-# I've been banging my head against the wall for hours aaaa
I didn't actually know that
just make sure you read the rules next time, m'kay?
if that doesnt seem to work then u probably cant do that 💀
it would be interesting if it actually worked though
Why is it illegal though
Damn 😔
So you're telling me that modding a game on pc is fine but modding on a mobile device with the same game is really bad for no reason
If I had to guess with absolutely zero confirmation, it's probably because it might stumble into piracy/jailbreak discussions
yeah
just
air on the side of caution
wait wtf
wait
probably related to this
idk
Wait this seems interesting chat pauae
reddit is currently blocked in my country so i dont know whatever is in there lol (and im lazy to turn on vpn)
So modders aren't just interested in modding Mobile games
can you share a bit of ur code?
sure
here's the code for the relevant joker
i did find something about it some days ago 'cause i wondered if could play modded on my phone too when i was away from pc, people found all sorts of things related to the conversion of the modded save folder and version.dll but seems like it takes a lot
it should be #2#
not #1#
.
wait
nvm
There is a way i know but again against the rules to talk about it
uhhh
alright got it
so
if context.selling_self then
G.GAME.coffeecup_xmult = (G.GAME.coffeecup_xmult or 0) + 1
end
this part is the problem
i think?
the second value in loc vars should be card.ability.extra.currentxmult + card.ability.extra.xmult * (G.GAME.coffeecup_xmult or 0)
i don't see any variablkes used in the actual text?
using {V:number}
loc_txt = {
name = "Prism",
text = {
"{V:1}hi" --will be gold
},
},
loc_vars = function(self, info_queue, card)
return{
colours = {G.C.GOLD}
}
end```
shouldn't it be #card.ability.extra.currentxmult#X{}?
new to balatro modding tho
but i have written mods for other games so just an idea
like, this changes xmult, but i think its supposed to change currentxmult
This changes the text color, yes, but I'm specifically after a way to change the text's background color in a similar way
ah
it goes in order actually
nope, #1# is just the first element returned in loc_vars function's vars
yup i saw
mbmb
you arent changing currentxmult at all, shouldnt you be returning G.GAME.coffeecup_xmult * card.ability.extra.xmult instead?
but in this case, it's just pulling the card.ability.extra.currentxmult from the config which is 1??
no wait
im dumb
thus is the problem
oh it is
i see
so do i just instead make "currentxmult" in config with "xmult"?
SMODS.Joker{
key = "coffeecup",
loc_txt = {
name = "Coffee Cup",
text = {
"",
"This and all copies",
"of this {C:attention}Joker{} gain",
"{X:mult,C:white}#1#X{} Mult when sold",
"{C:inactive}(Currently {X:mult,C:white}#2#X{} {C:inactive}Mult){}"
},
},
config = { extra = {xmult = 1, currentxmult = 1} },
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.xmult, card.ability.extra.currentxmult} }
end,
blueprint_compat = true,
rarity = 1,
atlas = "MintConditionCards",
pos = {x = 5, y = 0},
cost = 4,
calculate = function (self, card, context)
if context.joker_main then
return {
xmult = card.ability.extra.currentxmult
}
end
if context.selling_self then
for i,v in pairs(G.jokers.cards) do
if v.ability and v.ability.name == card.config.center.key then
v.ability.extra.currentxmult = v.ability.extra.currentxmult + v.ability.extra.xmult
end
end
end
end
}```
currentxmult is useless lol
yeah i just did it for uniformity but I ended up using someone else's solution that made it redundant-
hey anyone know why this wont show up in the collection
this will only work if you have the joker when selling it, I think they want to check all jokers sold during the run
yeah
hence the G.GAME variable
im more stumped on how it works inside of the game at all
isnt the joker's function supposed to be, like:
- sells one coffee cup
- other coffee cups gain xmult?
yes but future copies do aswell
wait actually?
oh or it is cuz hes keeping track of that in G.GAME.coffeecup_xmult
the idea is you can sell it and find copies in the future that inherit the mult
ohhh
yeah i see
(isnt that a bit too broken tho ngl)
G.GAME.coffee_cupxmult is just so that its saved through reloads
soo how do you add/make jokers? 
not really
docs
uere
or alternatively
yeah so what ur doing inside of the text is using a variable that you reset back to 1 every time, but to the calculator u pass the global object which does increase
if i inderstand it correctly
actually i cant say that thats self advertising
nevermind
its like gros michel but you dont have to rely on the 1 in 6 to break itself and get the upgraded ver of it afterwards
you have to find the joker again though
yeah, which is also the case for gros michel
2 times for it to be as good as cavendish
what did you want to say
imagine "balancing" jokers
and if you run a lucky card deck, you can farm a lot of $ to keep rerolling for coffee cups
couldnt be me!
im gonna take a look at these rq
@nocturne garnet just dm it to them
lmao i just want ideas
i doubt that wouldnt count
i'm just funneling ideas into a thing
whoever cares about self promotion wwhen you want to help someone who asks for it
it may be in dms but it'd be like a bot dming everyone on the server
also my tutorial is probably like hella old now
they are asking for it themselves in this case
i mean... im here, if i say you're a bot im the one who should be banned
that's good actually
or just basically about ante 5+ onwards, you should have like $25 for interest to reroll
- those vouchers to increase your interest cap too
difference is you have to sell the joker for it to increase, and it takes time to find it again
works great with Showman
showman synergy is pretty good
a joker having inf scaling is pretty insane for a common though
i think i'm gonna make my own one wanna help me with some stuff, i'm both a teacher and a video editor as my professions so it seemed only fitting to see if i could figure this out to make a little tutorial for my friends but maybe also for other people
i got a lot of time this coming week 😅
is that what ur talking about
or the week after that
hey anyone know why this wont show up in the collection [again since noone saw the last one]
week after the next week
ahh yikes we'll have to see then but dw i'll just run some stuff through to check not too much work on your part
tested this
it scales but the current value shows up as 1 less than the actual mult
i guess i could fix this by setting the loc_vars specifically to just "or 1"
oh right yea
hm?
not sure at all tho
whar
its in loc_vars.....
ookay that only fixes the issue when no coffee cups have been sold
maybe the +1 was the right way to go
go with simple until you find a bug 👍
please i've been troubleshooting for hours 😭
change this from or 0 to or 1 aswell?
0 Cups Sold
1 Cup Sold
2 Cups Sold
and it functions as intended!
ty :3
yea i wanted that to be how "joker" was written because of how baristas mispell names-
average starbucks experience
shouldve colored the cup like a starbucks cup ngl
since its pretty much their signature
ehhh i just used a basic coffee cup as reference
im sorry i keep reposting but im desperate for help
whyisnt this showing up in collection im confused
remove the = between enhancement and {
that's what tripped you up
that's because you don't have a calculate function
im so ass at making this shit its ben so long
oh yeah i thought with enhancements all it wants is the config 😭
yea
also make sure you have a loc_vars for your bonus chips
aw man im too tired for this today 😭
thanks for the help though
np
do rest if you feel the need to
Holy heck I finally figured it out
NICEEE
I had to replace the vanilla localize function with a modified variant so that it has a new text modifier {B:1} which functions basically the same as {V:1} except it affects the text background
-# Hopefully this doesn't cause any compatibility issues oh boy
This is the sole reason I spent the last 5 hours on this 😭
looks cool tho
this about conway's game of life?
Yeah, it'll give like 2 or 3 chips per living cell, and reset to a random state when all cells die
oh wow
interesting
one thing tho
are u just gonna reset it if it hits a stable state
like i think the square
im not sure if i remember correctly hto
Probably, I'll have it remember the last 3-4 states and if it repeats, then it'll reset
i think it might be better to just grab those states from the internet, save them in a table and check once it reaches one of them
you could encode it into a string
that way you can recognize it
It's a hard problem, because there's some patterns that repeat every 2 generations, and some that repeat over 120 generations ;-;
Though with such a limited grid size (5x5 without wrap around) most might not fit
every 120 generations is fine tho honestly, but i recommend picking a threshold like every 10 generations, and then encoding all of those patterns so your code checks of ONLY that shape is present or otherwise 2 of those shapes, and then maybe a better idea is for it to generate an extra true somewhere so it breaks away from that cycle
yeah i think ur gonna run into only 5 or 6
but thats a shit ton of work tho honestly
how do I change the shop_rate of consumable or the weight of a booster pack ? (I'm currently using a variable but is there a better way of doing it ?)
In terms of oscillating patterns (repeats after n generations), the only one that fits is the 1x3 line that rotates. The ones that don't change from generation to generation shouldn't be hard to tackle tho
how do i tie localization files to the places the text needs to go to?
like for this what do i need to put in the joker?
Steamodded example mods. Contribute to Steamodded/examples development by creating an account on GitHub.
well imma be real its just showing me the old method i was using
i was hoping to use the one thatd allow easy translation
like the one where you set up files like en-us.lua and put all the text in there
well yeah
thats what the above is
but its currently not attatching the text to the joker in game
then the key is probably wrong
its not
is it in descriptions.Joker?
its in en-us.lua
no, I mean is the table formatted like my screenshot
in the way i thought i was supposed to do this from the documentation and johnsmods word of god
does the joker show up blank?
oh i think it shoudl'nt be in the modules folder
love that
this seems to trigger twice on enhancements, but once on seals. Why doesn't it work properly on the enhancement? (I'm referring to the context that's the same)
Add and context.main_eval
I think there’s some jank seal stuff left around that might need looking at
With that added the enhancement doesn't seem to trigger at all
Oh wait that’s just for jokers nvm
Have you got something causing repetitions?
Oh it might be because it’s just in config maybe?
This is what I've got.
Try adding an extra table inside your config
Still triggering twice
Do context.playing_card_end_of_round instead of the normal one
the art is sick how did u do that
That worked👍
oh is this for debugging?
How do I check if the played hand contains the most played poker hand? I've seen next(context.poker_hands["Hand Name"] but can't figure out the rest
great.
the values show up as "nil" but work as intended
and each 10 plays the "reset" animation too
Add and context.main_eval to the reset part
you mean like
as an additional context?
so
context.end_of_round and context.main_eval?
yes
Trying to figure out what I should change the context to for the first half of this code to total up each card properly. My brain leans into "for loop running as a context.before going through a whole hand", but I'm not sure if that's the best way to count each card in a played hand (including unscoring) once
... actually why have I not looked at splash's code yet
does there happen to be a context like context.first_hand_drawn that also has access to the actual drawn hand?
oh I havent updated the wiki
check context.hand_drawn
its a table of the drawn cards
oh, sick, haha, that's exactly what I need!
Why is this like that?
key = "1",
card_key = "1",
pos = {x = 14},
lc_atlas = "SCB_LC_Faces",
hc_atlas = "SCB_HC_Faces",
loc_txt = {name = "1",},
nominal = 1,
shorthand = key,
face = false,
next = {"2"},
strength_effect = {fixed = 1},
in_pool = function(self, args)
if args.suit == 'SBC_Bamboo' then
return true
else
return false
end
end,
}```
really dont get why this lovely refuses to detect this pattern here
[patches.pattern]
target = 'functions/common_events.lua'
pattern = "elseif _c.name == \"The Wheel of Fortune\" then loc_vars = {G.GAME.probabilities.normal, cfg.extra}"```
i mean its right there
the pattern must match with the entirety of the line
oh. didnt realize it worked like that
your pattern is unfortunately only matching the first bit, which isn't a valid match
yeah it's a limitation of the pattern patch's syntax
This seems to be removing one from each instance of the enhancement in the deck, instead of just one from the enhancement triggered.
use card instead of self
this is the 3rd iteration of my code but my custom poker hand still isn't scoring the queen even though the game is detecting as selected
i think she's ready
I seriously need some help with this cause I don't know what's going on
varying levels of seriousness are happening
the art for those are wonderful!
Yall think these read well as leaves?
I think you are mistaken
oh, it appears i am
But yea if someone told you those were leaves would you recognize them as leaves
yep!
then yes
Is card.edition.type the correct way to get the name of the edition applied to a card
it'll give you the key without the e_ prefix iirc
SMODS.Rank {
key = "1",
card_key = "1",
pos = {x = 14},
lc_atlas = "SCB_LC_Faces",
hc_atlas = "SCB_HC_Faces",
loc_txt = {name = "1",},
nominal = 1,
shorthand = key,
face = false,
next = {"2"},
strength_effect = {fixed = 1},
in_pool = function(self, args)
if args.suit == 'SCB_Bamboo' or args.suit == 'SCB_Dot' or args.suit == 'SCB_Character' then
return true
else
return false
end
end,
}
SMODS.Back {
name = "SCB_Mahjong",
key = "SCB_Mahjong",
config = {},
order = 16,
pos = {x = 0, y = 0},
loc_txt = {
name = "Mahjong",
text = {
"Play with {C:attention}Mahjong{}"
}
},
apply = function(self)
local extra_cards = {}
extra_cards[#extra_cards+1] = {s = suits_mah[i], r = "SCB_1"}
for i = 1, 3 do
for i = 1, #suits_mah do
for j = 1, #Rank_Mah_N do
extra_cards[#extra_cards+1] = {s = suits_mah[i], r = Rank_Mah_N[j]}
end
end
end
G.GAME.starting_params.extra_cards = extra_cards
end
}
Oops
Still unclear on how to make this work
Any idea why this code do not work ?
SMODS.Joker{
key = 'j_ok',
discovered = true,
unlocked = true
} ``` ```lua
return {
descriptions = {
Joker = {
j_ok = {
loc_txt = {
name = 'AJOKER',
text = {
'.',
'.'
}
},
}
}
}
}```
It's a really simple code, i created a "localization" folder and a en-us.lua file for the strings, but for a reason, it does not work
its missing your mod's prefix
oh
new splash context? 👀
It's almost impressive how you seem to working on exactly the kind of stuff I need, before I have the chance to write a worse implementation haha
Wow I completely freehanded this and I'm actually kinda proud of it
Looks great! Is that the ace of leaves?
Yup!
Its actually entirely a coincidence that leaves are a thing in this deck im making, they replace hearts in this instead of spades which they are historically
Okay i genuinely have no idea why this is not working
This deck is based off of the story me and my friends are writing and one of the factions happens to be heavily plant themed
Ah forget it, I'm gonna update my sprite sheets to be combined
see if that's the problem
Is there a way to trigger a card after it's been trigger. (Ex: first card triggering again after third card.)
I need to figure out how to make the chips for these 1s to 9 chips instead of 1 chip to match Aotenjo
SMODS.score_card(context_scoring.hand[3], {cardarea = G.play, full_hand = context.full_hand, scoring_hand = context.scoring_hand, scoring_name = context.scoring_name, poker_hands = context.poker_hands}) ?
you can set a shorthand, but I've wanted to rework this system
(it's currently not localizable)
context.scoring.hand 
I just changed the shorthand to "1" in this case. Y'know if it's possible for me to make the 1s have 9 chips just for the mahjong chips? but 1 for any others?
or is this something I should check my tag_card stuff
it's probably easiest to modify the entry in P_CARDS you want to change after injection
smods doesn't really offer a good way for unique playing cards as of yet
I can tell
hmm, do I break the color rules to look cooler or work with negative space
is there a way to make a joker trigger on certain events happening?
I want to make a joker that reacts to an event happening with another card
kind of like how lucky cat works
Sorry not 144, 136
Forgot I'm not doing Seasons or Flowers, which is how Aotenjo's default has it
Modify the entry? how?
change the nominal, that's what controls the amount of chips
Is there a specfic context it needs to be in?
thank you !! (i just confused myself with mod prefix and Joker prefix)
neat
are there any other contexts you think need to be added?
I ask because of this.
it's scoring_hand
I already pointed out the mistake of scoring.hand
kind of related
the whole gang's here
This is what happens why I try inserting this:
key = "music_madcap",
path = "music_madcap.ogg",
sync = {
['music1'] = true,
['music2'] = true,
['music3'] = true,
['music4'] = true,
['music5'] = true,
},
select_music_track = function(self)
return G.GAME and G.GAME.modifiers.madcap_stake
end
})```
That worked ty!
Me when I steal Aure's thanks 
nah you deserve the thanks
Ok my problem is probs bc I did audio instead of sound
Kinda feel bad cuz apparently you said it already before
I thank all involved, it took me way too long to get that working.
bleh
I'm trying to create a new card type and it is going disastrously lmao
The fact that it isn't a consumable type does not help 😭
why isn't it a consumable type?
Because it's not a card you use. It almost acts like a Joker in a way
and I can keep it after 2?
(but not really)
you can do that with consumable types
Yea new-calc supports calculate on consumables
Then how would I prevent people from "using" them
can_use
Hook or lovely patch said button to not show up if the card set is your consumable's
if can_use returns false there's no button
Oh huh
Doesn't this just grey out the button
Oml 😭
oh maybe that's just in shop
oh
hm yeah that's just in shop actually
damn
maybe we should add a use_button flag
yeah maybe
If you need a reference I did something similar for my mod

I was thinking as well should consumable types have a default area to go to?
(for now until they add said use_button flag)
So what, is there a section of code i can do that's like "if card.suit = X, Y, Z then
nomial = 9" or something like that
But isn't nomial = 9 gonna move the rank to after 8 instead of before 2?
https://github.com/SDM0/SDM_0-s-Stuff/blob/f93580bc368d46a694a1e5eb9993d088e7d0282f/lovely.toml#L166
Hell yeah
sick
Not finished yet but I'm wicked proud of the pixel art I did
is there a built-in way to change the shop_rate of consumable or the weight of a booster pack ? (like some vouchers does)
is there a way to check if a certain mod is installed for an if statement?
if (SMODS.Mods["mod_id"] or {}).can_load then
Or if the mod uses a global you can check if it exists
(like Cryptid or Ortalab iirc)
great thanks
HUGE
What does the key structure for a card with a custom ConsumableType look like? would it just be c_[prefix]_[key]?
yes
we don't do that anymore
if next(SMODS.find_mod("id")) then
Oh, that's neat
So this setup would be correct (ignoring the blank fields)?
kinda funny how we went from SMODS.findModByID to no util to this
I'm aware, I said ignoring that lol
I mean HEX"" is probably just black?
What exactly does this mean?
You know the default option if all options are taken/poll is empty
Like strength for tarot or Joker for jokers
How do you make a card suitless, without an enhancement?
yes I do want a default, hence why I set it
Oh wow
I read it comparing to my code and I set the default at the bottom 😅
Can't believe I'm hitting you with the 98% lmfao
😭
.
But yeah I assume this skeleton for the type is good then?
Dunno if cards' useful but overall looks good to me
How exactly does cards work then? It's gonna be more than just that one card in the type, I just wanted to make sure I was getting it all set correctly
From how I interpreted the doc, that's what sets the specified cards to the type
You can do that when you create the card directly with set = "consumable_type_key"
Seems like it should
hey how do you get that red text in VS code? it looks so cool!!! /j
lmfaooooo
That description about to look funky
omg zodiacs!!!!
Alrighty then, thanks for the tips

I'm trying to remove stone cards from a calculation in a joker, but I can't figure out exactly to do it. Can I get somehelp with this?
try v.ability.name ~= "Stone Card" instead
use not SMODS.has_no_rank(v)
Thank you! Worked perfectly. 
This is a better solution to handle every kind of stuff that removes ranks
I tried that one first actually - caused a nil value error
Lemme go put it back in to get the crashlog
Stone Card possibly works better in this context since for some reason they were causing the calculation to go way off the rails
Is there a prefix for lua SMODS.DeckSkin ?
Try updating your SMODS
you have a very old version of steamodded
what do you mean by a prefix
That'd do it lmao
For the localization files, like j_ for the jokers
I'd like to change the name
Never made a SMODS.DeckSkin, but you could look at how other mods did it
I'll prob do that
yep it was old SMODs, PEBKAC but it works perfectly now!
okay I can't make sense of any of this code, unless someone with deep knowledge of smods and balatro's scoring code wants to guide me through this, I'm done trying to figure out how to implement an unscoring context
idk if this helps but this is how I handle unscoring cards for one of my jokers
(it levels up if a hand contains any number of unscoring cards, and resets if all cards score)
yeah the issue for me is that unscoring cards don't calculate, which requires a patch
what are you trying to do?
unscoring context used by cryptid's green seals
having a card calculate if it's played but unscoring
oh right yeah I wanted to build that into smods at some point
ooh, that'd be really nice to have built in
how does gradient(self, dt) on rarity work?
i havent seen any other mod use it that i know of
You basically modify the G.C of the rarity color inside that function (much like how the DARK_EDITION color does).
The mods with rarities that have gradients just didn’t port em (e.x. for Cryptid I was just too lazy).
i'm trying to make a joker that, among other things i'm yet to implement, is meant to just give. 1 chip and 1 mult. but for some reason it's not showing up right in-game??? what am i doing wrong, exactly?
config = { extra = { chips = 1 } },```
First, you can put all your config.extra stuff in one singular table. Second did you define a loc_vars to your joker? Also show the code of your localization
as of right now i'm just mucking with the vanilla jokers template so i uh. i don't think i'll be doing that much yet. here's the loc
name = 'Paul',
text = {
"{C:mult}+#1# {} Mult",
"{C:chips}+#1# {} Chips",
"Paul."
}
},```
loc_vars is basically what's used to replace the #x# in the localization, it looks something like this for your example
loc_vars = function(self, info_queue, card)
return {vars = {card.ability.extra.mult, card.ability.extra.chips}}
end,
Also your "Chips" line should have #2# instead of #1# to refer to the second value in the returned loc_vars table
But yea you should really fix your config
btw how does it work
on_select = function(self, card)
-- code here
end``` on your object
how exactly do i adjust that to be one line, anyhow? (if it helps, i'm planning on also giving this a passive +1 Joker Slot ability as an extension of the joke; so uh. will i need to put that on an extra line?)
so I've made joker texture replacements by hijacking another texture mod, all I need to know now is how I make it into a separate mod
it's got 1 mult, but not 1 chips yet...
Show your loc_vars and loc_txt?
-- How the code refers to the joker.
key = 'paulJoker',
-- loc_text is the actual name and description that show in-game for the card.
loc_txt = {
name = 'Paul',
text = {
"{C:mult}+#1# {} Mult",
"{C:chips}+#2# {} Chips",
"Paul."
}
},
--[[
Config sets all the variables for your card, you want to put all numbers here.
This is really useful for scaling numbers, but should be done with static numbers -
If you want to change the static value, you'd only change this number, instead
of going through all your code to change each instance individually.
]]
config = { extra = { mult = 1, chips = 1 } },```
relevant lines here
MODS
please tell me it says SMODS in your code
and you just mistyped it in the chat message
Where's your loc_vars?
it would crash otherwise
it says SMODS. i mis-copied ;P
return { vars = { card.ability.extra.mult } }
end,```
wait. i think i see the issue
Yea you forgot to put the chips one in too
also, does anyone know if there's like. a keyboard shortcut to quickly restart the game without having to enable/disable another mod? (and to a lesser extent a mod that like, lets you summon a joker in-game so you can test it easily)
okay, THAT much worked
Weird extra space but nice
idk about the former but for the latter:
step 1: download https://github.com/WilsontheWolf/DebugPlus
step 2: hover over the joker you want in your collection
step 3: press 3
Debugplus to spawn jokers
honestly I just alt+f4 and then launch via steam
holding M restarts (I think only if you have debug mode enabled on the game itself?)
Moment
how do i make it so jokers dont spawn in the shop in a normal (non challenge) deck
though it ends up spamming the next window that gets focused with the letter m, which is a bit annoying if you have your code open in the background
This code is causing my joker to instantly despawn, also its taking out a way larger chunk of chips, mult, and xmult than it should. Any advice?
I stole the func code from the popcorn joker
okay, weird. it DISPLAYS the +1 chips but doesn't give them in scoring.
context.end_of_round has multiple other contexts tied to it, try adding and context.main_eval to it
kk
where are you setting up the Sucker variable?
show me it so I can check
Oh yea if it's defined in the calculate function that'll cause issues
the modded balatro wiki is super slow for me
i think it's because of the new background
and i don't know of to un-slow the wiki 😔
You mean this? https://github.com/Steamodded/smods/wiki
So this prevented it from despawning, but I think that it no longer randomly decays the values
no this one https://balatromods.miraheze.org/wiki/Main_Page
oh
Which probably means it doesn't go into it anymroe
Odd, can you debug inside the context.eor and me see if it actually doesn't go inside?
Oh yea also Oburg what's your SMODS version?
if someone makes a good teto balatro song im gonna make it so she plays it when you get her
as of right now she plays fukkireta
also she only appears if you have vocalatro or the vocaloid card set installed
Quick question!
I'm split between doing two methods of probability guaranteeing, and I wanted to know if there were any reason to do one over the other?
- Lovely patch into the Pseudorandom function, returns 0 if probabilities are supposed to be rigged
- Set the game's probability normal to an impossibly high number (like 1e9)
number 2
i have a joker that guarantees probabilities! i did it just by setting the probability number to 7.777 since base game doesn't have any probabilities higher than 1 in 1000
number 1 will mess with loads of stuff
wasnt aware of that, ty!
the bananas are no longer safe >:3
👀
how's it function in-game? my Joker works by: if you sell it, it rigs all probabilities until the end of the round
we really need a better way to manipulate probabilities
probably (no pun intended)
like denominators
i mean naneinf is possible with chances
but you cant revert
goes -naneinf when you try
:3
i think you should specify it being 7777
Im just struggling to make the second effect, i dont even want to think about the first one
if I see any mod have something that requires higher probabilities i will raise it to 77.777
mm change the probabilities on context.individual
and set them to 1 on context.after
yh if scoring hand includes a blessed card increase it
cryptid has a 1 in 1e8 or smthing chance
777.777 is prettier and better
afterwards decrease
true!
ive tried that
,
i think you should make it as high as possible without hitting naneinf
oh yeah right luckies pay out before hand is scored
i dont even know how to start with tha payouts
i think you should take ownership of m_lucky and m_glass and add a check for the joker in the code for their effects
luckies pay out in context.main_scoring which is before context.individual
my main concern with setting the probability normal to a number that's too high is that if you sell the Weighted Dice, and then somehow acquire several Oops! All 6s then the game might overflow because it doubles all the values
because if i manage to change the rate the mult would also trigger
oh yeah i forgot about it
probabilities are a thing outside of the hands of noobs like me
thats a problem
if you sell it wouldnt go back to 1?
probabilities arent meant to be used basically
if your number is really high doubling it might cause a naneinf
selling the Weighted Dice is how it activates
you sell it, and then all probabilities are guaranteed until the end of the round
like deadass the design of them is so fragile
you can code around them
oh okay
wait lemme get the code for luckies
there should be a probabilities function ideally
honestly it only works correctly if oops is the only probability joker
and some sort of stack of modifications to the normal value
wait actually I had an idea for how I can fix it with Weighted Dice
I can combine both of my solutions
so if you sell it, it activates a G.GAME.rig_all_probs variable
and then when the hand is calculated, if that variable is set to true, THEN it sets the probability to the impossbily high number
and after it's all said and done, it reverts it again
and then that continues until rig_all_probs becomes false at the end of the round
function Card:get_chip_mult() if self.debuff then return 0 end if self.ability.set == 'Joker' then return 0 end if self.ability.effect == "Lucky Card" then if pseudorandom('lucky_mult') < G.GAME.probabilities.normal/5 or SMODS.find_card("j_prefix_4leafclover") then self.lucky_trigger = true return self.ability.mult else return 0 end else return self.ability.mult end end
Lucky cards doesnt even have an extra ability like glass does
this should work
just change the joker id
in context.before?
put it outside joker code
or how?
you should patch that
like a hook
yes
i dont know how patches work, but thanks, il try it rn
yes it would be better actually i forgot lovely patches existed
if it works, now i just need to figure out the glass part
it kinda works
but is the mult triggering always and not the money
Vriska Balatrostuck and 88888888 (I don't remember what was used)
where did you get that code? i just need to check the money part instead of the mult
I found this:
if self.ability.p_dollars > 0 then
if self.ability.effect == "Lucky Card" then
if pseudorandom('lucky_money') < G.GAME.probabilities.normal/15 then
self.lucky_trigger = true
ret = ret + self.ability.p_dollars
end
else
ret = ret + self.ability.p_dollars
end
end
me and balatrostuck are in a loving relationship it just doesn't know it yet
more like balatrostuck in development hell
ooo im sorry
so i should make a patch for this function true?
ye patch this its basically the same thing as the mult
This solution actually worked pretty effectively!
okay, ill try to patch it myself
And it doesn't seem to conflict with Oops
why is the rig_all_probs a global?
i don't think it needs to be
because it's ALL probabilities, not just the ones in the hand you play
okay it works, now its just that ALL lucky cards payout
not just the four
should i add that to the patch or in the joker code?
ah, easy fix, add an " and card.base.id == 4 "
or self.base.id == 4 im not 100% sure which one works if you patch it in
is card defined outside of the joker?
okay ill try
is it possible to have the options argument of SMODS.poll_seal be an exclusive list instead of an inclusive list? so I can have it be all seals except for X, instead of manually specifying every seal
is this one
god bless you
it's not, but it's not difficult to make a list of all seals minus some specific ones
update: realized a flaw with this
I want to target all probabilities (including negative ones, like the boss blind that says 1 in 7 cards are drawn face down) but this solution doesn't really allow that, so I've reverted back to how it was before. a much simpler time
now ill check if i can make a patch for the glass part
wheel checks the same probability as everything else
unless you physically have a wheel card in you consumables area and you use it, wheel can't be rigged because the joker can only rig things after a blind has started and can't rig things after a round has ended
ok im sorry
dw about it, probability things are confusing lmao
what?
im sorry
how does that relate to what autumn said?
idk
so i dont think the glass works as the lucky card and it can be patch that easily since its inside a bigger function
that, or i dont know how patches work
is there any guide on lovely injecting, hooks and patches?
question unrelated to mod making but which i still believe fits the channel, is there a way not to have to manually remove my smods folder and add my smods old_calc folder everytime i want to play cryptid?
what about refactor branch of cryptid?
bumping this
what's the event
you can call calculate_context when the event happens, and give it a context the other joker responds to
a mod profiles mod would be dope
so I have cards on the side here (weapon)
and some of my jokers react to the shots missing or hitting
big
look at this lovely unscored card calculation
lovely? say that again?
his ass is NOT SCORED 💀 💀 💀 💀
if you mean the old google play card it is a 1 in 8 chance of giving 1e80smt mult
lovely's readme is a good place to start
there is 1 in a 4 chance that probabilities are going to kill me today
also this did give me a new joker idea in #⚙・modding-general
Speaking of unscored cards and lovely patches, this doesn't work with better calc what would it be now?
but is a glass card 1 in 4, not a wheel of fortune 1 in 4
country boys make do
wait what
here's the file for anyone who wants it, just put it in the mods folder
again, why not use cryptid-refactor ?
whats that
You can copy and rename the Balatro.exe to something else and it will genereate a completely separate mod folder and save files
because its still broken as hell
a branch of cryptid which works with better-calc
yes but i would need to have two folders with basically the same mods
i have like 6 folders and when i want different modpacks i move everything manually
I mean, separate profiles would be two different folders with basically the same mods, so I guess I don't know what you really want
i just want to bump my head into a concrete wall actually
i hate probabilities :)
now the glass 4s are always breaking lmao
you can already do that
ik, you'd just run through the full hand and if the card isn't scoring, you destroy it
but i did still get the idea from this
learning the event manager is going wonderfully
hey what is the value for the ante you complete the game at
8
small issue with this code
it functions as intended, but when looking at it the variables only display as nil
loc_vars should return {vars = {values, here}}
oh wait is it G.GAME.win_ante
ah, that's what i missed
hey so why does this just generate the same numbers every time
is there something im missing
it generates the same numbers every time unless i restart the entire game idk how to make it generate fresh ones each time
i wanted to make a random deck that randomizes all the values
i tried using math.randomseed and that didnt do anything either
I'm actually not quite sure what's going on here, I have an event created under the calculate function that loops through all the cards in hand (besides the one with the beige seal) and applies a random seal. but it doesn't seem like its escaping that for
I'm trying to get this to happen after all the cards have visually finished scoring
and it works, it just doesn't finish
function Game:init_item_prototypes()
self.P_CENTERS = {
m_glass = {max = 500, order = 5, name = "Glass Card", set = "Enhanced", pos = {x=5,y=1}, effect = "Glass Card", label = "Glass Card", config = {Xmult = 2, if (SMODS.find_card("j_toyr_four_leaf_clover") and self.base.id == 4) then extra = 4}}
}
Is this a valid patch?
i dont know how to put a condition inside a table
Because that code is only run once
you gotta return true at the end of the function in the event
If you want to set a random value for each instance of the joker do it in set_ability
ah, thanks