#💻・modding-dev
1 messages · Page 86 of 1
it's part of the loc_vars thing
you know how when you create a joker there's like
config = {mult =10} or something
you can then do
loc_vars = {card.ability.mult}
and then since that's the first var you have for this card, you can then use #1# in the description to have it change
like this?
like that yeah!
but put the g.game not in tje function like a dumb
OH
...loc_vars is a function, not a table
RIGHT, SORRY
ITS
return { vars = {card.ability.mult} }
end```
im goated
how do i update the value?
does anyone know why G.GAME.chips and G.GAME.blind.chips are tables? Im doing math with them and the answer is turning into a table an im getting an error
what is the erroe?
in your case you can probably just change G.GAME.interest_cap?
attempting to do arithmetic with table
try buying like
seed money to see
i tried calling the first element of table and it didnt work
oh hm
i printed type() and it said table
function Game:start_run(args)
startRef(self, args)
G.GAME.TGTMchangeHandSize = 0
IntrestAmt = G.GAME.interest_cap
end```
```loc_vars = function(self, info_queue, card)
return { vars = {IntrestAmt}}
end,
loc_txt = {
name = "Othala",
text = {"Earn {C:attention}interest cap * 5{} Dollars (#1#)", "{C:red}-20%{} of Interest cap"}
},```
it doesnt update
you do comparison with them and its fine but do it with a math answer of them and you get an error
,,,hm
,,,it, looks like its because the code doesnt constantly update?
i can put the loc_var function in the change in intrest, but i dont think itd update when you get seed money or stuff likr that
G.E_MANAGER:add_event(Event({trigger = 'after',delay = 0.3,func = function()
ease_dollars(G.GAME.interest_cap)
print(G.GAME.interest_cap)
if G.GAME.interest_cap > 5 then
G.GAME.interest_cap = math.floor((G.GAME.interest_cap/5) * 0.8) * 5
end
loc_vars = {G.GAME.interest_cap}
print(G.GAME.interest_cap)
return true end }))
end,```
i could put it line 12?
not working
it should be 15
why are you trying to assign loc_vars inside a use function
i dont know where that came from i deleted line 10
so what isnt working?
my code
what is this IntrestAmt variable you have created
top code block
why does it exist though
just put something like G.GAME and G.GAME.interest_cap or '???' in your loc_vars
like this
return {vars = {G.GAME and G.GAME.interest_cap or '???'}}
{C:inactive}
i attempted to put them in variables and set the values to the first index and it still broke
ok brainstorming time....
INGUZ represents a Seed. It symbolizes Goals, Growth, Change, Common Sense Hmm....
temporary strength?
i think this is a better #⚙・modding-general question
im going to just create the rest of the art
is higher weight on packs more common or less common
More common
oh youre supposed to put how much you weigh in real life there
oh! so weight = naneinf?
so tru
runes!!!!
ooh nice gif
what do yall think about a joker thats like
"discarded cards are removed from the deck. When sold, returns those cards to deck"
fair
also, negative
never needs to be sold!
just trying to think of a good alternative to this one joker i have
Maybe chance to "take" a card if it doesn't match some attribute
its concept is flawed but i want it to like have that "good in the short run, cant get rid of it or else"
i.e. 1 in 3 chance to remove a discarded card from deck if it does not match your most common suit, return all cards on destroy
25% chance to remove card 25% to dupl;icate it 
Coffin - 20 gold on buy, destroys an adjacent joker on sell
was the original
eternals 😎
yeahh that was like: the good thing
if you have eternals or no other jokers its free money
maybe something about perishable/rental sticker?
if sold, random joker becomes perishable
well
my thought was "always comes with perishable"
so if you WANT
you can hold it for 5 rounds and then sell later
maybe on sell make 1 joker eternmal, eternal is good if you can control it i think
maybe
what would i know im making consumables
makbe something like magic skin from isacc
if you get rid of it, it keeps coming back more and more
like spawn a consumable/joker on buy, if sold, it will show up more
or something
are there any mods that add new modifiers to cards? looking for examples for when i work on my mod
enhancements, editions, seals, or whole new types of modifier?
new types
i would assume those are hard to make which is why i want to look at some references
i'm not immediately aware of any such mods 
on another topic
i'm finally following up on this idea and i'm having trouble making the first planet card
- my loc_vars should be the hand level, name, mult increase and chip increase in that order but idk how to get those
- hovering over the card crashes the game with
attempt to index field 'colours' (a nil value). i don't know what's causing this.
SMODS.Consumable{ -- Rainbow Planet
set = 'Planet',
cost = 3,
unlocked = true,
discovered = true,
atlas = 'spectrumplaceholders',
key = 'RainbowPlanet',
name = "Rainbow Planet",
effect = 'Hand Upgrade',
loc_vars = {},
loc_txt =
{
['en-us'] = {
['name'] = 'Rainbow Planet',
['text'] = {
[1] = "{S:0.8}({S:0.8,V:1}lvl.#1#{S:0.8}){} Level up",
[2] = "{C:attention}#2#",
[3] = "{C:mult}+#3#{} Mult and",
[4] = "{C:chips}+#4#{} chips",
}
},
},
set_card_type_badge = function(self, card, badges)
badges[1] = create_badge("Planet???", get_type_colour(self or card.config, card), nil, 1.2)
end,
config = {hand_type = 'spectrum_Spectrum', softlock = true},
pos = {x=0, y=2},
soul_pos = {x=1, y=2},
}```
i'm also not sure how to implement the part where the card does the thing but one thing at a time
looking at the balatro source did not help because the planet code is arranged really weird and i couldn't tell what was going on
update: i looked at the cryptid source instead and solved it easily. once i remembered that they added new hands so it would actually be a proper template. yay lel
is this how you implement a patch corrently?
I believe that will work
How would I make it so when my deck is selected it gives you a specific joker?
speedrunner's dream
Debuffed bosses?
kid named Jellymod
weight = math.huge
to be fair there wasn't really abetter way at the time
but then it never got upgraded
asking in advance (i'm outside rn), is there a built-in thing to adjust an image's opacity? want to make an image fade in/fade out that is drawn on top of the game
love it when my code works immediately first try
nvm
me: manages to write code that changes how the game handles straights and one of a kinds
also me: so like how do i make a joker give mult
mood
thinking of a joker that gives +1x mult for every failed wheel
those who know
🙁
wheel of hope..
is there any way to make a edition not show up until you buy/add it to your deck?
presumably by a consumable or joker that gives it directly
fun idea
i was thinking create a copy of all consumables, then the copies will curse on pickup but that seems awful
maybe if there is a global on deck add, i can hook it to curse it when picked up
as in in the collection?
i think its been done before if thats what you mean but i have no clue
no as in in the shop/packs
you buy it, then afterwards, there is a chance that it is cursed
local old = Card.set_edition
function Card:set_edition(e)
if e == "e_negative" or (type(e) == "table" and e.negative) then
return old(self, e)
end
return
end
smth like this
if you wanted to check what added it then uh
either a separate argument that isn't used by vanilla that you use to communicate, a global flag, or if you're feeling spicy debug.getinfo
is there a way to add a new type of modifier to a card/joker?
not sure
it might take a lot of effort but i feel like its possible
how does one do that thing they do for like, blueprint or the fool where they have the text in a small badge underneath?
sounds like smth youd use smods.objecttype for
look at cardsleeves code i suppose?
i'll take a look at card sleeves
looks like card sleeves extends the SMODS.Center class
you're trying to make something like an edition?
but like your own category or whatnot
yeah
yeah you can implement custom editions
in its own category?
probably take a bunch of code from SMODS.Edition and patch scoring, card generation, card drawing (as in on the screen), and one of the functions for UI badges
is there a add to deck function that ALL cards use?
would that interfer with other editions?
since it'd be a new type wouldn't it be classed under editions
how do i get a random number?
what would a cursed edition do?
Depends on should it be seeded or not
i would like it to be seeded
pseudorandom(pseudoseed("your_seed_key"))
what is a seed key
Any string you want, which indicates what a purpose for this pseudonumber
can an edition do a random effect?
bumping, please ping if you've got an answer
What kind of random effect are we talking?
no random effect
decided against it
Now its this
Cursed Playing Card: Remove edition, enhancement and seal from a card that has it and this card, then uncurse this card
Cursed Planet: delevel the hand twice (you can use the planet so total of -1 level)
Cursed Tarots: ???
Playing cards? Or are you also counting Jokers and Consumables?
Cuz if you’re just talking playing cards maybe see what Hologram does
what would a cursed tarot do?
or a cursed spectral?
oh
i have an idea
create a dummy card (0 chips no rank or suit) with an eternal sticker
im talking about basic structure
hmm
i had a random thought of just using a sticker as the base since those don't interfere
but i'm not sure
i have no idea why you didn't Google that btw love2d is very well conversated and documented
i think curse should show on use for planets, tarots and spectral
how do i make a message, like when midas mask activates
Ok trying to add a sound, it's in assets/sounds and imported with
SMODS.Sound {
key = 'strongman',
path = 'strongman.ogg'
}
But still it's not found
What's the prefix used by your mod?
'cause you need to use it alongside the filename - play_sound("toga_win95start"), for example, where win95start is the sound key and the prefix (using mine as example) you've assigned.
You tried to set an edition thet doesn’t exist
I don't have any prefix defined, been manually adding one but it seems steammodded had added one to jokers, so I guess I can clean that up by defining a prefix?
function Card:add_to_deck(args)
ATDref(self, args)
print(self.ability.set)
print(pseudorandom(pseudoseed("Curse")))
print(G.GAME.TGTMCurseChance)
if (G.GAME.TGTMCurseChance > 0) and (self.ability.set == 'Joker') and (pseudorandom(pseudoseed("Curse")) < G.GAME.TGTMCurseChance) then
G.E_MANAGER:add_event(Event({trigger = 'after',delay = 0.3,func = function()
self:set_edition("Cursed")
card_eval_status_text(self,"extra",nil,nil,nil,{message = "Cursed!", color = G.C.PURPLE})
return true end }))
end
end```
key = "Cursed",
shader = false,
loc_txt = {
name = "Cursed!",
label = "Cursed!",
text = {""}
},
unlocked = true,
discovered = true,
config = {
mult = -10,
x_mult = 0.75
}
}```
If you don’t define one smods will use the first four characters of your id
set_edition(‘e_Cursed’)
Oh lol finally understanding, it just in the Header
Did make that very difficult on myself 😄
So smods will add the object prefix and mod prefix on most objects, like a joker with key example would become j_modprefix_example
Yeah it's easy enough, I just confused myself thoroughly
But sounds are just modprefix_soundname ?
Where soundname part is the key you've defined.
You probably need to change the prefix in the example to lookatyourheaderandchangeyourprefixyoutotalknob
uh oh 2
Wait no never mind they’re not
I’ve just been working with base editions for too long
They’re still mod prefixed
With the e
--- MOD_NAME: TGTM's Consumables
--- MOD_ID: TGTMConsumables
--- MOD_AUTHOR: [Thatguytheman]
--- MOD_DESCRIPTION: runes and stuff (and a few random jokers)
getting the same error
nvm i figured it out
its first 4 letters lowercase
how do i make sure mult doesnt go negative?
Did you try to looking in game code at all?
negative mult works, it just doesn't show
Getting somewhere 😄
you only really need to handle this in loc_vars, returning a negative mult from a calculate function will just not do anything
like the joker gives - 10 mult, but i dont want the mult to go negative, i want it to stop at 1
i guess its fine actually
nvm
how do you even use undiscoveredsprites
crying rn
G.C.PURPLE my beloved
balatro has gone WOKE! (brityishj)
Thats the correct spelling
how do you check if a card is a tarot
also its color!!!!! arghhh!!!!!
ok american
can probably check it's set
hold on
also what is #G
ermmmmm most standardization organizations use "color". .. . ...... .... .
The size of G
why is it useles
because G holds no meaningful data
i saw it in for i=1, #G.hand.highlighted do
i thought #G was something like GAME
it checks the length of G.hand.highlighted
card.config.center.set == "Tarot"
would self.ability.set == 'Tarot' work?
i believe so
Probably
self.config.center.set would also work
probably safer and more compatible to do self.ability.set
theres also card.ability.consumeable for any consumable type
does lua lists start at 1 or 0?
1
crying
it's not that bad
Relevant video https://youtu.be/0uQ3bkiW5SE
Now you can finally stop complaining about lua being 1-based indexing and start complaining about all the other languages that got it wrong.
Links
Twitch: https://twitch.tv/teej_dv
Twitter: https://twitter.com/teej_dv
Github: https://github.com/tjdevries
Neovim: BTW
#neovim #programming #lua
tsk tsk immediately obvious who didn't do their FORTRAN homework
how would you make a enhancement like stone, that doesnt show rank or suit
CURSE YOU STEAMMODDED WIKI!!!!
True
cryptid mod to the rescue (i hope)
what are the fields for enhancements
how do i set a custom chips amount for the enhancement
key = "Dummy",
unlocked = true,
discovered = true,
config = {
no_suit = true,
no_rank = true,
chips = 0
}
}```This isnt working, what is wrong?
nvm
the enhancement is still giving chips, how do i get no chips scored
how do i make the enhancement not give any chips?
no_suit and no_rank aren't in config iirc
where do they go?
there is no documentation im lost and scared
because i have not worked on it and was asking first lol ty
Have you tried the solution you've been given twice in the Cryptid discord?
yes it just crashes
with invalid Ipairs thing
odd
want log?
Has Steamodded had any major changes since 3–4 months ago?
how would i get the name of a joker from localization?
I dont believe so?
I’m just wondering if how much work I’d have if I decided to get back into modding
nvm i think i found it
is this how i would check for a full house using the poker hands api?
if next(parts._2) and next(parts._3) then
--code hear
end
No
then i dont think you need to worry about it ksdfjhskdfjh
you could always do next(context.poker_hands['Full House']), buuut
yeah i believe so!
can i pass on context with the evaluate function?
the only things on steamodded wiki are parts and hand
function that makes sure it is the defined hand
ohhh!!
you're making a new poker hand?
if so then like
yeah this is definitely right
cause i just did _card:is_suit() == "Hearts"
ahhh yeah
local _redFury = SMODS.merge_lists(parts._2, parts._3)
local isRedFury = true
for j = 1, #_redFury do
local _card = _redFury[j]
local rank = SMODS.Ranks[_card.base.value]
isRedFury = isRedFury and (rank.key == 'King' and _card:is_suit() == "Hearts" or rank.key == 'Queen' and _card:is_suit() == "Diamonds")
end
if isRedFury then return {_redFury} end
radical
as for ranks, you would be better off doing _card:get_id() == 13 and _card:get_id() == 12 for kings and queens respectively but u do u!!
how do i see if no card is selected
like after you use a conumable
ohhh
as a fallback if no cards are selected
like you want a consumable to not be usable when cards are selected?
ahhh
you can try #if G.hand.highlighted == 0
is the hashtag nessesary?
its erroring me
i knew it!!!
how do i create a card
ill look at marbl;e joker
dw
how do i creatre a card
just straight to deck
Im trusting you with anything ever even once
oh my this is a lot of pressure
well, uh,, try looking at marble joker and certificate???
i dont know this one im sorry sdkfhjskdjh
is it weird to say that my mod feels too fast
?
it doesnt have that feeling of like tactileness that regular balatro has
i mean yeahh fair
why is that there
there is an emplace
maybe i copied badly
G.playing_card = (G.playing_card and G.playing_card + 1) or 1
local card = Card(G.play.T.x + G.play.T.w/2, G.play.T.y, G.CARD_W, G.CARD_H, front, G.P_CENTERS.m_TGTM_Dummy, {playing_card = G.playing_card})
card:start_materialize({G.C.SECONDARY_SET.Enhanced})
G.play:emplace(card)
table.insert(G.playing_cards, card)```
(i dont remember where i copied this from, probably marble joker)
how do i use a sprite from the base games atlas
i want to use this from Tarots.png
why is middle doing thaty
(blank rune just sets curse chance to 100% rn)
(for testing)
when i use the hermt, it just spawns in the center
i need help! things are being wierd and i dont know why!!!
is there a way to see if a lovely patch works/takes effect?
oh its worse uh oh
im not sure, but if there is a debug print or something
tried printing a value inside of a card that i patched in and it crashed the game
prob did it wrong ngl
you can just refer your sprite to an atlas already in the game i think
you said something about tarots right?
x 4 y 2 is the spot for locked cards
just do like "atlas = Tarots" and it should do it i think
take it with a grain of salt tho, im not the best at this coding thing
raw_atlas_key iirc
how do you delevel a hand
ok i have absolutely no clue what im doing wrong here tbh
trying to make it so every ace of spades gives x2 mult when scored which i didnt think should be that hard, turns out it is
the code for the arm could probably help idk
my consumables are not getting added to a pool desides the default
is there a modded joker that triggers when another joker triggers?
not afaik, but some mods (cryptid) have jokers that trigger when another joker trigger
ooh gotcha
ooh- thanks for the enhancement code structure, sad there is bairly any info on this
<3
,,,huh
icic
,,,where does this trigger come from?? huh??
probably a lovely patch
context.post_trigger is a part of steamodded's retrigger api
iirc
it's emitted after any successful trigger from the calculate joker hook in core/overrides.lua
ahhh gotcha
someone should update the steammodded wiki
or make a new one
how do i make my globals save? when i go to main menu and back, the global resets
wait
i might be goated
am i learning?
Yeah, the or 0 is technically a "failsafe" of sorts if the first value is undefined.
also how do i use the primary/secondary colors of a consumable type to replace G.C.Color?
card_eval_status_text(self,"extra",nil,nil,nil,{message = "Blank!", colour = G.C.PURPLE})
local LockedSpawn = Card(G.play.T.x + G.play.T.w/2, G.play.T.y, G.CARD_W, G.CARD_H, front, G.P_CENTERS.m_TGTM_Blank, {playing_card = G.playing_card})
LockedSpawn:add_to_deck()
return true end }))```This is putting the card in my hand, in the shop
when you are in shop, does G.hand still exist?
yes
how do i know if im in the shop
is it a G.STATE or something
if i check for sellecting_hand, does that mean only when you are playing a hand?
when you're picking cards to discard/play
like only when you have a hand you can add cards to
with G.hand:emplace(cardLoc, nil, false)
G.hand always exists
it's also used for things like arcana packs
you really shouldn't be putting cards in there unless you're playing a hand or you're in an arcana/spectral pack though
yea thats why i want it to only happen when you are in a blind
also, how do i put a card to the deck? where would i emplace?
i believe that's complicated, it SHOULD just be G.deck but iirc that doesn't properly interact with the deck viewer
just check vanilla code
i think vanilla uses G.play
G.play is for scoring
wdym by the deck viewer
i think it work its fine
oh, its showing 54/53
you click on your deck. to view it
or hover over it
G.E_MANAGER:add_event(Event({
func = function()
local front = pseudorandom_element(G.P_CARDS, pseudoseed('marb_fr'))
G.playing_card = (G.playing_card and G.playing_card + 1) or 1
local card = Card(G.play.T.x + G.play.T.w/2, G.play.T.y, G.CARD_W, G.CARD_H, front, G.P_CENTERS.m_stone, {playing_card = G.playing_card})
card:start_materialize({G.C.SECONDARY_SET.Enhanced})
G.play:emplace(card)
table.insert(G.playing_cards, card)
return true
end}))
card_eval_status_text(context.blueprint_card or self, 'extra', nil, nil, nil, {message = localize('k_plus_stone'), colour = G.C.SECONDARY_SET.Enhanced})
G.E_MANAGER:add_event(Event({
func = function()
G.deck.config.card_limit = G.deck.config.card_limit + 1
return true
end}))
draw_card(G.play,G.deck, 90,'up', nil)
playing_card_joker_effects({true})
return nil, true end```where is the emplacement here? (marble joker)
don't ask me im on mobile
oh
i did table.insert(G.playing_cards, LockedSpawn) and i can see that the deck updated to 53/53, but i cant see it in the viewer
it has no rank or suit
the edition doesnt
it is definly in the deck
you can draw it, but not see it in the deck view
is it G.STATE == G.STATES.SELECTING_HAND?
i dont think its working for mw
this might be a stupid question but its steammodded so who knows, can you make negative chips/mult by just putting in the config file chips = -50 or something?
what config file
...I think the -50 chips and config implies the config part of the joker.
considering that's not a config file im not so sure
On note of configs, the function that's needed to define the UI for the config tab appears to be quite... complex.
At least from looking at how other mods have them defined-
the config in jokers
defining uis in general is very complicated
generally you just copy from another mod
unless you really want to mess with it yourself
Somewhat worried about "copying" due to the 5th rule...
idek if my mod idea is possible 😭
we have licenses for this
that or i'm just being stupid
I suppose... just trying to figure out the new "field" of this game to work with, so to speak, as I'm not exactly new to Lua itself. 😅
well due to the lack of good documentation it's highly encouraged to at the very least look at other mods code to solve problems
and of course the games source code
Yeah, have been.
but yeah if they say you can or if their code is under any sort of open source license you can just copy the code willy nilly 🔥
that's what I do at least 
i copy in my mind (and with copy paste)
what is the state where you can select cards and play them?
if G.STATE == G.STATES.SELECTING_HAND then this isnt true when i am selecting cards in a blind
...
else
print("No G.hand and No G.STATES == G.STATES.SELECTING_HAND")```
am i dujmb?
must have been the wind...
i just alt-tabbed back into the game and i m erroring
uh oh
what is happerning
OHHHHHHH
if im using a tarot
ill be using a tarot
im so dumb
does G.STATE == PLAY_TAROT when you use a tarot from the shop?
how do i check if im in a shop when im using a tarot?
can handsize ever be 0?
if your handsize is 0 you die i think
only if you join a round
if you have cards in hand and handsize goes to 0 or lower then you can still survive
how do i tell if you used a tarot from a shop
How do I get a single image for a new blind in? If I load it into an Atlas, it's ignored/the main sheet is used. Cryptid's approach crashes for me - I also don't want to do an anaimation (yet).
problem, i hover over dec and then error
do you have an assets folder with a 1x and 2x folder in them?
cryptid is hard to just copy and paste
how did you delete your atlas?
to i have to say my edition is a stone card?
morning balatrochat
why won't it allow me to set probability when ending a round?
--Blank
key = "Blank",
atlas = "Tatatro",
pos = {x = 5, y = 2},
unlocked = true,
discovered = true,
--Has no suit or rank
no_suit = true,
no_rank = true,
--goes over card
replace_base_card = true,
--scores 0 chips
bonus = 0,
bonus_chips = 0,
loc_txt = {
name = "Blank",
text = {"Scores {C:attention}0{} chips", "No rank or suit"}
}
}```is something wrong here?
idk what bonus is
hmm
i just put it to 0
could i use this?
sure
ty!
im about to do some major testing (3)
same, might even test adding some extra code
to make smth like the glass card
also why is lobocorp music in the example mods?
ok, so this puts an error when i hover over deckG.E_MANAGER:add_event(Event({trigger = 'after',delay = 0.3,func = function() card_eval_status_text(self,"extra",nil,nil,nil,{message = "Blank!", colour = G.C.PURPLE}) local LockedSpawn = Card(G.play.T.x + G.play.T.w/2, G.play.T.y, G.CARD_W, G.CARD_H, front, G.P_CENTERS.m_TGTM_Blank, {playing_card = G.playing_card}) LockedSpawn:add_to_deck() G.E_MANAGER:add_event(Event({trigger = 'after',delay = 0.3,func = function() G.deck:emplace(LockedSpawn, nil, false) table.insert(G.playing_cards, LockedSpawn) return true end })) return true end }))
Delete?
hover over what deck?
is there SMODS documentation for creating stickers?
ooh cool
doesn't seem like it
ok i fixed it
?
i was still working on setting up the mod to test
lol
i really have to make a small empty mod
make sure your atlas is set!
how do you pick a random enhanced card (seal, edition or enhancement)
from the deck
ya, it was the pos that i forgot lol
Maybe I should upload the docs I have to the wiki 🤔
Probably loop through the deck adding the ones you find to a table and then grabbing a pseudorandom element from the table
is there anywhere to find work in progress docs for pages
trying to add stickers but the mods i'm looking at that add stickers are confusing me lol
waiter waiter more ui documentation
waiter waiter more card: documentation
chat maybe i'm a boomer but help me debug thing gog damn ui tables thing
loc_def = function(self, info_queue, card)
local color = G.GAME.BALATROSTUCK.strife_assignment == "Unassigned" and G.C.JOKER_GREY or G.C.SPECIBUS
return {
main_end = {
n = G.UIT.C,
config = {align = "bm", minh = 0.45},
nodes = {
{
n = G.UIT.C,
config = {ref_table = self, align = "m", colour = color, r = 0.05, padding = 0.08},
nodes = {
{
n = G.UIT.T,
config = {
ref_table = G.GAME.BALATROSTUCK,
ref_value = "strife_assignment",
colour = G.C.UI.TEXT_LIGHT,
scale = 0.32 * 0.8
}
}
}
}
}
}
}
end,
it used to show up as
now my badge is gone
its a specific UI object i want to render
this code used to work in April but after SMODS did yet more breaking changes it doesnt want to work
this different custom UI object works though
so i am genuinely confused why this one works but the other one doesnt
double wrapping like in example above doesnt seem to do anything for me
there are still issues
the joker itself works fyi
but this doesnt want to
did y'all change something that makes statements like these invalid?
loc_vars not loc_def, no?
.................
damn you bad code
trying to make a card talk
problem: i dont know how to do any ui shit
your row[#row+1] = {n=G.UIT.R, config={align = "cl"}, nodes=v} line win't work because v isn't a ui node
how do i loop throught geck
for loop
iterator functions
is there a way to move something from a mod (ex. joker) to a menu in the others tab in collection?
how do i check if a card is enhanced in any way? (seal, edition, enhancement)
why would you want to do this for one
all this is found inside card.ability
but just check drivers license code
as in the vanilla joker
v.config.center ~= G.P_CENTERS.c_base does this look for all types?
idk check drivers license code
doenst drovers licence only cherck enhancements? and not editions or seals?
not specifically for a joker, but a mechanic in my mod uses stickers as a base but i want them to be in a separate menu and not under stickers
okay cool
uh
hang on one sec
okay
hook the function that creates the uibox with all the other tab buttons
insert your own button in there that will call the function to create your collection ui
copy the code from the function that creates the sticker collection ui and tweak that for whatever you have going on
all these functions are under smth like "your_collection_foo" and "create_UIBox_your_collection_bar"
you can refer to https://github.com/cg-223/toomanyjokers/tree/cacacd32153693b9b6e22ab14d44195e176c5dc0 for some things
alright thanks, i'll get to working on it when i can
remove it from it's cardarea and set the card.T.x to half of whatever the width of the room is and similar for card.T.y (check code that creates UIs, it probably uses similar calculations somewhere)
alternatively
look at the vanilla code for using a tarot and copy that
can i check what card area a card is?
Card.area
wdym by remove it from its card area? would that be :emplace?
CardArea:remove_from_area or something similar. just search for "CardArea:" in the cardarea.lua source file and use whichever function looks right
but again
what type of aligns are there for text
same as anything else?
what are the values and what is CM?
first char is vertical alignment, second is horizontal
c = center
m = middle
t = top, b = bottom, l = left, r = right, etc
well not etc that's it
oh ok thanks
it is?
oh nice
i want to make an enhanced card come out and get purified!
time to get an error!
i called it!
crying
v.area:remove()
v.T.x = G.play.T.x + G.play.T.w/2
v.T.y = G.play.T.y + G.play.T.h/2```hmm.....
unless im mistaken you're straight up getting rid of G.play?
what
that's what v.area:remove() would do
that would subsequently make G.play nil which explains the error (i assume it's "attempt to index a nil value" i haven't downloaded the log)
yep
are you sure this is the right log this seems like an unrelated error
nope its the right one
whats odd
maybe removing g.play did something
hmm.....
the deck is definilty in the center
oh i moved the card area not the card
what are you trying to do
move a playing card to the center of the screen to do something
grab a card from deck/hand
look at the use consumable code
iiirc you just emplace it in in G.play and then move it back somewhere else afterwards
ive said that twice and he hasn't acknowledged it yet so who knows
WHY
what is the ui code you have?
but yeah the list is not working thats for sure
where are you calling this?
if you emplace a card from the deck to G.play, how do you flip the card? im trying Card:flip, but its not working
but Yeah i have no clue why it is not working
nvm found my error got it working
is there any mod that has the example fo a hover effect for a button
forgot that stickers can't be applied to playing cards
welp time to see if i can get a lovely patch to work lol
Cryptid adds a system for that
Sticker code is really scuffed
https://github.com/MathIsFun0/Cryptid/blob/refactor/lib/modifiers.lua
this is from a WIP rewrite, it’s grouped together more so hopefully most of the sticker logic should be in this file, a lot of it is also in lovely patches
And some of it might be in the “old” folder which wasn’t ported over to the rewrite yet
WHY IS IT OFF CENTER
I think there’s a create_card override that lets them spawn, and a lot of the lovely patches make them functional
also why wont the gap work
i'll take a look, thanks!
when i move a card from the deck and emplace it in G.play, it always flipped, how do i stop that
G.E_MANAGER:add_event(Event({trigger = 'after',delay = 0.3,func = function()
v:flip()
return true end }))
end```
draw_card has a stay_flipped param iirc
how do i add description text to a blind
SMODS.Blind{
key = 'jimbofan',
mult = 2,
loc_txt = {
name = 'Jimbo Fan',
text = { 'putting anything in here crashes the game' },
}
}
im not drawing card, im emplacing straight from deck
oops
happened after playing a card
yeah i'm stuck trying to get the stickers to work 💀 first time modding lol
@mellow sable sorry for disturbing you, but is it possible to point out what functions/patches make the custom stickers work? i'm new to modding balatro so i'm lost in the source code lol
Doing that would take quite a while, and it’s relatively complex
So unfortunately I just don’t really have time to give you a deep overview
But basically here’s what we did to implement these:
- patch the card generating function to let playing cards get stickers naturally
- patch every way a card can be altered or destroyed to account for Eternal (this one is annoying to do)
- add something at the end of round that calculates perishable and rental effects for playing cards (in Cryptid, perishable applies for cards in the entire deck and rental applies for cards held in hand)
are all of the changes in the rewrite branch? or are some not added yet
actually just thought, can't i just add a way to calculate the custom stickers only? and add them through a modded consumable
hes hungy
he is
card triggers the calculate in the cards inside that table
alrighto
picky eater
i always love when jokers talk
Does a perishable_compat exist?
yes
yea
okay man 😦
random question, how do i add functionality to my enhancement?
jsut the same as a joker?
prob right
yea, i got the code base struckture from someone, am now trying to add my own code to create some code to test with
still WIP but i can see Eremel is working on it! (we love eremel) https://github.com/Steamopollys/Steamodded/wiki/11.-SMODS.Enhancement-[wip]
YEAHHHHH
finally 😭
cant wait
does +0.25x every 4 queens or 8s discarded sound good
i'd go with 4 of queens
It’s pretty complete tbh, just a few things that need adjusting in the code like the undiscovered and locked stuff, the general structure and what you can do should be covered
You can also look at ortalab for some examples, there’s 8 enhancements in there
i am making a little example mod for my self with all the parameters and some extra code
if anyone wants it can be put in the example mods if thats ok
did that already
phew questions:
- whats the difference between "mult", "h_x_mult" & "h_mult", "h_x_mult"
- same thing with "bonus" & "bonus_chips"
- what does weight do? some kind of rarity? i can see its some kind of way to diffirencate between objects?
h_ is mult/xmult in hand
bonus_chips is the hiker effect though stone cards also use this iirc
weight is how often it appears when rolling for a random one
1 being the default
wasn't hiker like perma_chips?, ye "perma_bonus"
ooh so like h(and)_mult, i get it
srry
iirc the only difference between bonus and bonus_chips is how they’re displayed in the ui box,
And default weight is 5
yea, i read
hmm alr, but they both work then?
Yeah I’m pretty sure they do exactly the same thing
seems like they do
But one of them combines with the scoring of the regular rank and one is separate
Iirc
hmm, i'll see what happens
both seems to be base + bonus(_chips)
also just: chips = 10, seems to also work
where can i suggest my exaple stone enhancement >_>
i have litterally bairly any idea how to use github ._.
What do you want to do?
just made an exaple-mod
for enhancement to go along with the wiki
(nothing too special, just stone but using the SMODS)
I think it's probably better to just direct people to mods with them in so you can see what they can do
alr then
i feel like instead of adding its acutally multiplying the chance? and when ending shop it is actually doing "-" normally ._.
How’s Enhancement support nowadays
pretty functional i think, though docs are still wip
I've started playing around mod development, and from what I've seen folks' mod collections seem to be big long files
Is there no way of using require or similar to break up the codebase?
Enhancements are as functional as they’ve always been it’s just people understand them a bit better now
you can import other files but it's eh
Mathguy said it in steamodded form but it's sad that the rarity API breaks consumable raritys
Is it just pools being broken or the rarity display for consumables?
That's extremely easy to fix
one sec
At least I think?
ok this is WAAAAAAAAY too big
1 is basically equivalent to 100% chance to appear (before affected by other weights)
7,500% chance of common?
Also, it was switched to weight (no judge though, the doc update for that I made hadn't been posted yet).
Ah, figured it out why it wasn't working for me, needed to specify the Mods folder require('Mods/[mod-name]/path/to/nested/file')
k, why isn't it auto-normalized anymore btw
It is?
what?
Wait does it?
it used to
bonus blinds pool worked for a while and i haven't changed it
im guessng rarity API changed something and broke it
Rarities are fine, I think it's just another oversight with string/int rarity conversion.
Yup
I mean, I’m not sure if calculation support was built-in at the time
Are they now?
If you switch all the bonus blind cards to integer rarity matching their equivalent, and changes set_badges to account for this the bug is fixed.
it was always built in, it's just different to every other object
does anyone know of a way to re-parse loc_txt.text? Im changing it but i can seem to get the changes to show up
how so?
What are you trying to accomplish?
change the descripton of a joker
you can always just define the line of the description you want to change as {1} and use loc_vars for that
coulda sworn there was a process_loc_txt function somewhere
could you just call that again
are you cycling between a couple of descriptions or is it really really dynamic text?
im just appending some more text after that current description
and ill try that, i just saw it in smods code
you can return a different key in loc_vars, and the description and name will change to fit the new key
or you can do the reparse thing but that's not pretty
what do you mean by return different key
That should be doable using variables
Under what conditions does it change?
as i said before that what i was doing but i cant format it
maybe victin has a better solution but what I have done in the past is have 2 localization entries:
my_joker = {
name = "My Joker",
text = { "Version one" }
},
my_joker_alt = {
name = "My Joker",
text = { "Version two" }
}
and in the actual code:
SMODS.Joker{
...,
loc_vars = function(self)
local key = self.key .. (self.config.extra.enabled and "_alt" or "")
local vars = { self.config.chips }
return { key = key, vars = vars }
end
}
I've made this before
It works automatically with the name of the cards you use, IIRC
so even if you used, say, a modded Planet, it would show the right now
I don't remember what if the card had the same name as a different one, but I think it might recognize them as different
I'm pretty sure I did test chaging languages and nothing broke
I have other Jokers that display text or don't based on whether you're looking at them in the collection or not
before i just had the text in a loc variable and called it in the description with #4#. If i did something like {C:mult}text{} the color wouldnt work
I don't know if this has changed as it's been a while since I updated Steamodded, but this was how I did it
The important part is that I generate a row node containing the text node I want
Each row node is a line
it doesn't have any return per se, but it sends the effects table to the object that you can modify]
I'm not sure I follow
I think what you're saying covers pre-programmed scoring steps
what about arbitrary behaviour within said steps?
you can do whatever you like within your calculate function if that's what you're asking
Does it receive context?
yes
There's also a column node holding all the rows. I'm not sure why that's needed but presumably it is since it works
So basically, you have a column of rows (lines) and each row contains text
It's important to note that if you want the text to "be different" it needs to be different text nodes
So black text, blue text, and black text are three text nodes
iirc you can do this inside your loc_vars function and return it as main_end = X in your return table
That's what the first screenshot is
I just separated it in a different function for ease of reading
oh yes I am dumb and mmissed that 😆
I also use this format because I used it for other Jokers
Some Jokers might have similar main_ends
Hence I only need to define it for once
For example
@humble gale in case you missed it
So I'm trying to do something for Archived. I wanna make it so that when I use a planet card, instead of the regular level up, it runs a custom level up where it still adds the normal level but uses custom chip/mult values that I put in the configure of said card. Is that possible?
yeah i saw it
does that help you
is config.text where the "{None}" is held?
Something like this in a sense (minus whatever code I need to do for the card)
In terms of what you see, yes. You can see that I used the function localize, so regardless of language the text "None" will be translated appropriately
by "what you see" I meant the player
Can you send me the file? I might be able to understand it better if I see the whole joker
Dm is fine
It's too large for sending in a message so
Thx
Maybe I could've looked for an easier example but this was the first one I thought of
most others only use a single line IIRC
what would a Q in consumable font look like
Coming back after a few months and trying to get back into a mod I was working on, local config = SMODS.current_mod.config appears to now be nil, though, did something about the config stuff change?
tried this and the text wont show up. are the 2 entries inside loc_txt?
I mean, Victin's main_end looks cleaner than what I had
it isnt what i needed when i looked at it
oh okay
plus with this it can change the name and for some jokers that helps
No, you will need a localization file if you want to change to a different key
Would anyone who knows how to code in lovely be willing to assist me with this? I do not, but am willing to learn through this thing I am doing for a community balatro mod.
(like speaker box seems easy, i just dont know how to create a custom joker obj or anything of the sort
also any balance concerns would be important to note(under/overpoweredness, etc
In lovely and not through Steamodded's API?
i may be dumb gebura pfp
There should be an example mod in Steamodded's example mods, but I made it a few months ago and I'm only recently coming back, so there is a chance some things in it could be outdated, but probably not. Anything that's not clear, throw here, and I or someone else might help out, I'll probably start reading this channel again since I'm getting back into things.
VIVID STASISSSSSSSSSS
most of these dont seem too difficult to do
yeah
making reworks rq
would just be tedious to get art work done
artwork is a later proposition
(plus A-saph has already made some card art for their own balatro mod)
cool
is there a dedicated thread for this in The Server
shrug
i'd assume the ones i've seen from a-saph/fiddy/ion are from a different server then
you can make a wip post in #1209506514763522108 if youd like
ic
thats what a lot of mod creators do anyways
It depends on how exactly you want Allison to work. If you want them to have all suits that's easy. If you want them all to be actually Wild I think that's hard. If you want cards without Enhancements to be Wild… maybe but it wouldn't work with other mods AFAIK
i was actually planning on changing allison to be
all cards played turn into the suit of the highest unplayed card value
Bear Creek Seems doable. A bit annoying in my opinion but it's not my mod. I guess it's technially a Rare effect since it doesn't trigger during card calculation despite caring about card position
and then a buff to cards not in the highest card value
In which case it's a bit too good?
I'm not sure if Cheryl warrants Legendary status, but it's neat
Compared to existing Rares which require a specific hand to grant xMult
Like the Duo
Which requires a Pair and grants 2x
Cheryl/Jammy NEEDS to be legendary for status reasons
i think it's pretty possible! you just have to patch that into the is_suit() function
That's the first thing I said
oh
If you want them to have all suits that's easy.
it would work with other mods though im pretty sure
i see
fair
fair point
you could maybe regurgitate the midas mask code or something but yeah fair
wait allison + rough gem is just Tori
I mean if you want to convert Enhancements that's easy too
It's only doing multiple simultaneously that's tricky
If you just want to replicate the effect, sure
If you want it to be both, then it's doesn't work by default, and it won't work with other mods
this feels pedantic
Cycle Reset could probably be Common IMO. I made a similar Joker which was Common
It is, but this is how game rules and programming works
If I say "sure it's easy" and they want to make it count as both, then they'll later think I lied or was wrong
Emission I think could be Common too. Eri might be too strong of a Legendary, but it's also very niche. Jade seems to be doing too much with both effects; I'd keep one, or move it to Rare—and even then probably nerf the Chips as well
I'm not sure if I interpreted Movator correctly, but it seems insanely broken
Okay then it doesn't sound too bad
My issue with Obama is that both sides of the effect impact scoring
I designed a few similar Jokers but I tried to make them impact different things
its also a meme joker so idrc lol
Like Champion's Belt
I also made The Champion, which grants $9 per Round but makes the Blind requirement bigger
Plain Rice is interesting, except you already don't want to add cards to your deck, so punishing it seems pointless. Booster Packs in general, a bit more interesting I guess, but not so much
Storyteller is interesting, because it can be very strong, but circunstantial. The best target is probably Blueprint which is a bit boring
I assumed it'd include Jokers, and meant cards in the shop, and is just an early game common card like ice cream.
^
Tsuki is maybe too weak of a Legendary
Ah then it's more interesting
Maybe tweak the numbers
Maybe make it give you a Soul Card on being sold without saying anything in the description, so it's not a complete disappointment when you pull it from a soul card.
It's also very weak lol
I was so concerned about the design I didn't even evaluate the numbers
which card?
Probably obama.
This might be outdated but it sounds like a good place to start. There's some unnecessary stuff or bad practices here as it was my first mod
@true jasper I accidentally changed channels when replying to my own message
how to do make a joker have a picture
This is 0.9.8 code, I really can't recommend using this as a reference. Why not look through Steamodded's example mods?
https://github.com/Steamopollys/Steamodded/tree/main/example_mods/Mods
hey; is there something in steamodded that checks if your playing a certain deck
Base game has a check for that, check any mods that uses CardSleeves combos
does the ui engine let you overlap nodes like this? (mspaint rendition)
(G.UIT.R nodes with G.UIT.T on top of an G.UIT.O node)
I think as long as they have different roots it should be okay
ah
