#💻・modding-dev
1 messages · Page 646 of 1
?????????????????
it
already says enhanced in all of the vanillaremade examples
fym
:3c
if not whitelist[user:lower()] then return end
if is_on_cooldown() then return end
if not text_to_show or text_to_show == "" then text_to_show = "Hello!" end
local screen_h = love.graphics.getHeight()
local target_h = screen_h
local scale_factor = target_h / 64
local holdtime = text_to_show:len() / 10
local wrappedText = wrapText(text_to_show, 30)
attention_text({
text = wrappedText,
scale = scale_factor,
hold = holdtime,
align = 'cm',
cover = true,
cover_colour = G.C.WHITE,
})
play_sound('voice1', 0.8, 0.5)
end```
getting closer
just the text won't render on screen
bump
i think you would need to look into how the current ones are made in game_object.lua and copy that then you probably need to patch the vanilla ones to be registered as that and the collection ui to show your new modification and hide enhancements if you need that
its probably too much work over just changing the name of enhancements
imo
I’d still like enhancements to exist tho, so idk
since mult/bonus/wild would stay enhancements
idk why youre planning but i think it would be weird if only 3 enhancements remain lol
esp if you dont play other mods
you think these should be each their own command
or is all them in one command more funny
have you looked at how G.FUNCS.use_card does it
i've been digging into it but it was a bit confusing
i just looked with fresh eyes today tho and it looks like it just physically moves the shop/cashout screen/blind select down
yea that's all working fine now
I’m moving all the enhancements that change the material of the card to a new modifier category called “material”, and then leaving enhancements as their own thing that go on top of the card
also I do have a mod that adds two new enhancements
they’re both pretty shit, but that’s an issue I’ll tackle later lol
i still have to do some work to keep G.hand (and presumably G.pack_cards) hidden, but i assume that'll be fairly simple
yeah you need to patch cardarea:draw iirc
let me check my mod
Yu-Gi-Oh! Mod for Balatro. Contribute to nh6574/JoyousSpring development by creating an account on GitHub.
smods state api would be cool
i feel like at some point two mods will conflict because they need to change states at the same time
true
i'd also like those cardareas to slide down offscreen smoothly if you toggle the state midround/in a pack, but i already had that handled in a past attempt so i should be able to do that fine
i mean this state is supposed to have a whole box about the same size as the shop (think hotpot plinko/training grounds, but the button is near where joyousspring puts the graveyard button), so i do need them offscreen
in any case i shouldn't need much help with that part, just need to account for G.TAROT_INTERRUPT as well as G.STATE in the cardarea:draw patch and do what i did before
does anyone know the context right after context.individual for scoring?
context.joker_main?
how do i save something to a savefile
and will it show up in a stat tracker
like i want to generate and save a few hidden keys upon creation of the save file, which will be pulled from later by some stuff
so each save file would have a specific consistent set of things, but two different save files will not have the same set of things
ts fun valyue
ok then what's the context of executing something when game is launched
or at least when profle is created
is there one??
if not i could pray and cheat by generating it on run start?
No, contexts don't trigger outside of runs.
but is there a way to do something outside of runs hookless
or do i just have to hook/patch
depends on what you want to do but usually yes
i want to generate a secret key/seed and store it in the save file
for save file specific functionalities
do you need to do it at the very beginning
preferably but techically not necessarily
lua is very loose, you don't need to initialize stuff most of the time, you can just do it the first time you use it
what type of values can you save in G.PROFILES[G.SETTINGS.profile] ?
like can you save a string? a list? a dictionary?
Anything except functions, Objects, and tables with metatables.
i want to do something silly but for this i would need to know how do i force start a blind
(like no matter what you are doing at the time, doing that one specific thing forces a blind, even if you're in shop)
look at the entire section
https://github.com/Balatro-Potato-Patch/Hot-Potato/blob/3386257cdcbe34a0c8acbb4f210d124534fc9ac5/Pissdrawer/event_overhaul.lua#L223
Mod Developer Chaos. Contribute to Balatro-Potato-Patch/Hot-Potato development by creating an account on GitHub.
if you want it to happen at any time then you would need to have some kind of state management as well
what
this
i already said everything i have i dont know why the trigger would change that
you need to save the state and then resume it after the blind
starting the blind can be done with the code above
uh
is there a way to change textures of a joker dependant on a variable?
yes this is part of the state stuff, sadly many things need to be managed manually
on paper i could also nab the ui stuff
you can use update and change the sprite using card.children.center:set_sprite_pos{ x = num, y = num}
ty!
is there anything like context.modify_scoring_hand, but instead of scoring all played cards, it scores cards held in hand?
yo chat this doesnt work for some reason lmao, can yall help?
if context.repetition and context.cardarea == G.play then
local count = 0
for k, v in pairs(context.full_hand) do
if v:get_id() == 2 then count = count+1 end
end
if count == 2 then
return {repetitions = card.ability.extra.repetitions}
end
end
oh fairs lol
yeah that makes much more sense idk why i thought of doing it like that
oh wait nvm i fixed it anyways
i just needed to move an end
idk why there was one extra
how do you use update() and set_sprites() :sopb:
cuz apparently card.ability.extra vars dont reach there
can you send what you have now?
i just tacked this on after the existing bit
set_sprites = function(self, card, front)
card.children.center:set_sprite_pos({x = card.ability.extra.spriteX[card.ability.extra.anchorSuit .. card.ability.extra.followSuit], y = card.ability.extra.spriteY[card.ability.extra.anchorSuit .. card.ability.extra.followSuit]})
end
any idea how i could do that?
idk much about hooking
set_sprites triggers before card.ability is set.
is this for the save file specific stuff?
no different thing
im trying to fix the sprite resetting to default when reloading run
https://github.com/MarioFan597/Ascensio/blob/c599ccf0392295df1e7d2acf7b4adb521444e36d/items/jokers/vanilla/gluttonous.lua#L65-L75 have a look at this one and just edit the condition for this case
https://github.com/nh6574/VanillaRemade/wiki#whats-a-hook check vanillaremade hook explanation for general use
thank you
i use an event
wait wrong screenshot
Is there a way to make a specific modded joker show up in the first shop for testing purposes?
do you need to buy it specifically
No
then just use debugplus to obtain it
Ok, thank you :)
would it fix it though
dunno why this bug is happening- help is appreciated lol
did you get the joker through debug
nope
actually maybe lol
i cant remember
probably tbh
if you did it's normal that duplicates appear
alr wicked ty
Is there a way to limit what ranks a modded suit can use?
(More specifically preventing a suit from using the normal A-2 ranks)
yes, in in_pool you can check args and args.rank which contains the key for the rank about to get generated for your suit
btw how do you get spectral cards to behave like the soul/black hole
where they are rarer and can only be found in packs
documentation is cool https://github.com/Steamodded/smods/wiki/SMODS.Consumable
i dont think love2d has that ability from what im reading
and i think it would be hard to do with music since its not loaded all at once into memory but i dont know much about that stuff so maybe
export reversed oggs of all the music and override the vanilla music with it 
any idea how to utilize modify_value(card.ability, k, true)? do I modify the "k" here or
Are you referring to this?: #💻・modding-dev message
wait nvm i think i got it
think i mightve found the script to use actaully but
okay im getting closer but given the error somethings still off, definitely gotta figure it
im just trying to make modifications work first
wait i think i see
No, you're supposed to use the modify_joker_values function.
oh i see
found a good example used actually
okay i think im getting the hang of it, but im definitely not getting the right way to use it. this is probably wrong and i apologize but like this doesnt work, what would be the proper method to modify the leftmost jokers values
Change card in the function to G.jokers.cards[1]
You need to have the perform_operations function.
What line is line 246 of ModdedVanilla.lua?
Did you save the file?
should have
ill do it again just to be safe
okay it works but i forgot to make it stop 😭
not to worry i think i found a solution
why does the message doesnt care about about the things in func
if mes is a local variable, then it only exists within the function
and/or maybe the message handler code is run before func is run
you need to figure out the message before the return table
ok it works properly
its like that
yea why are you doing all that in the return table's function
I need to take it out of the return ?
i think so
what's the goal here? you shouldn't ever be using the function in a return unless there's a specific reason for doing so
yeah ik its some old code for a thing that I need to nerf
No, you should almost always be using the func in a return unless you're using other values in the return.
returning a custom function is literally labeled as an advanced technique in the smods documentation
it should not be treated as the default
unless you have a specific reason to run some custom code timed properly with the animation of the relevant card triggering, you should just not have that code in the return table at all
X20 Mult, no suit or rank, Self-destructs
also the only way to obtain is via either an anomaly card (Anomaly 20), or a card that gives random enhancements and getting a good roll
thoughts?
anomaly card are rarer than spectrals btw
why does this still crash i thought you couldf do this so if the front vars doesnt exist/invalid it picks the back values
a one-time boost like that tends to be pretty weak no matter how powerful the boost itself is, especially with how hard it seems like it'll be to access paradox cards
the card destruction aspect is probably more valuable than the score boost, and at that point hanged man is just better
Put it in an event.
what if i said that the anomaly makes 4 at a time
better than hanged man then, but still pretty weak if this is supposed to be better than spectrals
could make it decrease by 1 every time it's scored, and then self destruct once it reaches x1
that's a lot more interesting to me actually
because now you have to balance when you think you'll need it
i just realized that there's no basegame card that applies random enhancements lol
i've been playing too much paperback
grim/familiar/incantation create cards with random enhancements
although actually they should exclude your paradox card because they're rankless lmao
yeah that's what i figured since that's what happens with paperback's wrapped card
now i get this crash
i know the local tables are unusded im trying to get it to work for now
ok here's my rework
Paradox Card
X20 Mult, no suit or rank
Decreases by a factor of 2 when scored (20 -> 10 -> 5 -> 2.5 -> 1.25 -> 0.625 Destroyed)
glass on steroids
ten times better, and no chance of it breaking
i agree, for most people func should only be relevant to clear the dollar buffer after they return dollars
why does I alway get a grey line on the right I didn't draw that
make the outline one pixel thinner
cause the size is litteraly 69x93. the size expected for a card
oh lmao
So I fixed it idk
but idk why my consumable type doesnt show right. Its writting ERROR
they said it couldnt be done
but my chatgpt mods are making progress
soon my game will be able to handle 100,000 jokers on a mediocre pc
It should be k_giga_food and b_giga_food_cards
i'm trying to track the repeated ranks in a played hand but i don't know what i'm doing 🥲
does anyone know how to draw two souls over one card?
is that from another server..? or a chat i can't go into?
Yes, Cryptid does it.
yes, i was asking the same question
cryptid code confuses me
i wish there was a simple explanation
JF code is atleast up-to-date
compared to old cryptid code
that shit ages
Anyway, someone wanna dev my mod? I'm a good artist but i'm sorely lacking in the code department and if i do it i'll be here forever
lmao
you can showcase what your mod's going to be in #1209506514763522108
maybe some devs will be interested in picking it up
Very tempting because the art is so fucking good, but you really should just make a thread in modding.
With the art I'm sure it will be picked up rather quick
Thank you, i'll have to put a post forward.
i'm looking to build a playtesting pack of 3 pages at the moment and i've got a good amount of content to showcase. i wanted to do it all myself but if i ever want it to come out..
how would i change played cards ranks
does changing the rank in context.before not do the trick? (via SMODS.modify_rank probably unless there's a way I don't know)
modify_rank a thing?
here's my code
SMODS.change_base(card, nil, 'modprefix_key')
calculate = function(self, card, context)
if context.before and context.cardarea == G.play and context.scoring_hand then
local has_two = false
for _, c in ipairs(context.scoring_hand.cards) do
if c:get_id() == 2 then
has_two = true
break
end
end
if has_two then
for _, c in ipairs(context.scoring_hand.cards) do
c.base.id = 2
c.base.value = '2'
end
end
end
end
ye SMODS.modify_rank is a thing, I think strength in vanilla remade uses it?
i see
how would i use this if i want to change all played cards ranks to 2 if played hand has atleast one 2
if context.before then
local passed = false
for k, v in pairs(context.full_hand) do
if v:get_id() == 2 then passed = true end
end
if passed then
for k, v in pairs(context.full_hand) do
SMODS.change_base(v, nil, '2')
end
end
end
thanks
Was there some kind of parameter for create_UIBox_generic_options to remove cancel button?
V:1 and pass in colours table to loc vars
or C:whatever yeah
its balatro black
thanks
rhombicosadodecahedron does this
do u need pure black ig
ok,
lol
is there a way to make cards trigger their end of round effects during a jokers calculation without it actually being the end of the round
i'm stupid
idk how to random this lmao (familiar/incantation/grim)
SMODS.calculate_end_of_round_effects({cardarea = G.hand, end_of_round = true, beat_boss = G.GAME.blind.boss})
calculate = function(self, card, context)
if not context.after then return end
if context.scoring_hand == 'Full House' then
for _, c in ipairs(G.consumeables.cards) do
if c.config and c.config.key == 'c_tngt_drhouse' then
c.ability.extra.charges = c.ability.extra.charges + 1
end
end
end
if context.end_of_round then
for _, c in ipairs(G.consumeables.cards) do
if c.config and c.config.key == 'c_tngt_drhouse' then
c.ability.extra.charges = 0
end
end
end
end,
why isnt this working
if context.before and context.scoring_name == 'Full House' then
for k, v in pairs(G.consumeables.cards) do
if v.config.center.key == 'c_tngt_drhouse' then
c.ability.extra.charges = c.ability.extra.charges + 1
end
end
end
if context.end_of_round and context.main_eval then
for k, v in pairs(G.consumeables.cards) do
if v.config.center.key == 'c_tngt_drhouse' then
c.ability.extra.charges = 0
end
end
end
thanks alot
hey nxkoo, "alot" is not a word. you're probably thinking of "a lot" or "swear"
bitch
can i set a specific crash messages
for a certain version of a mod
of course you can
ehtan...
just check the version via smods and then crash the game with a custom message
yeah how do i exactly check the ver
😭
so like
other.version > (>=1.0.0~ALPHA-1225a)
?
V()
iirc
no wait you can just use the SMODS.compare_version helper
SMODS.compare_version("modName", "version")
any documentations on that?
kill yourse
:P
yeah this should work but I think you just need to wrap the other version in a V()
V(other.version) > (>=1.0.0~ALPHA-1225a)
like that?
is there a way for the joker to run something when it appears in the shop, like some sort of context
No
damn
only the shop or the first time it appears anywhere?
anywhere
set_ability
is there a way to override the text that displays how many discards you have
I want to change that display number without actually changing how many discards you have
wicked ty N!
patch (or find the node and change) this
Oh true I don’t know why I said no lol
it does ref_table[ref_value]
so I can just change G.GAME.current_round.discards_left and it will do the text
although
yes but that will also change discards lol
im trying to create an effect that gives infinite discards and it would be cool if it said inf
i just dont want you to get like, infinite delayed gratfication from having it
cause that would be stupid
i think if you make it math.huge it will say inf if you dont have talisman
ah
i have amulet and would rather not rely on having or not having a mod to make it display properly
esp talisman of all things
anyway for what you want you would need to change the value of the node, not the variable
i should be able to do
ref_value = X or Y
right?
yeah
then if X is nil it goes to Y so if you dont have it it goes to regular discards
alright
well maybe not because you would need to reload the ui
im bad at ui
Yeah I don’t think that would work
reloading the UI is easy
It will just always take the X of the ref value
Well what are you setting X as
"inf"
That’s not how ref table/value functions
i know im oversimplifying
You need ref value to be a key of the ref table
it would be set to G.GAME.current_round.modprefix_infinite_discards
which would either be "inf" or nil
depending if you have the effect or not
That won’t change then
why not
Because the string of ref value will always be there
i would give it an id so you can find it with the get uie by id function and then use that to change the table and the value probably
You could maybe have the key saved in a global that is either the string or nil, but I’ve not tried that before
does ref_value not support or operator
It will do, just not in the way you’ve described
but I can't set the current round discards to that directly because its checked by a thousand other things which want it to be an integer dammit
so what I do instead is patch it so ref_value points to my value
but always
and my value either is set to equal inf or the discards
I think that'll do it
I would do what N said about the id
according to ease_discard it already has an ID
it runs G.HUD:get_UIE_by_ID('discard_UI_count')
oh yeah it does
can I just use that to set the text to inf then
if you have the thing
that seems too easy
To change the ref value
how exactly do I do that with the function
is there a way to change a card's name like card.children.center:set_sprite_pos?
not like that but yes https://github.com/nh6574/VanillaRemade/wiki#how-do-i-change-the-name-or-description-of-a-card-dynamically
it would be something like G.HUD:get_UIE_by_ID('discard_UI_count').config.ref_table / ref_value i think
ty mate!
oh well then i dont need to do it every frame
i can lazy update the value changing
so how do I put my value into g.game.current_round when the run starts
(also how do i use smods.calculate_effect to do that ive never done it before)
SMODS.current_mod.reset_round_globals(run_start) ? or whatever thats called
you can also just use your own table and change the ref_table too
only issue im having is that i wanna have 3 different states for the joker, and this seemingly only allows for 2
no it allows any number
how?
state3 and "key3" or state2 and "key2" or nil -- default
i want to put lazy update code in my mods' global calculate
I always thought calculate_effect was for that
global calculate is like joker calculate
oh i just put it in my mod's main file?
its used for contexts
yes
oh thats easy
thats the intent i want it to check whenever a context happens
its less of a crime compared to running it every frame
optimisation n allat
wait but what of the self and card arguments in the calculate function
i dont need them but they wont exist will they
it's function(self, context) where self is the mod object
so do I need to change self to anything or does it just know that already
those are the arguments that are passed to the function, the names are irrelevant
right
why do you need to lazy update this value?
i need to check if you have the infinite discards or not every context
cause it wont always be on
why?
use add to/remove from deck
seems to not be working (everything else works)
key = ...
nope, just crashes the game-
im tryting to make some very naive and rudimentary animated sprite, which works fine like this
but a problem i found is that if you have multiple copies of the card, it change faster
what's like the proper way to deal with this]
"} expected near ="
syntax error, not my fault
save the values to card.ability instead of a global
you should be doing that anyway, global variables are not recommended
yeah that's the problem -- card.ability doesnt work in the update block, that's why i was crashing last time i attempted this
you can also just save it directly to card
yeah im not understanding why this doesnt work, help is very appreciated-
sry for the bother
https://github.com/nh6574/VanillaRemade/wiki#how-do-i-change-the-name-or-description-of-a-card-dynamically im trying to do this
remove the second key =
dammit
i dont know when the UI is created, i tried to hook start_run with a blockable event since thats when the UI shows up
oh wait
might not have been the issue
ah no sorry my fault
i got it to not crash but its not working
it wouldnt be .config directly because it points to the node and not the dynatext inside
yeah i figured that out
not sure why its not working or how to figure out why its not working but its simply not changing the ui text
you dont need to update the object or recalculate anything
figured i should just in case
also ref_table and value are not located there
oh
well it crashed when i did .config.ref_table and idk where they are
thatd explain why it didnt work
theyre in the dynatext object. i dont remember what the syntax should be rn
this is such a bizarre way of updating this value
thats how i tend to do things
G.HUD:get_UIE_by_ID('discard_UI_count').config.object.config.string[1].ref_value this is what you need
but just do this in an add_to_Deck on your joker and change it back in remove_from_deck
you don't need to be constantly checking to see if you need to change it
i will not be doing that because if you had two of the joker then lost one of them it would go away even though you still have the joker
you can check if you have another
just check you don't have other copies
thats so much workkkk
well how are you currently setting your value to know to change the display?
I havent implemented it yet
ive just been trying to get it to work with the value
turning it on with debugplus to see if it works
you'll still need to do some checks within that for other copies unless you do that in an equally jank lazy update method
yeah im probably just gonna check for it in the lazy update cause im already doing that
its not an update function so thats good enough for me
okay, make it more complicated than it needs to be 👍
i love doing that
yo yall know if theres an issue with my localization file?
cause im trying to pull from it and it just gives blank
What are the joker keys and your mod prefix?
figured out the issue, the global calculate isn't running
calculate = function(self, context))
whats wrong with this definition of it
oh
chat really stupid question
what's the like accepted way of generating an integer between a given range
two ways to do it depending on if you want it to respect the game seed or not
math.random(x,y) ignores seed
pseudorandom("seed", x, y) respects seed
the seed string can be any string
i dont know where i fucked up but it crashes
im getting a crash from psuedorandom idk what am i doing wrong
show code
i know its not change_voucher_limit because that 100% works
Log?
add_to_deck = function(self, card, from_debuff)
if card.ability.extra.colourID == -1 and not from_debuff then
card.ability.extra.colourID = psuedorandom("colourOfMoney", 1, 26) -- <-- this is the line it mentioned in the log
card.ability.extra.colourName = card.ability.extra.nameTable[card.ability.extra.colourID]
...
[irrelevant code below]
pseudorandom?
i suck at programming, is it okay if i just steal this (with credit ofc)
yea sure lol
woohooo :D thank you
why doesnt this work
@frosty rampart would this work then?
i tried putting the val stuff in but kept getting red lines
after the first end, you also need to add card.ability[self.key] = val, which will properly indicate to the game that the sticker is applied and it'll draw the sticker and give it the badge for it and whatnot
oke!
ill give it a test soon
Is Meta cooking new mods?
it's a secret :3 quite a lot of work to go, but i'm hoping to get the main feature done soon and then i can reveal it

i will say that the word choice in my server nickname is very intentional
the joker key is geeked and the mod prefix is avgh
Hmm, looks right. What about your loc_vars? Are you doing anything weird there?
return { key = Geeked==0 and "j_avgh_geeked_locked_in" or Geeked==1 and "j_avgh_geeked_geeked" or nil }
end,```
you need some parentheses i think
return { key = (Geeked == 0 and "j_avgh_geeked_locked_in") or (Geeked == 1 and "j_avgh_geeked_geeked") or nil }
does the name change
no name
yup
that just makes me think theres something wrong with the keys or the loc file
what happens if you just return key = "j_avgh_geeked_locked_in"
i suspect maybe explicitly returning key = nil is problematic
its not
do you have loc_txt by any chance?
yeah
hm
ok i see
is that the problem?
whats the name of your loc file
en_us.lua
oh thats stupid
capitalization doesn't matter but it does have to be a dash, not an underscore
oh yeah i didnt even realise the dash
omg hi jamo 62
does capitalization not matter i think its actually lowercase
maybe it does but i know lowercase definitely works
i only said that because i trusted you knew uppercase worked
i keep running into people from my past god help me
not im just stupid i think
You will be forever haunted by it
nope
Don't worry it's still my present
try en-us lowercase if uppercase doesnt work too
nah it worked
awesome
i was just being stupid
speaking of being stupid i'm probably being stupid here
Your atlas size looks wrong
is it supposed to be 32x32?
no, my artist exported the "art" in 64x64 so i kinda just used that dimension
i'll downscale tho so it shouldn't be too bad
(i put art in quotations because this specific piece is more of a pisstake, trust me the one skip tag in this mod is worse)
where
most elegant way would be to return an alternate key in loc_vars
in en-us.lua
i mean where in the game
or if you're just changing one or two words, make it a variable
a joker? ui?
Ah, consumable text
then what minty said
local key = self.key
if SMODS.find_mod("the other mod") then key = key.."_alt"
return {
key = key
}
i'm unsure what the x2 amount is if it's doing this
how do i make it so the deck doesnt let jokers appear
set every rarity mod to 0
is what i would do
and if that doesn't work, see what vanilla jokerless challenge does
what about modded rarities
also, i tried doing what jokerless does but it didnt work
iterate over the rarity pool to get the relevant keys
G.GAME.modifiers.no_shop_jokers = true
that would probably work
i can't use pokermon and cryptid in the same time right ?
, it crack and it said because of talismen but if i just run talismen and pokermon it normally
Is there a way to make a seal or enhancement that causes cards held in hand to retrigger scored cards?
best bet is making it run on context.setting_blind and context.after
Check out vanilla remade's red seal
https://github.com/nh6574/VanillaRemade/blob/9b0f346ee534f855416100b316e8eccfcb314c77/src/seals.lua
Contribute to nh6574/VanillaRemade development by creating an account on GitHub.
context.press_play is a thing
before anything is played
as in when selecting the hand i think
Right. I can't use context.after as it happens before scoring is finished
I was hopping there was another context that happened between those two points
What specific timing and effect are you trying to do?
your gonna have to attach a context of your own
context.before ?
would this work if im trying to make all cards of a specific set or pool multiply? I'm not sure personally\
actually its worth a shot imma try first
bc arguably i havent. if it doesnt then oh well but if ti does then nice
What is your code
no it appears not for mine
hold on
My stake keeps on showing up as error
here is the code in stakes.lua
SMODS.Stake {
name = "Rose Stake",
key = "rose",
applied_stakes = { "gold" },
pos = { x = 0, y = 0 },
sticker_pos = { x = 2, y = 1 },
text = {
"Shop can have {C:attention}Burdened{} Jokers",
"{C:inactive,s:0.8}(Take up an extra slot)",
"{s:0.8}Applies all previous Stakes",
},
modifiers = function()
G.GAME.modifiers.enable_burdened_in_shop = true
end,
colour = G.C.RED,
}```
here is the atlas
key = "CustomStakes",
path = "CustomStakes.png",
px = 34,
py = 34,
atlas_table = "ASSET_ATLAS"
})```
loc_txt?
o hm
changed it to loc_txt and i still get this error
heres the custom stakes file
(at 1x)
youre missing the atlas too
o fuck
but changing text to loc_txt was not the issue if you did that
text goes inside loc_txt
added the atlas bit
ok well good news is that it shows up
SMODS.Stake {
name = "Rose Stake",
key = "rose",
applied_stakes = { "gold" },
pos = { x = 0, y = 0 },
sticker_pos = { x = 2, y = 1 },
loc_text = {
"Shop can have {C:attention}Burdened{} Jokers",
"{C:inactive,s:0.8}(Take up an extra slot)",
"{s:0.8}Applies all previous Stakes",
},
atlas = 'CustomStakes',
modifiers = function()
G.GAME.modifiers.enable_burdened_in_shop = true
end,
colour = G.C.RED,
}```
the code at current
ah also applied_stake "gold" will try to apply your gold take, not vanillas
loc_txt = {
name = "Rose Stake",
text = {
"Shop can have {C:attention}Burdened{} Jokers",
"{C:inactive,s:0.8}(Take up an extra slot)",
"{s:0.8}Applies all previous Stakes",
},
}
gimme a sec to find it
oh LMAO
There's a sticker in cryptid that does a similar thing if you want
You could take exemple
prefix_config = { applied_stakes = { mod = false } }
(add that in addition to the applied_stakes = { "gold" })
how does controller focusing work? I'm trying to get the controller to focus on the buttons on the left before it focuses on the slider, but it always starts at the sliders from the top buttons
Just modify it to make this act on specific suits and make it an actual joker
i hate controller support
?
no it's a separate line
oke
lets give it a go
also does the code like, know, im adding burdened jokers
wouldnt i need to make a hook
oop
if you didnt program enable_burdened_in_shop to do something then yes
this doesn't work, its meant to trigger for every joker in a specific set, how can I make that happen?
hmmm, im trying to figure out where in the vanillaremade wiki it has smth like that
nowhere
you shouldn't need a hook, just check for the value in the sticker's should_apply function
is this the function somethingcom wrote for you?
well this is all ive got so far
no its my own failed attempt
i mean modify_joker_values
LOL
there we go
im so stupid LMAOOO 😭
theory, marisa has no brain
what the FUCK IS GOING ON
https://github.com/Steamodded/smods/wiki/SMODS.Sticker
see: needs_enable_flag
LMAOOOOOO THIS IS SO BROKEN :OSB
WHY IS THERE AN EXTRA TINY BOX
WHY DOES IT SAY ERROR 😭
for the sticker tooltip
ohh thats what a tooltip is,,,
because you dont have sticker text
if thats true then nobody will be able to help without you showing what the function does
maybe its in en_us.lua
oh right i forgot
you need some extra checks in your should_apply function hold on
yeah, im guessing there needs to be some extra text
maybe smth like
name = "Burdened",
text = {
"Takes up",
"an extra slot",
},
},```
?
this is what i do for a starspace sticker
center.set == "Joker" checks to make sure if it's going to be applied on a joker
the area checks make sure the sticker can only appear if the card is being generated in a shop
the third line is what i just had you check for
and the 4th line gives it only a 40% chance to appear on a joker, instead of appearing on every joker
anyone here know whats going on with this?
as for the broken text, the smods.sticker documentation should explain where to localize everything
okay, ill give it a shot
you dont need those since these are already handled by the default should_apply
all of this is basically just what that does
use your prefix instead of vremade
setting a custom should_apply overwrites it, as you can see by marisa's earlier screenshots
stickers are so jank
you can add and SMODS.Sticker.should_apply(self, card, center, area, bypass_roll) instead
iirc
yea i guess you can lol
does that check the rate that you set in the sticker definition too?
ya makes sense
does anyone know how to load the mod config wthout smods...
hows this look
hatch_burdened should be under Other iirc
hm
also burdened stickers dont show up anymore 😭
guessing the probability has been set to 0, somehow
UHHHH
no
like
that should be outside the function
just in the sticker
and then you can remove the function entirely
im confused abt your wording im rly sorry
i struggle a lot with verbal instructions
idk what else im meant to say\
so i have to move this bit outside?
my bad for suggesting the should_apply function in the first place, i did not know game
nvm the loading is working the saving is not
i just copied this from smods
ah its not even printing the serialized string, i didnt realize
ok i made the changes. burdened jokers still do not show up
may we see the code
Stickers.lua
SMODS.Sticker {
key = "burdened",
badge_colour = HEX '3abd4c',
pos = { x = 0, y = 0 },
atlas = 'CustomStickers',
-- Credit to Metanite64 for the code: this is taken from Astro's Starspace Mod (with permission.)
-- Credit to Eris for support on the tooltips.
apply = function(self,card,val)
if val then
card.ability.extra_slots_used = card.ability.extra_slots_used + 1
else
card.ability.extra_slots_used = card.ability.extra_slots_used - 1
end
card.ability[self.key] = val
end,
needs_enable_flag = true
}
-- Tooltip
return {
descriptions = {
hatch_burdened = {
name = "Burdened",
text = {
"Take up",
"an extra slot",
},
},
}
}```
Stakes.lua
SMODS.Stake {
name = "Rose Stake",
key = "rose",
prefix_config = { applied_stakes = { mod = false } },
applied_stakes = { "gold" },
pos = { x = 0, y = 0 },
sticker_pos = { x = 2, y = 1 },
loc_txt = {
name = "Rose Stake",
text = {
"Shop can have {C:attention}Burdened{} Jokers",
"{C:inactive,s:0.8}(Take up an extra slot)",
"{s:0.8}Applies all previous Stakes",
}},
atlas = 'CustomStakes',
modifiers = function()
G.GAME.modifiers.enable_burdened_in_shop = true
end,
colour = G.C.RED,
}```
also how do i add the funky gold stake shader to rose stakes image
shiny = true
no luck ;-;
https://github.com/Steamodded/smods/pull/1114
this context seems cool and useful but my god set cost is called all over the place
these contexts can be used to create effects that alter the cost and sell value of cards dynamically. needs to be 2 contexts, so that the original sell value can be based on the new cost, while als...

do i put that in the atlas code or
stake
stake
oke
added to stake
anyways, the burdened sticker still doesnt show up. it wont show up unless i have the stake code say "burdened show up in shop" or smth
Speaking of PRs thank you SO much for pulling the is_eternal fix. I have a lot of stuff broken because of that bug 😭
G.GAME.modifiers.enable_burdened_in_shop = true
end,```
i think i need to add this
I think it makes sense tbh, jokers default to being compatible so I think everything else should too
WAI TNO
Indeed it should, especially with a context and helper function implemented
i have no choice but to add this
return G.GAME.modifiers.enable_burdened_in_shop
end,
if i want it to work
otherwise it wont show up
did you do the sets = { Joker thing
yeas
does it maybe need the mod prefix in the modifier? enable_hatch_burdened_in_shop?
SMODS.Sticker {
key = "burdened",
badge_colour = HEX '3abd4c',
pos = { x = 0, y = 0 },
atlas = 'CustomStickers',
-- Credit to Metanite64 for the code: this is taken from Astro's Starspace Mod (with permission.)
-- Credit to Eris for support on the tooltips.
apply = function(self,card,val)
if val then
card.ability.extra_slots_used = card.ability.extra_slots_used + 1
else
card.ability.extra_slots_used = card.ability.extra_slots_used - 1
end
card.ability[self.key] = val
end,
needs_enable_flag = true,
sets = { Joker = true }
}
-- Tooltip
return {
descriptions = {
hatch_burdened = {
name = "Burdened",
text = {
"Take up",
"an extra slot",
},
},
}
}```
maybe?
mod prefix isnt added to stickers by default
bleh
it is im pretty sure
i dont know what im doing wrong ;-;
oh
idk
last time i made a sticker it wasnt
and that was pretty recently
ohh wait i'm looking at the code now
it's not even in_shop, it should just be enable_burdened (or enable_hatch_burdened)
G.GAME.modifiers.enable_hatch_burdened = true
end,```
in the localization
oh right
alright now for the localization
yes, it should be under Other
and then for the badge you also need to do this:
return {
dictionary = {
...
},
misc = {
labels = {
hatch_burdened = "Burdened"
}
}
}
oke
Okay, i must be doing something wrong
adding loc_vars to this consumable crashes the game on startup
welp
return {
descriptions = {
other = {
hatch_burdened = {
name = "Burdened",
text = {
"Take up",
"an extra slot",
},
},
},
dictionary = {
},
misc = {
labels = {
hatch_burdened = "Burdened"
}
}
}
}
whats the name of your localization file
it works fine rn, its just the localisation thats fucked
Other, capital O
i dont have one 😓
huh
this used to be a jokerforge mod
where is that then
in the same file
that
ah
as stickers.lua
that wont work
so i gotta make en_us.lua?
yep
king_of_swords.lua
PB_UTIL.MinorArcana {
key = 'king_of_swords',
atlas = 'minor_arcana_atlas',
pos = { x = 6, y = 5 },
in_pool = function(self, args)
return G.GAME.modifiers.enable_perishables_in_shop and G.GAME.modifiers.enable_rentals_in_shop
end,
-- Thanks mys. minty!
loc_vars = function(self, info_queue, card)
local mod_key = self.key
if SMODS.find_mod("bunc") then
mod_key = mod_key .. "_bunc"
end
return {
key = mod_key
}
end
can_use = function(self, card)
if G.jokers and #G.jokers.highlighted == 1 then
local joker = G.jokers.highlighted[1]
return (
joker.ability.rental or
joker.ability.perishable or
joker.ability.bunc_scattering or
joker.ability.bunc_hindered or
joker.ability.bunc_reactive
)
end
end,
use = function(self, card)
local joker = G.jokers.highlighted[1]
PB_UTIL.use_consumable_animation(card, joker, function()
joker:set_rental(false)
-- For some reason set_perishable just ignores the parameter, while set_rental properly uses it
joker.ability.perishable = nil
joker.ability.perish_tally = nil
joker.ability.bunc_scattering = nil
joker.ability.bunc_hindered = nil
joker.ability.bunc_reactive = nil
SMODS.recalc_debuff(joker)
end)
end
}
[SMODS paperback "utilities/misc_functions.lua"]:162: attempt to call a nil value -> This is just the register/load items call
if SMODS.find_mod("bunc") then will always be true
if next(SMODS.find_mod("bunc")) then is what you want
i always forget that empty tables are truthy <.<
ok its in an en-us.lua file now
im going to kill whoever decided this
lua depends a lot on checking nil so it makes sense
(the other thing i always forget is that comparisons aren't distributive, but i literally don't know a language where they are :v )
Only issue is that this doesn't fix the crash- since it crashes even with an empty loc_vars
how do i load the en-us.lua file in my main.lua file
yeah i was going to ask for the full log
it loads automatically
o
i keep getting the same error
return {
descriptions = {
other = {
hatch_burdened = {
name = "Burdened",
text = {
"Take up",
"an extra slot",
},
},
},
dictionary = {
},
misc = {
labels = {
hatch_burdened = "Burdened"
}
}
}
}``` in en-us.lua
I mean the full log doesn't really have much in it, since it crashes at startup
is it in <your mod>/localization/en-us.lua
misc appears to be inside of descriptions
i think
I SPELT IT AS LOCALISATION (british)
wdym the error is right here
missing a comma
oh goddamnit
i still get the error tho
hm
so how would i write it out then, bc i tried frankensteining it together and idk what goes where
Other is also lowercase still
-- Tooltip
return {
descriptions = {
Other = {
hatch_burdened = {
name = "Burdened",
text = {
"Take up",
"an extra slot",
},
},
},
},
dictionary = {
},
misc = {
labels = {
hatch_burdened = "Burdened"
}
}
}
oke
smodsless jokerdisplay will be a thing once i fix this
-# two of them cats my beloved
How tf 😭
you have 0/5 jokers twice what’s so confusing
jokers 2 just dropped and you have 0/5 of those
(the second count is supposed to overlay the first so it can go over jokerdisplays but without smods the x value doesnt change properly for some reason)
im def doing this wrong but what it tries to do is modify every joker thats a specific set in hand. Im not sure the amount of people who know how to fix this but if you can, anything helps as it currently does nothing
show the CSMODS.modify_joker_values function
the full thing? just stating, somethingcom told me to use this for modifying
had certain crashes but i worked around them
is there anything i can do abt that blank tooltip box
stake win sticker maybe?
Is there a way to detect if a card is in a specific pool? the "Set" thing doesn't work for whats needed
pool as in Joker, Tarot, etc or a custom pool
custom pool, this doesnt work and i figure im not doing it right
that's for Joker, etc
ahhhhhhhhhhhhh
(card.confg.center.pools or {}).EveryImasJoker if the pool is defined in the joker
is imas idolmaster
yeah my friend whos also developing wants some cards from the series in
hi vro
nice
anyone wanna help me figure out how to make a custom currency
how do I make one of those UI elements where you select a value from a list
by pressing left
and right
create_option_cycle
the intent is to multiply every joker thats in a specific pool but nothing comes out. Ive been trying to fix this for way too long, help.
if context.end_of_round then
for _, joker in pairs(G.jokers.cards) do
if (card.config.center.pools or {}).EveryImasJoker then
CSMODS.modify_joker_values(G.jokers.cards[_], {["*"] = 1.1}, {x_mult = 1, x_chips = 1})
end
end
end```
would there be a way to have playing cards act as negative without them actually being negative? i have a similar effect already done by hooking get_id, but i haven't found a similar hook for editions
pass joker as the first arg to your function
yo chat am i being stupid cause for some reason this gives me a crash
posting the crash would probably help
ah right
you need commas in the return table
no problem
oo what do i write
also
how do i make custom color codes?
e.g. if i wanted to make aG.C.CYAN
yo yall know why for some reason it gives nil for the numerator rather than the actual number?
alrgiht it does the function, but doesnt quite multiply it by 1.1
(before and after provided)
nvm got it
though i think might have the issue
i think its probabaly bc of the 1mult formatting
joker forge code highkey sucks so i dont think thats a good thing
but also theres no real issue here so
idk why
oh no im not slandering their code
how do i make a "won using rose stake" tooltip then?
if it was joker forge the probability identified would be like "group0x..."
or the line before that if youre using loc txt
does the stake use loc_txt
oh nah its lmult
not 1 mult
ohhh ok im wrong
ok then alongside name and text add
sticker = {
name = "name Sticker",
text = {
"Used this Joker",
"to win on {C:attention}name",
"{C:attention}Stake{} difficulty",
},
}
change the name part for what you want it to say
Oke
tried to change it to this but it didnt help much loc_vars = function(self, info_queue, card) return { vars = {(G.GAME.probabilities.normal or 1), card.ability.extra.odds, card.ability.extra.xmult, card.ability.extra.lmult} } end,
can i see the text
ohh ic ty mate
dunno why this is popping up as im not doing that t-t
omg
im such a div
nvm
The Script works, but doesnt multiply by 1.1 at all. If anyone knows, how could this be fixed?
this is in a joker slot with multiple jokers though so if it compound multiplies then that would be interesting
how do i get my custom stake sticker to show up? its currently showing the white sticker. im aware i have to do an atlas, but how if the stake already has an atlas?
SMODS.Stake {
name = "Rose Stake",
key = "rose",
prefix_config = { applied_stakes = { mod = false } },
applied_stakes = { "gold" },
pos = { x = 0, y = 0 },
sticker_pos = { x = 1, y = 0 },
loc_txt = {
name = "Rose Stake",
text = {
"Shop can have {C:attention}Burdened{} Jokers",
"{C:inactive,s:0.8}(Take up an extra slot)",
"{s:0.8}Applies all previous Stakes",
},
sticker = {
name = "Rose Sticker",
text = {
"Used this Joker",
"to win on {C:attention}Rose",
"{C:attention}Stake{} difficulty",
},
}
},
atlas = 'CustomStakes',
shiny = true,
modifiers = function()
G.GAME.modifiers.enable_hatch_burdened = true
end,
colour = G.C.RED,
}```
sticker_atlas = "something"
What do you mean a joker slot with multiple jokers?
what's a good way of like destroying all cards held in hand
i wanna do a joker where if you play a single card all cards held in hand are destroyed but i can't think of a good way
poorly worded
like a hanged man right?
SMODS.destroy_cards(G.hand.cards)
Is there a way for a deck to have cards that have a variety of different backs?
I think there is a way but it would involve some very involved work with smods' drawsteps systems
you can give a card a different back
What kinds of things would I need to do for this to happen
uhhh idk that's why i didn't answer at first lol
Ah
probably hooking some start of run functions to change all the backs
My first thought would be to store the data in the card's ability table
like the key to the atlas and the position
then set the card's back sprite correctly within a Card.set_sprites hook
for whatever reason, cards dont multiply by its intended value, in this case being 1.1. Here is a photo of one joker that it multiplies before and after. This equates to 1.324, though its multiple cards so idk what makes it like this
i replied to the wrong thing but i honestly just meant to get a ping so 🤷
is there a way i can check to see if it's a showdown instead of looking for a name?
(G.P_BLINDS[G.GAME.round_resets.blind_choices.Boss].boss or {}).showdown
i made some tweaks to what you gave me (because i didn't provide enough context) and now it works perfectly! thank you!!!
Is there a guide in how to make your own modded card enchantments?
no guides but there is documentation and examples
https://github.com/Steamodded/smods/wiki/SMODS.Enhancement
https://github.com/nh6574/VanillaRemade/blob/main/src/enhancements.lua
Thanks!
hey guys, do you know how i could display a "nope" (like the wheel of fortune card" when the random doesnt hit ?
joined the discord just for that because im going crazy
stuck on this for 2 hours now
where/when do you want to display it
i made a joker that has a 1/4 chance to create a random negative joker on blind skip
i wanna display a nope when you skip a blind and it doesnt proc
you can return { message = localize('k_nope_ex') }
if you want to make it look more like wheel here's the code for it but i think returning a message looks better for a joker
https://github.com/nh6574/VanillaRemade/blob/9b0f346ee534f855416100b316e8eccfcb314c77/src/tarots.lua#L639
'k_nope_ex' is a key in the vanilla localization, the prefix and suffix are not important that's just how the key is
ex means exclamation because it's Nope!, k probably means key or something
man ur the best
and this is absolutely goated
im learning how to code by doing a balatro mod (its my first time programing AT ALL)
i was losing my mind inspecting the game s source code
thats how i learned lol but there are plenty of resources now
do yall have any idea why #1# is still changing with seals_remaining?
because... it's the same value?
i thought lua is pass by value?
loc vars is called every time the description is shown
ah
youre getting the same value twice
thank you i wasn't understanding what the confusion was lol
😭
to fix it i might recommend you have 2 values, one for the max/starting value and one for the current
you also could do self.config.extra.seals_remaining (as self is the prototype, and thus has unchanging values) but thats not how i'd do it
mm gotcha
thx :)
for sure
@daring fern bump again bc ive still be stuck sorry for hte ping if unnecessary
noooooo all of my assets are off by one
