#💻・modding-dev
1 messages · Page 624 of 1
hm
i have the .fs file here
you have debugplus
yeas
and it is supposedly defined as an edition
try cycling on a random joker with Q to give it that edition
or ctrl + q but that by default closes the window so
config
so the edition isnt properly defined
doesnt jokerforge which youre using handle that alone?
you just export it with a defined edition, and then just swap out the shader
no you dont have the edition in the first place
like it doesnt register
unless you specifically hid it from collection and debugplus
i dont know, im an artist not a bala programmer sorry
idk either, it ok
It's been a while since I've done balatro modding, so I'm a bit rusty, how would I be able to destory the leftmost card after a hand is finished playing?
i mean you have no_collection = true
if context.destroy_card and context.destroy_card == context.full_hand[1] then return { remove = true } end
so that would be why it isnt there
Thanks! ^^
o
Are you loading that file?
assert(SMODS.load_file('editions/divine.lua'))()
yay it works
this code is not makin spectrals
heck ass hallucination hates non tarots
if not blind.disabled then
if context.setting_blind then
blind.hands = {}
for _, poker_hand in ipairs(G.handlist) do
blind.hands[poker_hand] = false
end
end
if context.debuff_hand then
if blind.hands[context.scoring_name] then
blind.triggered = true
return {
debuff = true
}
end
if not context.check then
blind.hands[context.scoring_name] = true
end
end
end
end```
anyway i can modify this so that you cant play two suits consecutively?
e.g. spade -> spade
nvm made it work >:)
this blind is evil LOL
is there a way I can get the blind requirement for a round?
G.GAME.blind.chips
thank you!
How can I add something to the score directly after the chips and mult are calculated?
to the total score or to the chips and mult?
Total score
both answers are here anyway
https://github.com/nh6574/VanillaRemade/wiki#how-do-i-change-the-amount-of-chips-scored-in-the-middle-of-a-blind
you want context.after probably
Thanks! ^^
For some reason when I tried this, it reset back after the game calculated the value
hmm you probably need an event then
That worked! Thank you!
Would there be a way I can have 2 different odds defined in my local variables? My plan is to do a roll for 1/1000 and then 1/25.
config = {
jack_odds = 1000,
win_odds = 25,
extra = {
gamble_cost = 3,
norm_dollars = 5,
jack_dollars = 100,
}
},
loc_vars = function(self, info_queue, card)
local probabilities_normal, odds = SMODS.get_probability_vars(card, 1, card.ability.odds, "Wyfole_GAMBLE")
return { vars = { probabilities_normal, odds } }
end,
calc_dollar_bonus = function(self, card)
return card.ability.extra.dollars
end
odds1 = 1000, odds2 = 25
How would I randomize both though? Cause for 1 you need something akin to local probabilities_normal, odds = SMODS.get_probability_vars(card, 1, card.ability.jack_odds, "Wyfole_GAMBLE_JACKPOT") in loc_vars but I'd need to define 2
local probabilities_normal1, odds1 = SMODS.get_probability_vars(card, 1, card.ability.jack_odds, "Wyfole_GAMBLE_JACKPOT1")
local probabilities_normal2, odds2 = SMODS.get_probability_vars(card, 1, card.ability.win_odds, "Wyfole_GAMBLE_JACKPOT2")
and then return all four variables
and use #1# through #4# in the localization
oh, I thought they greyed out text when I typed odds1 meant it couldn't work. Thanks
whats the {C:} for the gold color, like in golden joker?
money
why does
SMODS.get_enhancements(context.other_card)[1]
return nil but
SMODS.get_enhancements(context.other_card) returns a table of strings
No, it returns a table of booleans that are indexed with strings.
so why doesnt #SMODS.get_enhancements(context.other_card) work
and instead give 0
The table is not number indexed so # does not work.
how do i get if theres any enhancements
next(SMODS.get_enhancements(context.other_card))
how do you check if a certain consumable has been used before throughout the entire run
if G.GAME.consumeable_usage['c_modprefix_key']
another question, how would you set an existing poker hand (i.e Flush) into not being visible using SMODS.is_poker_hand_visible
You would hook it and return false
isn't there some smods function to look for a specific joker that a player owns
SMODS.find_card
oh so literally just like SMODS.find_card("j_joker")
Yes, but it would be next(SMODS.find_card('j_modprefix_key')) to check if it exists.
so like this?
if next(SMODS.find_card('j_chm_rotten')) then
easy enough i've just never had to use it lol
Yes.
can i get an example on what this is supposed to look like...
Ive been jabbing away at this for the past minute and ive got 0 clue whats happening to it
local oldsmodsispokerhandvisible = SMODS.is_poker_hand_visible
function SMODS.is_poker_hand_visible(handname)
if handname == 'Flush' then return false end
return oldsmodsispokerhandvisible(handname)
end
im trying out a shader thing and im getting a error about a shader uniform not existing
{
// Take pixel color (rgba) from texture at texture_coords, equivalent of texture2D in GLSL
vec4 tex = Texel(texture, texture_coords);
// Position of a pixel within the sprite
vec2 uv = (((texture_coords)*(image_details)) - texture_details.xy*texture_details.ba)/texture_details.ba;
vec4 hsl = HSL(tex); // convert texture to HSL values
vec4 bhsl = HSL(tex); // make a base copy of HSL values
vec4 hslInvert = hsl;
hslInvert.x = hslInvert.x;
hslInvert.y = hslInvert.y;
hslInvert.z = 1-hslInvert.z
tex = sepiaVec;
// required
return dissolve_mask(tex*colour, texture_coords, uv);
}```
what is the error specifically
yea you have to use the variable somewhere
use it for what though
if you dont want to use it add something like
if (greyscale.y > greyscale.y*2) {tex = vec4(0);}
it really doesnt matter , it just has to be used once for glsl logic
gonna test it
this is assuming you have defined greyscale as a uniform beforehand
One last thing, how do i make a check where the hand is visible when Jupiter has been used
dont check for equality with something like G.GAME.consumeable_usage
just remove the == false/true, which will default it to if it exists at all
if you want to check for it not existing do not G.GAME.consumable_usage['c_jupiter']
if handname == 'Flush' then return not not G.GAME.consumeable_usage['c_jupiter'] or oldsmodsispokerhandvisible(handname) end
I seeee
why did it come out as evil and green and purple (basically same code expect for changing the non-existant variable)
1st image: in game
2nd image: the shader done in a image editor
how do i get an event to detect when the ante changes?
context.ante_change?
ok last last last thing, how do i remove the planet consumable from a pool until it is visible? (v is hand type and k is its respective consumable)
for the event manager, not the calculate function
return SMODS.is_poker_hand_visible(v)
No, the event manager just adds events.
now its just messing with me, that's just a inverted joker!
code:
vec4 effect( vec4 colour, Image texture, vec2 texture_coords, vec2 screen_coords )
{
// Take pixel color (rgba) from `texture` at `texture_coords`, equivalent of texture2D in GLSL
vec4 tex = Texel(texture, texture_coords);
// Position of a pixel within the sprite
vec2 uv = (((texture_coords)*(image_details)) - texture_details.xy*texture_details.ba)/texture_details.ba;
vec4 hsl = HSL(tex); // convert texture to HSL values
vec4 bhsl = HSL(tex); // make a base copy of HSL values
vec4 hslInvert = hsl;
hslInvert.x = hslInvert.x;
hslInvert.y = hslInvert.y;
hslInvert.z = 1-hslInvert.z;
hslInvert = RGB(hslInvert);
tex = hslInvert;
if (greyscale.y > greyscale.y*2) {tex = vec4(0);}
// required
return dissolve_mask(tex*colour, texture_coords, uv);
}```
what it should look it roughly
should it be under lua if G and G.GAME
No, because those should exist when in_pool gets called.
ok everything works as intended, thank you very much!!
What are you trying to do?
actually there is one more thing, 3oak, 4oak, and i presume 5oak still score all cards instead of 2 in the default pair, would stopping any other card that isnt in the first pair have something to do with context.evaluate_poker_hand?
I want to start working on a mod that drastically changes a lot of mechanics instead of adding objects inside preexisting boundries. For example, I want to make jokers that have a use option like a consumable that debuffs them for the round, and also change how cards are positioned and score in the played area. How can/should I do this best?
I was looking inside the vanilla reforged jokers, and I read this function in Blackboard
playing_card:is_suit('Spades', nil, true)
what do the arguments nil, true do?
Chat i've been trying to make a joker that only appears when I have a seal in deck, but I keep crashing. Does anyone know what I should be doing instead?
EDIT: nvm it was just smack dab in the middle of the calculate function for some reason
@sly peak whats the name of your mod that recreates the custom hand leveling system thats similar to Jen's Almanac
I forget which order, but one is bypass_debuff and the other is flush_calc iirc
I assume the last is bypass_debuff but im not sure, its most likely joker forge jank
Just look at vanillaremade instead
it's the exact same in vanilla remade lol
Oh well then its probably the one thats true being bypass_debuff
bypass_debuff sounds like it should be a boolean so I doubt that's the nil one
i mean nil is identical to false in a lot of ways (unless someone uses == false for whatever reason)
Is there a straightforward way to pick a random tarot in code?
not generate it just pick it out of the 22
i currently have this code for creating Hanafuda cards. however, this allows for duplicates
what do i need to do to disallow duplicates, like Tarots and Planets do?
cull the chaffs pool, see common_events.lua at --cull the pool
heres a shortened version for lobcorp
local Card_click_ref = Card.click
function Card:click()
if self.label == 'j_mc_kaballah' then
if G.jokers.cards then
for k, v in ipairs(G.jokers.cards) do
if k ~= MC.my_pos(G.jokers.cards) then
MC.manipulate_values(G.jokers.cards[k].ability, self.ability.extra.x_amt)
end
end
end
end
return Card_click_ref(self)
end
I found this in the documentation, but it just doesn't seem to be true
"card" seems to be referring to the joker that's doing the calculation, not the card being sold
elseif context.repetition and context.cardarea == G.play and context.other_card.ability.Bitters_s_target then
return {
repetitions = card.ability.extra.repetitions
}
INFO - [G] 2025-11-23 00:56:48 :: WARN :: DefaultLogger :: Found effect table with no assigned repetitions during repetition check
INFO - [G] 2025-11-23 00:56:48 :: WARN :: DefaultLogger :: Found effect table with no assigned repetitions during repetition check
why...
i know its smth dumb
try doing context.other_card
context.card
also i'm making this stat thingy on each of my flag jokers and idk if this is the most efficient way to define every single flag's stickers like this
SMODS.Sticker{
key = "stats_afghanistan",
default_compat = true,
atlas = "Stickers",
pos = {x = 1, y = 0},
rate = 0,
badge_colour = HEX("92118e"),
sets = { ["Joker"] = true },
}
SMODS.Sticker{
key = "stats_albania",
default_compat = true,
atlas = "Stickers",
pos = {x = 1, y = 0},
rate = 0,
badge_colour = HEX("92118e"),
sets = { ["Joker"] = true },
}
..etc..
neither; G.jokers.cards
were you all refering to what I'm doing?
or trying to make
that I had trouble with?
Oh, no, but I was going to say, I don't really get it?
oh wait actually, how can I just reload atlases
bc i think that'll update it
wait not atlases
localization files
Like, you were trying to make a straight. But you're one card away and the last card is one number away.
it's works both like four fingers and shortcut. but only thing is that the joker is supposed to be counted as a number to make a straight.
Oh. Let me think.
so like K, Q, J, 9, 7?
it'll count as a straight?
if you see the example, there's a 10 missing. from K, Q, J, 9 you need a 10 so that joker would make it up to fill in the gap
hm...
Isn't that four fingers.
The reaso nwhy I thought about this is because I want to make the function from Pai gow where the joker can make itself into a straight
I have no clue how a Joker would turn into a Playing Card.
when would it transform anyways.
in the middle of play?
cause when I saw pai gow they use a joker like this.
i don't think that's possible afaik
oh i see..
I want it to do it a way where thej oker is stll there but not turned into a playing card
but rather make it count as a playing card.
This sounds like Four Fingers.. kind of..
Yeah four fingers, except it automatically fills in the gap if you have this joker.
and depending on how many of this joker you have the more gaps you can fill in.
It's nil
oh soo like Ace, King, Jack, 10 will count as a Straight? (because it fills in as a Queen?)
@tired kestrel
Yeah.
that one did it thx
Hm.. I'm not sure how to change the hand to a straight, but it'll maybe look something like:
which will insert 12 (queen) if you have something like 14, 13, (missing 12 here), 11, 10
local hand = context.full_hand
table.sort(hand, function(a, b) return a > b end)
for i = 1, #hand - 1 do
local curr = hand[i]
local nextv = hand[i + 1]
-- if there's a gap bigger than 1, that's your missing card
if curr - nextv > 1 then
local missing = curr - 1
table.insert(hand, missing)
break -- dip out since we only wanna fill one gap
end
end
how would I check if the other card is a joker?
I'll give this a try, do I put this in the joker itself or lovely patch as I was attempting?
inside calculate; I don't know what a lovely patch is 🥀
yay, thanks!!
how do i do X for each joker with Y sticker?
Alright I did try that. and this happened.
code?
||```
SMODS.Joker {
key = "holyecasino",
loc_txt = {
name = 'Hoyle Balatro (GBC)',
text = {
[1] = "Pai gow"
}
},
unlocked = true,
blueprint_compat = true,
perishable_compat = false,
rarity = 2,
cost = 5,
pos = { x = 0, y = 0 },
atlas = 'j_placeholder',
display_size = { w = 71, h = 95 },
config = { extra = { t_chips = 0, }, },
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.t_chips, } }
end,
calculate = function(self, card, context)
if context.before and not context.blueprint and not context.repetition then
local hand = context.full_hand
table.sort(hand, function(a, b) return a > b end)
for i = 1, #hand - 1 do
local curr = hand[i]
local nextv = hand[i + 1]
-- if there's a gap bigger than 1, that's your missing card
if curr - nextv > 1 then
local missing = curr - 1
table.insert(hand, missing)
break -- dip out since we only wanna fill one gap
end
end
end
if context.joker_main then
return {
chips = card.ability.extra.t_chips
}
end
end
}
this
it's in-complete but yeah.
try this:
local ranks = {}
for _, card in ipairs(context.full_hand) do
table.insert(ranks, card:get_id())
end
-- now sort the rank list
table.sort(ranks, function(a, b) return a > b end)
-- detect a missing value in the straight
local missing = nil
for i = 1, #ranks - 1 do
local curr = ranks[i]
local nextv = ranks[i + 1]
if curr - nextv > 1 then
missing = curr - 1
break
end
end
i forgot i hadd to check for the actual id (num)
;-
uhh... this happened.
oof
what's wrong here?
dunno I did this and it set the hand size to this.
I have no clue man, sorry.
how can I prevent custom jokers to appear in the shop twice without showman?
Are you spawning them with DebugPlus?
that's default behavior tho
hm.
in the meantime cna you also do the id thing?
?
i did there with the :get_id()?
is there a quick way to reference a specific tarot chosen randomly?
hey guys
how do you define audio again
also nxkoo i buffed your joker
thanks walp
it can now retrigger wild cards
(under specific conditions)
smods.sound
thanks
make it stronger
gimme art
also it still can turn played cards into wild cards
you draw it
i cant
i dont know what nxkoo is
like
am i supposed to make it kris the joker?
just to be sure, if my Joker is Blueprint-incompatible, do i need to wrap if not context.blueprint then ... end around its calculate function?
as of now yes
pretty sure thats going to be automatic next release
I have no idea what you're talking about
you're talking about the doggy pajama kris? or the dog act?
also the key wont alternate for this
the dog act
editions on planet cards
That's another mod by Jen called Aurinko, the new version is Engulf, and i didn't make it
oh right thats ruby
this one
yep
mmmmmmmmmmmmmmmmmmmmmm
best i can do is just copy and paste the image onto a joker card
thats okay
how does planet card even work anyways
cause theres no use function here
@foggy ginkgo help me
if there's no use function it just uses the default card:use_consumeable
So you gotta look at that one
where even is that
Shrug
is there any mods wwith custom planet that i can look
Cryptid :3
Pew
joyousspring
im still trying to figure out why mods do this
which part
almost every mods i saw, they always make their items local
like they dont even have SMODS.blabla
some of them do it to control the loading order
oooohhh
there's probably an SMODS[obj.object_type] somewhere
send link
N the goat
AIJ only does mult and chips independently
Mayhem has a few (62)
ill look into that too
cryrpid and pekreo
RELEASE MEEEEE
also since you're here
how can i replicate the glitching screen effect
The repository is however outdated and i doubt you want to download 80MB of mod just to look at some code so here it is on its own
You'll need to send your own variables to the CRT Shader
Mayhem patches like this
# Glitchiness during Transcendence
[[patches]]
[patches.pattern]
target = "game.lua"
pattern = "G.SHADERS['CRT']:send('glitch_intensity', 0)--0.1*G.SETTINGS.GRAPHICS.crt/100 + (G.screenwipe_amt) + 1)"
position = "at"
payload = '''
G.SHADERS['CRT']:send('glitch_intensity', transcendence_glitch or 0)
G.SHADERS['CRT']:send('noise_fac', transcendence_noise or 0)
G.SHADERS['CRT']:send('bloom_fac', transcendence_bloom or 0)
G.SHADERS['CRT']:send('crt_intensity', transcendence_crt or 0)
'''
match_indent = true
# Cryptid compatibility
[[patches]]
[patches.pattern]
target = "game.lua"
pattern = "G.SHADERS['CRT']:send('glitch_intensity', glitched_intensity or 0)"
position = "at"
payload = '''
G.SHADERS['CRT']:send('glitch_intensity', glitched_intensity or 0)
G.SHADERS['CRT']:send('noise_fac', transcendence_noise or 0)
G.SHADERS['CRT']:send('bloom_fac', transcendence_bloom or 0)
G.SHADERS['CRT']:send('crt_intensity', transcendence_crt or 0)
'''
match_indent = true
how would i call this, i want the effect to happen if something else happened
Just set the transcendence variables to a number bigger than 0 for a while and then set them back to the defaults
transcendence_noise = 0.001*(G.SETTINGS.GRAPHICS.crt*0.3)/100
transcendence_crt = 0.16*(G.SETTINGS.GRAPHICS.crt*0.3)/100
transcendence_bloom = G.SETTINGS.GRAPHICS.bloom - 1
Man nice indentation
bump since I still haven't figured out.
@lament agate i think i overdid something
okay, say, if i use this tarot card, i want this effect to happen, how would i write it
thats perfect
i just need to put "joker" somewhere
How long do you want it to be glitchy for
Probably not gonna work but add 2 events, the first sets the variables to the desired values and the second has trigger = 'after' and a huge delay
Delay could potentially be multiplied by game speed so its normalised
thank you walp
now to add it to the sprite sheet
i put you next to astro :3
(ps astro gave me the astro art)
yk what its too perfect im adding a stray pixel like toby intended
nvm
You mean shortcut but the effect is stackable?
cute
gonna force yall to fuse later
oh dear
hpot_unbreedable
cg shut up
😨
what
I am
...
hi!
im confused
same, i have no idea whats going on and im in the middle of it all
i was just making a joke about forcing fusions and then boom
oh you don't know the horrors
thats fine
well hypothetically
if i said yes
what would you want me to do (no art i am geniunely ass)
@lucid owl i remember your mod has a soul card in it
how do you draw the custom soul sprite
@solid salmon
yes
like i get you want minecraft stuff but like
what?
give me an idea and i could PROBABLY program it
nah, i can try do code
... im so confused
I need ideas only
if you have none, thats ok
"really ideas are the things i want"
"but if you have none, thats fine"
well tell me what already exists so no repeats
yeah ok
second
maybe fusion compat for golden foods or something
third, allay: at the end of the shop creates a minecraft consumable or food joker
custom function in soul_pos
check the code of soully
it's not documented
basically you can define a draw function in soul_pos
i just mostly copied over soul code from vanilla and removed unneeded parts, then tweaked values at random until it looked a little different
actually
actually
i kinda wanna help out
i see
finally figured out.
where did you save soully
yeah ok https://discord.com/channels/1116389027176787968/1441161762232729610
you are being enlisted
Yeah, kinda like that except right now I think I managed to get it working via "hooking" somehow
the google sheets can be commented on by anyone
content/consumables/
No, you patch get_straight
i think the new steamodded update broke something, im very certain its SMODS.scoring_calculation and SMODS.scoring_parameter 🥀
cus it was working a bit earlier
prob, but it mentions it changed something with SMODS.scoring_parameter
it was working in 1.0.0~BETA-0827c but not in the latest one
how do i get a jokers' sticker
creeper, aw man.
also, what's this? this looks nice.
wait are you making a Minecraft mod? :0
local stickers = {}
for k, v in pairs(SMODS.Stickers) do
if card.ability[v.key] then
table.insert(stickers, v.key)
end
end
what about checking a specific joker?
Yes, card is the card.
oh
no wait i meant sticker
how to check for a specfic sticker
if card.ability.modprefix_key
how can i make an enhancement works as a consumable?
What's your goal?
You want it to be "use-able"?
i want a card that would have the use button like consumables
on it's own it doesn't do anything
like ccd cards
I've never seen that been implemented before, I don't know.
doingthe opposite got me kinda close, but it didn't get shown in the deck proper
I'm fairly certain this is caused by not using the UI element generated by SMODS.GUI.operator(scale); had a very similar crash to this one and it destroyed me mentally for a few days
I'm checking the code in my mod, it does have SMODS.GUI.operator(scale) so I don't really get why its not working as intended
But it could be outdated and I'd need to tinker with it
It could also be caused by trying to set the scoring calculation before the run is actually loaded; another fix I tried was hooking Game:start_run and setting the calculation after the original function is run
I got no clue then
Yea I just tried to get rid of operator ui, same deal 😔
I wanna see if I can fix this crash with an smods PR (since yours seems nonetheless similar to the crash I had before); is it okay if you send me a link tk your mod's repo?
I could send the main.lua file if that's ok
Are you modding on like one file or smth
I'm coding the parameter on main.lua, the rest are separate files
Alright, ill read through it after I get back from work, thank you
Card:remove()
that didnt work
Code?
No, SMODS.change_voucher_limit
No, for adding a voucher to the shop.
ok i added it to the adding a voucher to the shop
how can i make a card immune to changes (enhancements, seal etc)?
Hook Card:set_ability, Card:set_seal, Card:set_edition, Card:add_sticker and Card:set_base
now, how do i id that card if it's a consumable?
Can you post the full crash log and explain when it crashes?
'card.config.center.key'?
You mean a consumable that makes a card immune to changes?
You would still hook those functions.
it kinda works... but still I just wanted it to like detect an already number that doesn't get spaced in. though I have an idea about it.
how do i detect if a boss blind is a showdown blind
yeah, but how do i id it so i can tell the function to not change it?
?
G.GAME.blind.config.blind.boss and G.GAME.blind.config.blind.boss.showdown
The crash occurs upon starting a new run, getting rid of the SMODS.scoring_parameter and SMODS.scoring_calculation related sections seem to let the game run
You would set a flag on the card.
uhuh
You’re probablysetting the calc in the wrong timing, this is before the hud has been created
@daring fern how am i supposed to make it remove vouchers
it could be the case but unless the ordering was changed in the latest smods release, im not sure how effective that would be
You want the scoring calc all of the time when your mod is installed?
i guess so
Then hook Game:start_run iirc
also the thing was working in 1.0.0~BETA-0827c, the code executed the calculation fine
yea i have it hooked
You don’t in the code you sent
did i not?
No you have it in a reset game global function
oh
That’ll be called part way through start run, I’m away from my dumps right now but I imagine that’s before the HUD is created
so how would i switch this to after the HUD is created, since my knowledge over hooking sucks
This
Change voucher limit -1
that doesnt work
Oh right it doesn’t remove it
has anyone got an idea on how to like get it to work where if you pick a different card it would mess up.
Also make the other card would be played too?
then how do i remove it eremel?
Just remove the last card in the area
Just for clarification, would I have to override Game:start_run to apply this change or can I somehow call it and change it there
...
Do not override it at all
Alright
In LUA, it is a very important concept to understand that everything is a variable and all variables may be edited in runtime. This includes functions. With modding other peoples' LUA files, like Klei's basegame code, you may find yourself wanting to run your code before or after the original fun...
eh. Y'know what I think I'll keep ti like that but still want to like for the 3rd card to be scored
welp i tried 😭
is there a way to increase booster slots?
SMODS.change_booster_limit(mod) i believe
Remove the second vars in the first vars in loc_vars
why isn't the joker giving chips with a custom message?
oke
Code?
also all consumables seem to be broken 😭 😭 idk what the fuck jokerforge is doing but ill have to figure this out
?
SMODS.Joker {
key = "holyecasino",
loc_txt = {
name = 'Hoyle Balatro (GBC)',
text = {
[1] = "Hoyle Balatro Strategy",
[2] = " ",
[3] = "Five-card the {C:attention}straight{} and insert ",
[4] = "{C:attention}Joker{} to the five-card missing gap.",
[5] = "Scores {C:chips}12{} chips in a {C:attention}straight{}. ",
[6] = " ",
[7] = "Reason: This sets up {C:attention}straight{} into ",
[8] = "{C:attention}striaght flush{} and fills in a ",
[9] = "missing gap for a {C:attention}striaght{}. ",
[10] = " ",
[11] = " ",
[12] = " "
}
},
unlocked = true,
blueprint_compat = true,
perishable_compat = false,
rarity = 2,
cost = 5,
pos = { x = 0, y = 0 },
atlas = 'j_hoylebalatro',
display_size = { w = 21 * 3.1, h = 30 * 3.1 },
config = { extra = { t_chips = 12 } },
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.t_chips } }
end,
calculate = function(self, card, context)
if context.modify_scoring_hand and not context.blueprint then
--[[return {
add_to_hand = true
}]]--
end
if context.before and not context.blueprint and not context.repetition then
-- temporary
end
if context.joker_main then
if next(context.poker_hands['Straight']) or next(context.poker_hands['Straight Flush']) then
return {
message = 'WIN',
colour = G.C.CHIPS,
chips = card.ability.extra.t_chips
}
else
return {
message = 'PUSH',
colour = G.C.FILTER
}
end
end
end
}
No, only the second vars
GUYS
me shez wont update the variables
like this
(this works for d20 for some reason)
?
chip_message = {message = 'WIN', colour = G.C.CHIPS, sound = 'chips1'}
you gotta quote the key
also
numerator and denominator is a part of the vars
No, the second vars not the first vars
Also you should be using card instead of self in SMODS.get_probability_vars
alright
?
return {vars = {numerator, denominator, card.ability.extra.multvar}}
bump
I tried that but didn't trigger when I replace in return somehow
it didn't even update the chips
if context.joker_main then
if next(context.poker_hands['Straight']) or next(context.poker_hands['Straight Flush']) then
return {
chip_message = {message = 'WIN', colour = G.C.CHIPS, sound = 'chips1'}
}
else
return {
message = 'PUSH',
colour = G.C.FILTER
}
end
end
this
hopefully I didn't do this wrong but yeah.
No, you need to keep the chips
alright, I ended up trying with the chips and... still didn't work even though I did add back in the ships.
ITS SO DAMN SLOW
I set it slow just to see if it actually works, but turns out it didn't?
THAT MAKES -100CHIPS
it's supposed to be 12 chips not -100 and apperently it didn't takeaway chips?
I'm confused.
im so lost 😭
voided
didnt realise attempting to reset a scoring parameter caused the whole game to self destruct
🥀
im going to blow up my mod
same
engine/ui.lua:693: attempt to index field 'colour' (a nil value) <- This error can just go suck me dry. There's no indication whatsoever if I'm on the right node depth. Hope that helps someone not waste 2 hours of their life.
glop background
just tried it and it still doesnt work
I've got this DrawStep for one of my Jokers, but it ends up lagging the game out over the course of a run, I'm assuming it's because it just keeps drawing over and over, but how do I fix it?
SMODS.DrawStep {
key = 'willatro_heart',
order = 50,
func = function(card)
if card.config.center.key == "j_willatro_heart" and (card.config.center.discovered or card.bypass_discovery_center) then
local scale_mod = 0.05 + 0.05 * math.sin(1.8 * G.TIMERS.REAL) +
0.07 * math.sin((G.TIMERS.REAL - math.floor(G.TIMERS.REAL)) * math.pi * 14) *
(1 - (G.TIMERS.REAL - math.floor(G.TIMERS.REAL))) ^ 3
local rotate_mod = 0.1 * math.sin(1.219 * G.TIMERS.REAL) +
0.07 * math.sin((G.TIMERS.REAL) * math.pi * 5) * (1 - (G.TIMERS.REAL - math.floor(G.TIMERS.REAL))) ^ 2
local image = Sprite(0, 0, 71, 95, G.ASSET_ATLAS["willatro_WillatroOrgans"], {x = 1, y = 0})
image.role.draw_major = card
image:draw_shader('dissolve', 0, nil, nil, card.children.center, scale_mod, rotate_mod, nil,
0.1 + 0.03 * math.sin(1.8 * G.TIMERS.REAL), nil, 0.6)
image:draw_shader('dissolve', nil, nil, nil, card.children.center, scale_mod, rotate_mod)
end
end,
conditions = { vortex = false, facing = 'front' },
}
i have absolutely no idea how i hook Game.start_run properly, since either it crashes or the game just becomes black upon starting a run, tried returning args, not returning args etc etc. im so lost 😭
code?
should be something like this
(also SMODS.current_mod.reset_game_globals can do the same things usually)
i was doing something like this because i was told overriding was not a good idea: ```lua
Game.start_run = function(self, args)
SMODS.set_scoring_calculation("GG_powerCalc")
end
this is overriding
yea it was working before i updated SMODS
you need to run the original function
end``` this is fine, right?
instead of local image use something like G.willatro_image
and only make it if it doesnt exist
G.consumeables.cards
notice the consumEables
i just noticed that oh my g o d
how do get the unscoring cards?
loc_vars = function(self, info_queue, card)
local fish_tally = 0
for _, consumeable in ipairs(G.consumeables.cards) do
if next(SMODS.find_card("c_jabong_bass")) or
next(SMODS.find_card("c_jabong_trout")) or
next(SMODS.find_card("c_jabong_tuna")) then
fish_tally = fish_tally + 1
end
end
return { vars = { card.ability.extra.dollars, card.ability.extra.dollars * fish_tally } }
end,
calc_dollar_bonus = function(self, card)
local fish_tally = 0
for _, consumeable in ipairs(G.consumeables.cards) do
if next(SMODS.find_card("c_jabong_bass")) or
next(SMODS.find_card("c_jabong_trout")) or
next(SMODS.find_card("c_jabong_tuna")) then
fish_tally = fish_tally + 1
end
end
return fish_tally > 0 and card.ability.extra.dollars * fish_tally or nil
end``` ok i fucked some shit up BAD
how do you getthe unscoring cards
-- do code
end```
in the before step i mean
oh
well i guess itd be context.before instead of individual
ive never done that before
local unscoring_cards = {}
for k, v in pairs(context.full_hand) do
if not SMODS.in_scoring(v, context.scoring_hand) then
table.insert(unscoring_cards, v)
end
end
how do you destroy a card outside of context.destroy_card safetly
is it possible to have a specific consumable set appear in a store once you've successfuly redeemed one?
idk how to explain it
Trying to access G.consumeables when it doesn't exist (namely outside a run)
i have a consumable (daat) that has a specific requirement. i want it so that after i redeem daat, i want the rest of the divine cards (e.g. soul of hatchet) to be spawnable in a store
oh so its like the G.jokers thing
but i also want it to be a permanent unlock, much like how you can always get blueprint if you win a run
tldr how do you give consumables an unlolck requirement like some jokers
for consumables its The Exact Same As A Joker if you want unlock requirements
your case sounds like this isnt the best way to do it though
I'd patch into create_card_for_shop and add a chance to spawn divine cards if a specific profile setting is true
and set the profile setting when you redeem daat
G.PROFILES[G.SETTINGS.profile] is a table you can store things to
saved on reloads
its tied to the profile so if you reset profile itll reset too
i wouldnt, just modify the consumable rate
when would you modify it though
at the start of the run
oh right
or when the unlock is met
ok so i learned what a career stat is
im guessing i have to create a "career stat" that activates once i use daat
thats true, but how can i make a specific one just for daat usage
so you can check for that
that exists already
Every consumable has its own career stat
would it be smth like return G.PROFILES[G.SETTINGS.profile].career_stats.c_hatch_daat > to_big(1)
wots a lovely dump
in your mods folder
lovely folder
dump folder
That's Balatro's source code after it's patched
oke, checking rn
Might also be in SMODS folders
hmm
wouldnt it be easier to create a flag that triggers when daat is used
and then have that flag trigger the unlock condition?
the tables are number indexed, so it would look like this more
for _, v in ipairs(G.PROFILES[G.SETTINGS.profile].career_stats.consumeable_usage) do
if v.key == "c_hatch_daat" then
return v.amount >= 1 --i forgor what the actual usage count is called just eval the consumable usage with debugplus
end
end
hmm
Also talisman doesn't bignumify stats afaik
so if i use daat once, soulofhatchet should unlock?
i think so
check_for_unlock probably isnt the best way to do it
this would run very often so it should basically unlock whenever
you want every divine card to appear in the shop after daat right
give daat an in_pool and modify consumable rate for divines when starting a run or using daat
hey is there a default context for when playing cards are purchased? the closest thing i found is hologram's playing_card_added but i'm looking for a context that applies to jokers and consumables as well
context.buying_card?
thanks
maybe ill just make it smth you get by default
when did you run the code
i reset my balatro profile and got this error
check_for_unlock?
oh reset profile
yeah probably modify consumable rate with a hook on run start
(and when daat is used)
idk how to do any of that
local tally = 0
for _, consumeable in ipairs(G.consumeables.cards) do
tally = tally + 1
end
if tally >=1 then
for _, consumeable in ipairs(G.consumeables.cards) do
end
end
end,
can_use = function(self, card)
return (G.consumeables and #G.consumeables.cards < G.consumeables.config.card_limit) or
(card.area == G.consumeables)
end``` how would I destroy every consumable in the are like this
what do you mean destroy every consumable in the are
what does that mean
SMODS.destroy_cards(G.consumeables.cards)
minor spelling mistake
right
what happened to somethingcom
are they going to start reacting with ❗
so I dont need the second for do loop then?
you dont need any loop just run the destroy_cards once
ok
why is the single excalamation mark just called exclamation but the double is called bangbang
for ⁉️ of course
this obviously means blunder should actually be called interrointerro
ok now how would I create a random tag per the destroyed consumeable (which is the tocreate car)
local tally = 0
for _, consumeable in ipairs(G.consumeables.cards) do
tally = tally + 1
end
local tocreate = tally
if tally >=1 then
SMODS.destroy_cards(G.consumeables.cards)
for i = 1, tocreate do
end
end
end,```
You don't need two loops
first of all you should just do tocreate = #G.consumeables.cards
Instead of incrementing a tally just. Create the tags as they're looped through
and then destroy after
and secondly do https://github.com/nh6574/VanillaRemade/wiki#tags
or destroy as you go through
'modprefix_seed can just be whatever, right
yes
ok so ive given divine cards a shoprate, all i need to do is figure out how to not let daat itself count for that
im guessing i have to do the soulable whatsit right
in daat.lua?
i mean it shouldnt spawn regardless if it has hidden set to true
yes but it should have your mod prefix so it doesnt collide
this is so confusing 😭
damn the comment says voucher
Finally figured that shit out, apparently I had to run the function first to set G.HUD, relief
almost ready for release, just two isseus
- sephirot packs still say "ERROR" when you get them, and idk how to fix that
- divine hatchet doesnt create a hatchet when it "devolves"
wait nvm it does
ok so error 2 is fixed
error 1 however idk what to do
how do i make it not say "ERROR" :sovb
Well if it helps, Using loc_txt and the group_name string, you can fix it, as long as it doesnt conflict with a different version of the same parameter (at least thats what i did)
Like this:
name = "Mega Balaal Pack",
description = {
"Choose #2# of up to #1# {C:attetnion}Balaal{} jokers."
},
group_name = "Balaal Pack"
},```
ill give that a shot
my descriptions dont show up though so take this with a grain of aslt
attetnion
attetnion
i keep FUCKING DOING THAT AAAAAAA
remove group_key from the pack, i know JF adds that automatically and that overrides and breaks loc_txt for the pack
or use a proper localization file
soon
one called "en_us.lua" right
inside a localization folder
also inside localization foler
loc_vars = function(self, info_queue, card)
info_queue[#info_queue + 1] = G.P_CENTERS[card.ability.mod_conv]
return { vars = { card.ability.max_highlighted, localize { type = 'name_text', set = 'Enhanced', key = card.ability.mod_conv } } }
end,``` If I wanna check if a card has a specific enhancement for this consumable to be used, i'd need the long code for this, im guessing
I just realied that Magic Deck doesn't actually directly use the Tarot color palette and that bugs the hell out of me
ough
I have some ideas that i need help implementing so i thought id ask here:
blind 1: removes all text (including tooltips) for the blind
blind 2: the screen doesn't visually react to what you do until you hit play (this is the best way i can describe it)
buying_card works but doesn't trigger upon opening booster packs. is there a context for that?
how do i add to the debt cap
context.open_booster
yeah but that triggers with booster skip tags as well
Decrease G.GAME.bankrupt_at
if context.open_booster and not context.card.from_tag
i need to alter money given from a joker, how do i do that 😇
(more specifically, making it so the amount given goes into a different value (decreasing G.GAME.bankrupt_at))
You mean you want jokers that give money to instead decrease G.GAME.bankrupt_at?
yes
if context.post_trigger and context.other_card.ability.set == 'Joker' and context.other_ret.jokers and (context.other_ret.jokers.dollars or context.other_ret.jokers.p_dollars or context.other_ret.jokers.h_dollars) then local value = (context.other_ret.jokers.dollars or context.other_ret.jokers.p_dollars or context.other_ret.jokers.h_dollars) context.other_ret.jokers.dollars, context.other_ret.jokers.p_dollars, context.other_ret.jokers.h_dollars = nil G.GAME.bankrupt_at = G.GAME.bankrupt_at - value end
no formatting...
uh this is for a edition and so i can't really see context (unless i find some way of accessing what card is applied to the edition)
No, editions have calculate
(unless i find some way of accessing what card is applied to the edition)
Yes, SMODS.Edition has calculate
what card is applied to the edition
i need to know what the card is
yes it's the card value in your calculate function
Code?
if context.post_trigger and context.other_card.ability.set == 'Joker' and context.other_ret.jokers and (context.other_ret.jokers.dollars or context.other_ret.jokers.p_dollars or context.other_ret.jokers.h_dollars) then
local value = (context.other_ret.jokers.dollars or context.other_ret.jokers.p_dollars or context.other_ret.jokers.h_dollars)
context.other_ret.jokers.dollars, context.other_ret.jokers.p_dollars, context.other_ret.jokers.h_dollars = nil
G.GAME.bankrupt_at = G.GAME.bankrupt_at - value
end
end```
It's self, card, context not just card in the inputs.
ew
the code doesn't seem to be working 😔
Try with jokers that give dollars directly and not at the end of the round.
engine/sprite.lua:109: Shader uniform 'warmsh' does not exist.
A common error is to define but not use the variable.```
help I hate shaders
extern PRECISION vec2 warm has to be called warmsh and used somewhere in the code
great
if you really don't want to use it, just add this in the effect code
if (warmsh .y > warmsh .y*2) {tex = vec4(0);}
the fs name is warm tho
are you sure its like that everywhere
ok so its still not doing anything
if context.post_trigger and context.other_card.ability.set == 'Joker' and context.other_ret.jokers and (context.other_ret.jokers.dollars or context.other_ret.jokers.p_dollars or context.other_ret.jokers.h_dollars) then
local value = (context.other_ret.jokers.dollars or context.other_ret.jokers.p_dollars or context.other_ret.jokers.h_dollars)
context.other_ret.jokers.dollars, context.other_ret.jokers.p_dollars, context.other_ret.jokers.h_dollars = nil
G.GAME.bankrupt_at = G.GAME.bankrupt_at - value
print(G.GAME.bankrupt_a)
card_eval_status_text(scored_card, 'extra', nil, nil, nil, {message = "Debt!", colour = G.C.RED, delay = 0.2})
end
end```
you need to turn the post trigger optional feature on
still not working 😔
ok so im doing an old mod and for some reason when i put odds on 1/3 and mult for X2 it swaps on the desc (its still 1/3 and x2 ingame and the pop up is also x2), im new with modding so sorry if this is a rookie mistake
Swap the #3# and the #2#
it worked, why does it happen if its written correctly? (or at least i think so)
and ty too
wdym written correctly?
the #_# is to get the variable
number inbetween is the index
how can i check a specific SOLD joker's rarity? card.config.center.rarity isn't working but my code is probably missing something
just card.config.center.rarity is the card that's currently calculating
context.card.config.center.rarity will get the rarity of the card being sold
aight thanks
No, it's context.card:is_rarity('Common')
where will i patch how money is displayed? (i.e making a money cap indicator)
it works tho
Yes, but you should be using Card:is_rarity
fair enough
still not working
post_trigger = true,
}```
You did not hook Game:start_run; [mod object].reset_game_globals is run before G.HUD is created, and setting the scoring calculation while G.HUD is non-existent causes the crash. You'll need to do the following to prevent crashes related to setting the scoring calculation at the very start of the run:
local game_startrun_ref = Game.start_run
function Game:start_run(args)
game_startrun_ref(self, args)
if not args.savetext then
SMODS.set_scoring_calculation("GG_powerCalc")
end
end
at least until an update for SMODS.set_scoring_calculation is made that first checks for G.HUD
can someone help me figure out why sets.lua is causing interference
its saying hatch-kether in empty pool or smth
is there a way to make the upgrade message show up for every iteration of the for loop instead of only upon returning?
local effects = {}
local cards = SMODS.shallow_copy(G.playing_cards)
for i=1, G.GAME.current_round.discards_left do
card.ability.extra.x_mult = card.ability.extra.x_mult + 0.25
local _card, index = pseudorandom_element(cards , 'random_destroy')
table.remove(cards, index)
SMODS.destroy_cards(_card)
table.insert(effects, {colour = G.C.RED, message = localize('k_upgrade_ex')}
end
return SMODS.merge_effects(effects)
Also use context.main_eval instead of not (context.individual or context.repetition)
just to double check this IS where the GUI is defined, right?
if card.ability.extra.two_count <= 2 then
if current_twos <= 2 then
if context.other_card:get_id() == 2 then
card:juice_up(1,0.5)
context.other_card.ability.perma_x_chips = context.other_card.ability.perma_x_chips or 0
context.other_card.ability.perma_x_chips = context.other_card.ability.perma_x_chips + card.ability.extra.xchips
end
current_twos = current_twos + 1
end
end
So I'm trying to make it to where if a hand is played with exactly two 2's then they will gain xchips on the card permanently however the code I used before that added permenant x_mult didn't transfer one to one and I'm confused on how what the code for making the cards have xchips is or if that is something possible within the default code.
Nevermind sorry I had my variables written wrong so they couldn't work correctly
(Works now)
question: i want to have my custom deck turn all cards that are given any enhancement immediately into wild cards. how could i go about doing this?
should i like hook into set_ability or is there a better way
Yes, you would hook Card:set_ability
okay
how do you check when an ante changes outside of calculate...
What is the goal?
create a tag after an increment in ante
what gives this effect exactly
it should be universal for any deck and run
put it in the mod's global calculate function then
i see
SMODS.current_mod.calculate = function(self, context)
-- do stuff here
end
put that in your main file or wherever you want to organize it
and yes it has to be specifically current_mod, that's not a placeholder
OH NO
yeah uh
you should check that its a playing card first :P
yeah lmao
what is the code for brown? like G.C.BROWN but like, that doesn't work so what might the correct one be?
if not initial and center.set == 'Enhanced'
yes i figured it out i just thought it would be funny to post my mishap
ugh now i have to figure out how to make this work for standard pack pickups
Code?
i'll ask for help if i can't figure it out once i give it a go
i'm just anxious about having to do it :p
(i'm pretty new to modding)
Is there an area we have all the G.C colours or am I foolish and you can make hexcode ids work somehow
brown isn't included by default, there is a way to add custom G.C colors but it's not particularly documented, there's also probably a way to just use a custom hex code depending on where you're trying to use it
for reference here's a list of all the default colors available
https://github.com/Steamodded/smods/wiki/Text-Styling#named-colours-dictionary-gargsloc_colours
you can also just use context.setting_ability instead of doing a hook
like this https://github.com/wingedcatgirl/MintysSillyMod/blob/next/stakes/stakes.lua#L211
ohcool
Thank you, also I'm not sure if I'm just not reading the stuff correctly but where could I find a place that shows how to make custom colours?
yea like i said it's not very documented
the first example i can think of is paperback, but i'm pretty sure that it actually does it in a fairly bad way (it uses a patch when it really doesn't need to)
ah gotcha
in most contexts HEX("123456") should work
if you specifically need an entry in G.C about it, you can do G.C.COLORNAME = HEX("123456")
ok here's what you can do to fully integrate a color
loc_colour()
G.C.BROWN = HEX("...") -- fill in the hex code you want here
G.ARGS.LOC_COLOURS["brown"] = G.C.BROWN
this additionally lets you use {C:brown}brown text here{} in localization files
Sorry twas not at my computer, thanks a ton
So, I'm trying to make certain consumable uncopiable like I know its weird but I need it to balance my mod, so yeah ! If you know my mod you'll understand what I am talking about. I did a hook but it doesnt seems to work with perkeo.
ok is there a context for when a playing card is added to the deck
i feel like there ought to be something simple because hologram
context.playing_card_added
huh
okay
i tried that and nothing happened earlier so ig im doing something wrong hmm
oh i see
local oldcopycard = copy_card
function copy_card(other, new_card, card_scale, playing_card, strip_edition)
local g = oldcopycard(other, new_card, card_scale, playing_card, strip_edition)
if other.config.center.giga_data and other.config.center.giga_data.uncopiable then SMODS.destroy_cards(g) end
return g
end
oh nice
but which card is destroy
ok huge im finally done with this stupid deck
yeah it work but is there a way to not show the card or if not to show a message like 'Not allowed'
G.GAME.round
g.states.visible = false?
oh yeah
'flat color seance isn't real, it can't hurt you'
flat color seance:
question: is there a way have it cards that have been played this ante retrigger
look for whatever the pillar uses and return { repetitions = 1 } in the appropriate context
if context.repetition and context.other_card.ability.played_this_ante then return {repetitions = 1} end
thanks
why doesn't this work?
info_queue[#info_queue + 1] = G.P_CENTERS.tag_negative
It's G.P_TAGS not G.P_CENTERS
ah
it worked but now it retriggers all played cards so how would i make it only do that when on big blind and boss blind
if G.GAME.blind:get_type() == 'Big' or G.GAME.blind.boss
shader question,
how would I make part of a shader be like transparent, kinda like burnt joker's holes but without the grey parts
some noise map or smth idk
ah thanks
still open to answers
wondering why this doesn't work
SMODS.Joker {
key = "nun",
blueprint_compat = false,
rarity = 2,
cost = 4,
pos = { x = 2, y = 1 },
atlas = "nun",
calculate = function(self, card, context)
if context.before then
if context.drawing_cards and #context.full_hand <= 3 and (G.GAME.current_round.hands_played ~= 0 or G.GAME.current_round.discards_used ~= 0) then
return {
cards_to_draw = 3
}
end
end
end
}
-# supposed to be like conditional serpent, if discarding/playing up to 3 cards always draw 3 cards
context.before and context.drawing_cards don't occur at the same time.
ah
lil problem
when i delete context.before it crashes
Yes, because context.full_hand doesn't exist in context.drawing_cards
where would context.full_hand fall under though
update: fixed™
Real quick, how would I localize the name of a booster pack within the context of a joker/description?
i.e. how would I make the localize function return Jumbo Arcana Pack if I put in arcana_jumbo_1 as the key
localize({type = 'name_text', key = 'p_modprefix_key', set = 'Other'})
ty!
would it be p_arcana_jumbo_1 or just arcana_jumbo_1
p_arcana_jumbo
ty :>
hm
localize({ type = 'name_text', key = 'p_arcana_jumbo_1', set = 'Other' })
``` it's like this, right?
ah wait, just removing the "_1" makes it work
thank you!
is there a site with everything in a regular jokers calculate functions context variable and what they do
i dont think thats everything considering context.mod_probability doesnt exist there
yeah wiki is out of date
https://github.com/Steamodded/smods/blob/main/lsp_def/utils.lua#L7 is prolly the best ur gonna get
why does chips didn't work?
so, i told it to not draw cards to hand. how would i go about having the buttons appear?
You can find most of them if you look between the wiki and the recent release notes, there will still be a few you’ll miss using those resources, mainly ones that replicate blind behaviours
can some1 guide me through making ui
i just want text on a black box ontop of a joker
question: any way to make it so that when you discard you get 2 extra cards drawn
Is it possible to make let's say a Seal or Enhancement not be shown in the collection but still exist and function in the game?
set a flag in context.pre_discard and check for it in context.drawing_cards and set the amount there (see the serpent in vanillaremade)
no_collection = true ?
Will try
@obsidian spear okie i'm able to help you out now, apologies in advance if i'm unable to solve all of your difficulties cus i'm not the best with ui either
how do i put it onto a joker
like how to place it somewhere specific
other than that im doing alright
I also do want to know how to add UIcorners
UIcorners?
border, radius
first this
Can I use SMODS.add_card to add card to deck?
yea
i have jokers with a counter
https://github.com/nh6574/JoyousSpring/blob/0a5c0f6951f7f3073acb7f06ee1fafed950eef16/src/card_ui.lua#L489
tyy n
i just put the function above that in the joker's update
ah i see
i only care to place it there once
since the player shouldnt be able to move anything while its there
that only places them once
wait so which stuff specifically
okay here's a simple ui i made for my mod, the most important things that control the position of the ui (in my case literally a blank box) are in the UIBOX's config table's offset and major values
you should be able to set major = <your joker here>, and when the function is called, it'll place the ui at the joker
ah alr
G.ROOM_ATTACH is basically the whole screen, and it's great if you want to set something to a (basically) arbitrary position not linked to other ui
mmhmm
so this is a table for scoring hand: context.scoring_hand[i]
the table for deck would be: context.deck[i]
right?
okay so.. how do i make it a higher layer
local cards = {}
cards[i] = SMODS.add_card { set = "Base", rank = 'Ace', enhancement = enhancement.key }
Does this add to deck or hand?
hand
Is there anywhere a context mentioned for it?
what
I have something devious in the works....
I don't understand the question
hii winter
Hi N'!!!!
What determines this piece of code to add cards to hand
I spent five hours today painstakingly color correcting all set-relevant cards in vanilla to use consistent palettes
it just does that by default
if you want the deck do area = G.deck
In the {} brackets?
yes
Hopefully by tomorrow or Monday I will have an API feature for programmatic palette customization for vanilla consumable types
a what now-
In computer programming, a flag can refer to one or more bits that are used to store a binary value or a Boolean variable for signaling special code conditions, such as file empty or full queue statuses.
Flags may be found as members of a defined data structure, such as a database record, and the meaning of the value contained in a flag will gen...
ah
still dont really get it but i'll try-
how would I update this down the line?
local my_menu = UIBox({
definition = createMajorMenu({
{ n = G.UIT.T, config = {align= "cm", text = string.sub(word, 0, #completed+1), colour = G.C.WHITE, scale = 0.75 } },
{ n = G.UIT.T, config = {align= "cm", text = string.sub(word, #completed+1, #word), colour = G.C.INACTIVE, scale = 0.75 } },
}),
config = {id = "btr_enMajText",type = "cm", major = c, bond = "Weak", instance_type = "POPUP"}
})
local my_menu_node = {n=G.UIT.O, config={object = my_menu, type = "cm"}}
or more how I was gonna do it, how do I destroy it
Is this function for checking the rank of the card only?
I want to make a hook for an enhancement
found it
there's no poll_tags
Who made VanillaRemade?
also if the joker just has the option between 2 tags you dont need to poll all of them
hi
How did you make stone cards not show up "Rank of Suits" in the textbox?
Or how do stone cards override that
What is i want 3 tags?
bercuase i think i might have a idea that uses 3 instead
can i have an example on what it would look like?
Would you guys know what context is used to retrigger a joker?
add_tag(Tag(pseudorandom_element({"tag_foil", "tag_holo", "tag_polychrome"}, "seed"))
should look like this
yup ok
but then with the tag keys different
also damn those were the 3 tags i was gonna use 😭