#💻・modding-dev
1 messages · Page 512 of 1
I don't speak new orleans
It is not a parameter in modify hand function sadly
use blind calculate dawg
any reason this lil fella causes a crash?
SMODS.Joker:take_ownership('joker',
{
config = {
extra = {
mult = 4,
enlighten = 2
},
},
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.mult, card.ability.extra.enlighten } }
end,
calculate = function(self, card, context)
card.calculate_joker(context)
end
}
)
Taking ownership of a joker needs the parameters that exist with it
What is calculate_joker why not regular calculate function?
Remove the calculate function.
Dude…
👋
for some context, I just want to add functionality to a joker but also have the joker function as before (think, like, adding a trigger counter). easiest way to do that afaik is to run calculate_joker to trigger the original effect and then have the new effect follow below. just trying to get a hold of taking ownership before making changes
Yes, remove the calculate function.
then how do i trigger a custom effect
What does enlighten do? I think that will help solve which one is better having both is crashing it calculate_joker is good for using strictly context of that joker
i want it to:
- run normal effect
- increment a counter, and do something when the counter == enlighten (or enlighten == 0? still working on the logic there)
each joker has an upgraded (enlightened) version that the existing joker turns into when a requirement is met. the base joker just being rounds held. nowhere near knowing how that will work yet, just working in baby steps
It’s hard to piece together something truthfully due to the ability not thought out. If you wanna example of why it might help knowing full effect I hade a joker where it has a ability if 25 jokers sold then it makes a random legendary one
I would heavily suggest finalizing ur idea without that idk how to help sorry man
heard, thanks for trying!
Yea ofc I would decide if you want enlighten to be this keyword for jokers where when you beat blinds with one hand or boosters bought or whatever this way you can have then a output or reward which will completly make it able to be build for what you want Rn
but if enlightened is unused atm why is it crashing? it should just be ignored, unless im missing something
first time kinda making a joker, please give pointers on if its all weird and wonky or something 😭
You’re using two calculate functions as Something said before this will crash it
OH. so calculate and calculate_joker are both calculate functions. calculate_joker is from the base source code so i assumed it wouldnt interfere. sorry, must have missed that
Think of take ownership where anything you replace is replaced. Anything left out parameters wise stays the same 😉
Good Analogy would be like taking ur car in for only its engine but ur code Rn has the mechanic thinking it needs tires, engines wheels everything!
uhhh sanity check, what's the variable that holds the current hand count?
G.GAME.current_round.hands_left?
((card.ability.extra.route == 0 and '{C:inactive}Neutral') or card.ability.extra.route == 1 and '{C:chips}Pacifist') or card.ability.extra.route == 2 and '{C:mult}Genocide'
would there be any way to make smth like this work
LMAO
i need to pattern recognition this
is that fucking notepad.
my goat notepad
also is there a way to have a joker read from a singular image file for its icon
i dont want to have to update every joker with new positions in my atlas every time i make new jokers
I wish I knew because my brain just played a scenario where every time he adds an image its always on the 0 0 pos sliding everything one over instead of just adding it to the end
I really hope so as well
Yes, I do this
There's no required size of atlases
devilish challenge lol
why does this do nothing (seal)
context.cardarea not cardarea
am i dumb ? i tried many things but i don't remember how to make the joker play a message when added to deck
SMODS.calculate_effect({message = "message"}, card)
is it a good idea to have multiple spritesheets for each update so i dont have to update the spritesheet every time
where do i put it T-T
?
Where you want the message.
one of my joker, add 2 slot of joker and i want the joker to play a message once when added to deck
If you mean the same thing as before, you can arrange your atlases literally however works best for you
remove_from_deck(self, card, false) { G.jokers.config.card_limit = G.jokers.config.card_limit - card.ability.extra.acard_limit_old }
why does this have an error (starting from the first card_limit, it says "missed symbol '}' ")
eh fair
then you miss a } a the end or near the end
its really not
that part's just in the normal SMODS.Joker part
the line after closes it with }
yhi figured so but check near it maybe you missed on
if i remove it the error goes away
hey does someone know how i can add the blueprint / brainstorm compatability label to one of my jokers?
i'ts just cosmetics but i'll get the compatible thing under bluprints/brainstorms desc
Doesn't this just make my joker copyable by Blueprint?
no
it just makes it say that its compatible
you need to change the actual code to make it copyable
(it also works for bainstoerm)
No, all jokers are copyable by default.
i just want the visual label to be in my joker description
OH I GET IT
oh thank you
here's the blueprint code from there
key = "blueprint",
unlocked = false,
blueprint_compat = true,
rarity = 3,
cost = 10,
pos = { x = 0, y = 3 },
loc_vars = function(self, info_queue, card)
if card.area and card.area == G.jokers then
local other_joker
for i = 1, #G.jokers.cards do
if G.jokers.cards[i] == card then other_joker = G.jokers.cards[i + 1] end
end
local compatible = other_joker and other_joker ~= card and other_joker.config.center.blueprint_compat
main_end = {
{
n = G.UIT.C,
config = { align = "bm", minh = 0.4 },
nodes = {
{
n = G.UIT.C,
config = { ref_table = card, align = "m", colour = compatible and mix_colours(G.C.GREEN, G.C.JOKER_GREY, 0.8) or mix_colours(G.C.RED, G.C.JOKER_GREY, 0.8), r = 0.05, padding = 0.06 },
nodes = {
{ n = G.UIT.T, config = { text = ' ' .. localize('k_' .. (compatible and 'compatible' or 'incompatible')) .. ' ', colour = G.C.UI.TEXT_LIGHT, scale = 0.32 * 0.8 } },
}
}
}
}
}
return { main_end = main_end }
end
end,
calculate = function(self, card, context)
local other_joker = nil
for i = 1, #G.jokers.cards do
if G.jokers.cards[i] == card then other_joker = G.jokers.cards[i + 1] end
end
return SMODS.blueprint_effect(card, other_joker, context)
end,
check_for_unlock = function(self, args)
return args.type == 'win_custom'
end
}```
bumnpnp
Yes, I linked to that line.
bump :P
Remove the {} around the contents of the function.
Then you would put it in add_to_deck
doesnt work
oh im stupid
i thoug6i had enough time
remove_from_deck = function(self, card, from_debuff)
G.jokers.config.card_limit = G.jokers.config.card_limit - card.ability.extra.acard_limit_old
end
idk i just replaced it with false cuz i dont want it to happen on debuff
No, that means it was removed from deck because it was debuffed.
where do i start if i want to make a mod
cool thanks
how do i make it not
if from_debuff then return nil end
ty
is there a specific atlas for vouchers ?
how do i run a function only one time when the game loads?
how do you put in a loc_txt thingy
What do you mean?
i wanna put custom sprite for my voucher, do i put it in my consumable sprite chart or i have to create a new file for it a thus find it with SMODS.atlas and stuff
send joker code
You can put it on any atlas as long as the sprite size is the same.
oke so i just shove it on the tarot atlas
joker appears with no name or dexcription
Yes.
remove the }, after sylver
👌
got it working
SMODS.Joker{
key = 'sylver'
loc_txt = {
name = 'sylver',
text = {
'does nothing yet',
}
}
atlas = 'Jokers'
pox = {x = 0, y = 0}
}
nice
thanks
@charred rain after you put that in... please rclick and format
what
e
just copy that over the joker
the text = (the description) was outside of loc_txt because you put a } to close loc_txt after name
yw
chat i'm in the video game lets goo
no way
he's using reset for seed in yahimod
oh and also he's in the game which is cool
i didnt feel like downloading a debug mod so its the only way i could think of summoning the thing
you can also just like
have fun with it somtims
Ok so guys i read the files and im installing steam modded and Github
To test out the balatro mod
What are all the assets needed
?
That way im sure i have everything but the Json
if cryptid is installed, can i juse use "cry_epic" as a rarity in my joker or does that not work
Yes, you can.
niceeee
How do I use {V:something} to color the text as a selected suit?
In loc_vars it would be return {vars = {colours = {G.C.SUITS[suit]}}}
And then it would be {V:1}
Is it possible to re-trigger every joker that the player has?
how?
if context.retrigger_joker_check then return {repetitions = 1} end if you have it enabled.
how do i make a pool default to a card other than Joker
(Joker as in the default Joker)
thanks
there's a default field
can i see
SMODS.ObjectType {
key = 'cat_shop',
default = 'kat',
cards = {
j_lucky_cat = true,
}
}
this is my pool
i can send the card im using to summon from
it has to be the full key
context.using_consumeable
can i check what consumable it is in particular with that somehow
context.consumeable
then i assume i could so something like
if context.using_consumeable and context.consumeable == "c_tmod_boxofcats" then
x
end
rite?
No, if context.using_consumeable and context.consumeable.config.center.key == "c_tmod_boxofcats"
hello, how can i check if the played hand wins the round?
i have a joker which rewards you if you win the round with n number of hands left
I am using context if context.final_scoring_step and G.GAME.blind.chips <= G.GAME.chips * mult then
but it doesn't consistently trigger whenever you win the round
just check for the remaining hands in context.end_of_round
your hands dont get reset until the shop
Great, thank you!
if you dont add context.main_eval it loops the effect i think
Small question: why the UIbox I made in config doesn't have the small black shade in the lower part and instead it has those white angles?
Should I specify the outline?
alright
I tried like this but the result is the same:
shrug did you try to color the ROOT node instead
{n = G.UIT.ROOT, config = {r = 0.1, minw = 5, align = "cm", padding = 0.15, colour = G.C.BLACK}, nodes = {
try this
aight
is there a way to check if a card is from a mod as a context or smth
actually even better
is there a way to check if a card has no pools
if card.config.center.mod and card.config.center.mod.id == "modid"
if not (card.config.center.pools and next(card.config.center.pools))
well, now it works (even if it's the same color as it's child node)
I'm going to search the name of the darker black color rn
is there a way to make multiple copies of the same joker not all do something
such as only one copy will do that part
check if the joker has multiple copies, if it does then make it so it only works when its on the leftmost position
ah that makes sense
also i just got deja vu for this lol thats funny
hey y'all, is there a way to shorten a description box/ignore a line if it's "blank"? right now i have the extra line at the end that's basically a variable string, so there's this empty space if the variable is empty
use main_end to add ui nodes or key to switch localization keys
Can consumables have souls?
Yes.
can i do something like
if G.jokers.cards[2] == 'j_tmod_catofboxes' then
x
end
-# the SOUL exists yk
G.jokers.cards[2].config.center.key == "j_tmod_catofboxes'
ty
if my_pos and G.jokers.cards[my_pos - i].config.center.key == "j_tmod_catofboxes" and not card then
stupid = false
break
end
so would this check if
the jokers before my_pos are not catofboxes and if they aren't this card
then it sets stupid to false
just makin sure
No, because card should always exist.
how do i check if its not this card (the one running the code)
if G.jokers.cards[my_pos - i] ~= card?
would that not check
the jokers before my_pos are not a card
No, that checks if the jokers are not the card that is calculating.
so is card just any card or the card that is running code
yeah 😈
why...
reminds me of when i used notepad (2 days ago)
bad times (2 days ago)
i really hated (2 days ago)
if my_pos and G.jokers.cards[my_pos - i].config.center.key == "j_tmod_catofboxes" and not card then
why does this index a nil value
Show the full code.
for i = 1, #G.jokers.cards do
if my_pos == 1 then
stupid = true
break
end
-- next line indexes a nil value
if my_pos and G.jokers.cards[my_pos - i].config.center.key == "j_tmod_catofboxes" and not card then
stupid = false
break
end
if i == my_pos then
stupid = true
break
end
end
(my_pos should be defined as a number and stupid is defined as nil)
is there a mult equivalent of hand_chips?
because hand_mult gives me a squiggly so its obviously not happy with it
I think it might just be mult
mult
so if i put idk temp_var = mult it will have the mult scored but if i return mult = temp_var it will score that as mult
yes
I think it would set the mult to that value
well ill give it a shot and i shall report back
i believe thats what happens if you dont put it into a return {}
bump
Can you show the full code tho
is there like a list of things talisman changes to tables?
what values are turned into bignum
so yeah it tries to index nil on that line
for example G.GAME.dollars is changed into a table
you probably should have said what values are bignum'd
it sounded good enough in my head
most notable ones are ante, round count, dollars, i THINK hands and discards, as well as blind chip requirements
pokerhand values like chips mult and levels too iirc
someone should make a talisman wiki
weirdly i only needed to use to_big once in my mod
i guess i just dont touch global values
nope it works fine
Hey so i’m making a factorial mult function and when i call it it
return{xmult=sxeif.fact(card.ability.extra.mult)}
It prints an error that i’m trying to preform arithmetic on a string
Even tho card.ability.extra.mult is set to 15 in config
whats the crash and the code for the function
Its just a normal factorial function
I’m using an( x )variable in params
Error is attempt to preform arithmetic on a string
what's the full crash log and the full code for the function
1 sec
like, I dont know where the error is if you paraphrase lol
function sxeif.fact(x) if x == 0 or x == 1 then return 1 else return x* sxeif.fact(x- 1) end end
yeah i would need to see the log
This gives me an idea
I'm planning on messing around with the built-in error handling stuff
Would it be possible to catch a specific style of error (like comparing a number to a table from not using to_big) and like
Retry the calculation somehow (or at least warn about talisman compatibility not being setup properly in the crash)
i found the error nvm
Wow now i get a different crash message
I figured it out
Finally
How would i go to make my own return ?
Like
Return {
xfact=value}
hook/patch SMODS.calculate_individual_effect
Undocumented
yeah its an internal function
colour=G.C.TAROT,
xmult_messsage=tostring(card.ability.extra.mult).."!",
xmult = sxeif.fact(card.ability.extra.mult),
message_card=card,
} ```
i see
this sadly doesn't return a custom xmult message
it doesnt crash for fields that are not listed, theyre just not checked
colour=G.C.RED,
xmult_message=tostring(card.ability.extra.mult).."!",
xmult = sxeif.fact(card.ability.extra.mult),
message_card=card,
}```
custom xmult message
Why?
I mean compared to just returning a message
Genuinely curious, I might be missing smth haha
if i return a message the xmult message will still appear
i'm using a factorial mult , i want to replace the mult value with just x! in message display
use either xmult_mod over xmult or remove_default_message
-# was that what it was called
remove_default_message=true ?
also for xmult message it expects a table
if you're going that route
does it?
i see
xmult_message = { message = "whatever", colour = G.C.WHATEVER }
oh yeah
expects a table filled with parameters you would set for an extra table for card_eval_status_text yeah
did you know all message does is encapsulate the entire return table as an extra table for that
i did know this
thats why you can do stuff like volume and instant
Big Message doesn't want you to change it
is this ethical
Ethical yes
Crazy yes
Good schmorning chat
mornign dil
Wave emoji
hi dilly
I dont know if I desire to exist rn but I couldn't fall back asleep
Hi N how are you bestie
i dont know
hi dilly!
I will make you feel
ok so i have a joker that swaps places with another joker when the play hand button is presesd; but the issue is that it sometimes (just outta nowhere. might be cuz of blueprint/brainstorm) literally crashes the game. no i don't get any error message the game just freezes up and i have to close it
you can try adding and not context.blueprint
seems to work so far
what text editor is that...
notepad
is notepad becoming the meta or something 😭
I hope tf not
same.
i code in a napkin
no way like brainstorm
Bro isn't keeping up to date with the Balatro modding any% runs 🥀
Is praying your code work a common thing when developing lua
Yes
especially when you are coding ui, yes
you pray that its in the exact location you want it to be, everytime
Funny i am coding ui
same
i love ui
im currently trying to make info_queues' names support stylized strings rn
i might cry before i get this working :3
bepis are you just fixing all the pissdrawer problems
also can you make them work in the round eval screen once youre done with that
I love ui (kill me)
like calc_dollar_bonus
I’m having your code on second monitor and currently having the philosophical pose
i have a custom patch so my jokers get their names colored in that
no it also uses name_text
i hope you arent talking about bsr's code because its literally hurting ME too
im guessing the process is the same but with different defaults
mhm
spaces instead of tab key jumpscare
not even kidding when i say this is one of the main reasons i didnt want to continue working on bsr before 😭
"damn wtf WAS i doing"
please get visual studio code/codium
🥀
no, you press the tab key and it does 4 spaces
o
instead of a tab
bepous
hi dilly
hi
anyways back to me digging through at least 4 functions to figure out how they are doing desc_nodes.name
sob
is that the singular form of bepis
lmao 😭
yes
also wdym
Attempt 50
how would i spawn something from a custom pool?
SMODS.add_card { set = "poolkey", area = area }
like, checking where they run generate_card_ui, see what they are doing with desc_nodes.name, stuff
oh, for info_queues it's just this
and then it gets passed here
I had this when I read back through some of my previous code
Peak inefficiency, it was genuinely awful in places
the secret is to remain inefficient
oh shit thanks 😭
thusly never discovering anything bad
glad to be of help
Weh
wah!
weh?????? like like like like like
Wehhhhhhh
Weh is a very important emotion to me
this is the weh
I have no idea what that unauthorized fucking thing is
bro just look up ss14 weh and you'll get it
how can i make a joker that modify value of another joker?
edit the ability
Don't call me bro please
Oh I see, space station 14
hi @chrome widget
Hi Dilly!!!
how is the goat of goats
Doing alright, trudging through finishing some challenges
i was just messin with the https stuff for an idea but ill have to figure out what i evne want to do with it
make it
Oooo cool!! How did your computer specs polling end up?
_G.loadstring = function(text, chunkName)
local result = o_loadstring(text,chunkName)
local function extract_params(func_line)
local param_str = func_line:match("function%s*%((.-)%)")
if not param_str then
param_str = func_line:match("return%s*function%s*%((.-)%)")
end
local params = {}
if param_str then
for param in param_str:gmatch("[^,%s]+") do
table.insert(params, param)
end
end
return params
end
local function wrap_result(result, text)
local t_result = result
return function(self,...)
--o_print("code:",text)
local args = {...}
if self ~= nil then
args = {self,...}
end
--o_print("called wrapped result?")
local return_value
if unpack == nil then unpack=o_unpack end
if type == nil then type=o_type end
if t_result then
return_value = t_result(o_unpack(args))
end
if type(return_value) == "function" then
print("new code:",text)
SMODS.SourcedFunction:add_source(return_value, text, extract_params(text))
return_value = wrap_result(return_value)
end
--o_print("got return value I guess?")
--o_print("return value:",return_value)
return return_value
end
end
SMODS.SourcedFunction:add_source(result, text, extract_params(text))
return wrap_result(result, text)
end
PLEASE HELP ME
ITS SETTING THE SOURCE TO _G.LOADSTRING WHEN A FUNCTION THAT RETURNS A FUNCTION IS CALLED
PLEASE 😭
quick ask if anybody in here is indian
someone is indian programmer😭
things appear to be on the up and up
i still havent gotten around to the cpu part mostly because of laziness admittedly
after moving fridge to not be in all of G it made it so i was no longer going to 35 fps when i had it being read as joker eval
so perf wise im chillin there now
i was trying to use the https stuff to pull a random game and its wr but i keep failing the game fetching for some reason, i can pull the record of an indiv game but i assume im just doing something wrong which ill look into later
Mm I see
ill get dere eventually :D
im not sure if i want to keep it only cause of balance reasons what i was gonna do doesnt seem to be the wave
i was gonna have it select the time and then make it either chips or mult and add records the longer you hold it
but my initial test of ultrakill was 660 seconds making it that aount of chips or mult
which is alot lmao
My next challenge is gonna be a little harder because it requires some patches, I need to replace basically all blinds in a run
eremel was planning to port the ortalab blind stuff to smods i think
return/function(self,/info_queue,/card)
return/{vars{card.ability.extrahands,card.ability.extradiscard_threshold}}
end
INFO - [G] C:/Users/user/AppData/Roaming/Balatro/Modsreturn/function(self,/info_queue,/card)
return/{vars{card.ability.extrahands,card.ability.extradiscard_threshold}}
end
is there a way to get the actual source of this somehow 😭
the actual code:function(self, info_queue, card)
return {vars={card.ability.extra["hands"],card.ability.extra["discard_threshold"]}}
i wish eremel would port you to smods
what would i be useful for
my life ♥
im trying to make a deck start with only a set of my custom suit, im doing it by changing one of the suits and removing the rest but idk how to remove cards and this isn't working apply = function(self, back) G.E_MANAGER:add_event(Event({ func = function() for k, v in pairs(G.playing_cards) do if v.base.suit == 'Clubs' then v:change_suit('omega_suit') end if v.base.suit == 'Diamonds' then remove = true end if v.base.suit == 'Hearts' then remove = true end if v.base.suit == 'Spades' then remove = true end end return true end })) end
for k, v in pairs(G.playing_cards) do
if v.base.suit ~= 'Clubs' then SMODS.destroy_cards(v) else v:change_suit('omega_suit') end
end
Does anyone know of a good mod that I can look at to try to learn how to add a couple buttons (claim/destroy) to a card that I spawn into the G.play area?
idk if it's a personal problem but i couldn't port your extra deck nor graveyard to my mod , i'll have to spare some time to work on it later ,
credits to N'
Hmm, I looked through Vanilla and it seems to add similar buttons to cards in shop, but those seem to be added by some background code in Balatro. I'll look again, maybe I'm missing an example in there somewhere
i mean it does work but it's not instant and it's very loud
SMODS.destroy_cards(v) > SMODS.destroy_cards(v, nil, true)
much better thanks!
my problem with destroy_cards there is that it calls the remove_playing_card context i think
oh sorry wrong link
i mean it took me a while to figure it out myself
if next(playing_cards) then SMODS.calculate_context({scoring_hand = cards, remove_playing_cards = true, removed = playing_cards}) end
Yes it does.
you're taking all the credit for the cool stuff N
Thank you!
very amusing
good luck , it's hard
disable all mods work
i need to figure out where to place it now
every copy of balatro is custumizable just like linux
@spice wadi , @red flower
i didn't do localization
i'll do it later
i couldn't sadly
too much space occupied
not a good ux
also added a confirmation
Very nice
I might expand on that sometime
i'd love to see it
I'll try to remember to lyk
no worries
The mod management update is gonna have modpack support hopefully, so having a system to disable other mods easily (as well as lock certain mods from being disabled by the disable all thing) would be useful
Well since you're gonna be able to install mods ingame
And it'll install dependencies automatically
Making a modpack system shouldn't be too hard
do i make a pull request or contact eremel
like integrated bmm
Yuppers
Working a bit with the people on that team for this as well
I'm mainly doing frontend
you should allow users to make custom modpacks btw
And corobo is doing backend
That's the plan
Not sure which approach to take
I think it'll be like
You just make an empty mod with the other mods listed as dependencies
good luck for you guys , i'd love to contribue but i'm not good at web dev
Maybe both
I'm not either lmao
if you're using create_UIBox_generic_options please add no_back = true to the table you pass to it
does that make a diffrence
looks better than cancel and back next to each other
I mean yeah but that's not my problem lmao
it's unfinished product for now so i'll make sure to add that
are you gonna be using the same bmm pull
Wdym?
Oh
Out of the box it'll support the Balatro Mod Index (BMM) and Photon
With support to add more via mods
great
good luck
so ... factorial mult balatro ?
maybe i'll add that to smods aswell
how do you reload mods?
I want to know
cuz
I need to make a function that injects cards into the game in real time
for secret cards
and other stuff
how do i add an negative wheel of fortune? calculate = function(self, card, context) if context.individual and context.cardarea == G.play and context.other_card:is_suit("omega_suit") then SMODS.add_card{key = "c_wheel_of_fortune"} set_edition("e_negative", true} end end,
restarting the game reloads mods automatically
local added_card = SMODS.add_card{key = "c_wheel_of_fortune"}
added_card:add_to_deck()
G.consumeables:emplace(added_card)
added_card:set_edition("e_negative", true)
thank you that worked!
np
dont do this
youre emplacing and adding the card twice
@rare torrent
SMODS.add_card{key = "c_wheel_of_fortune", edition = "e_negative"}
you don't need to do :add_to_deck and :emplace()
and you can just do that too if you want
it's so funny whenever i decide to edit something i get faced witha 1k+ lines code
when i pick the first card from my mega dice booster, the whole UI goes away and then immediately comes back. how can i make it not do that (buffoon pack clip included for comparison)
Do I need to manually code (with no_pool_flag) so that my jokers don't appear in the shop, when aalready owned? Or is there an easier way?
no, the game automatically removes any card from the pool if you own it and don't have showman
Maybe they appeared there because i took them with DebugPlus? Because they did not appear third time as far as i remember
Yea they'll still appear if you spawned them in with debug in my experience
Just wont when acquired normally
Yeah it worked correctly now when i got my joker naturally from the shop
And i saw the "nope" from a rare tag for the first time, when i took all rare jokers
Huh, what's the most effective way to determine if a sticker is a stake win sticker in regards to the G.shared_stickers table?
In SMODS, the other stickers are added to it when originally they had their own fields
But it means the grouping is a little less obvious now
What's the method to make a card rental?
How do I force a game over?
Like is there a SMODS.game_over() function or something
I think it's something along the lines of lose_run()
if not G.GAME.seeded and not G.GAME.challenge then
G.PROFILES[G.SETTINGS.profile].high_scores.current_streak.amt = 0
end
G:save_settings()
G.FILE_HANDLER.force = true
G.STATE_COMPLETE = false```
I was quite wrong.
Damn thats alot more than I usually do
I just do like 2 lines
I might just make this a function :/
would probably help yeah
That's just's called in end round to initiate it, then the Game:update_game_over() function handles it
So it would be like this?
same
i actually do an extra line so i can show what card you lost to in the game over screen
(stolen from lobcorp)
what card?
yeah, im not on my pc rn but it shows you the card sprite instead of the blind icon
for this
that sucks for a legendary ngl 😭
No, the game calls Game:update_game_over() by reding the current state. You can just leave that at the end
o
who asked
The voices in my head
I only asked because I realized that if HP reaches 0 in Alloy, it doesn't actually matter right now
It only matters when the loss happens
so if i want it to lose right away then
Depending on your use case, it can also be used for winning the game, but the code I gave you assumes it's a loss condition
Which is why I took out a check for G.GAME.won on resetting your win streak
If you need it, you can add a won argument to the function, set G.GAME.won = won or false, and then readd that check to make sure it's only resetting the win streak on loss
level_up_hand(card, G.GAME.last_hand_played, false, 1)
why this doesnt actually level up?
Gonna bump this again cause I don't want to make a map that's limited to the vanilla win stake stickers
they are all stake stickers?
anything in G.shared_stickers looks like a stake sticker
wait so if I want it to win, I don't reset the streak and then I set it to like G.STATES.WIN_GAME or something?
Ooop, found it. G.sticker_map is actually changed in SMODS to be a proper map, and the stake sticker keys are added to it
So I can use that, I was disregarding it because it doesn't work that way in vanilla
No yeah specifically i need to delineate stake stickers for a custom draw step
The Stickers step doesn't really do that and I need to do smth specific
No, do this:
G.GAME.win = win or false
G.STATE = G.STATES.GAME_OVER
if not G.GAME.win and not G.GAME.seeded and not G.GAME.challenge then
G.PROFILES[G.SETTINGS.profile].high_scores.current_streak.amt = 0
end
G:save_settings()
G.FILE_HANDLER.force = true
G.STATE_COMPLETE = false
end```
i feel like i should change the name of the function
I guess winning is technically a game over
game_end to be more neutral?
prototype
Latest commit.
latest commit
More efficient use of screen space.
i'll look into it later today
the internal fight between making 40,000 functions that all do subroutines or to just make it into one function that does everything
the fight lost
are you making a mini game
im not good enough at lua to make a mini game
it's not hard to make something simle there's a lot of love 2d docs
tell me about it lol ,currently porting my code to the latest smods
because i was using a release not a commt version
i mean im not denying that i could probably make a game in lua with pure love2D
but like in Balatro is another story unless I use pure love2D
i might be misunderstanding love2D tho
pretty sure you can do a lot with just tabs/shaders/buttons
this reminded me with my first game , an rpg in godot
ooo
I have a Joker that creates a speed tag when the blind is skipped, but it keeps redeeming before double tags activate. How do I spawn a tag as if it was obtained directly from skipping?
chech cola code in vanilla remade
and your tag code
try doing it in an event
i think someone had a similar problem but idk how they solved it
i think they needed to add a context after the tag is added
It almost works, but now the copied speed tag doesn't get redeemed
check your context
I'm using this hook for a custom context, then creating a tag in an event in that context
Yes, you either need to patch, or apply the tag again.
What do you mean by apply the tag again?
G.E_MANAGER:add_event(Event({
func = (function()
for i = 1, #G.GAME.tags do
G.GAME.tags[i]:apply_to_run({type = 'immediate'})
end
return true
end)
}))
```?
So this activates tags again? That's just what I needed.
Yes.
Not noticing any difference, should I put this event somewhere different?
bump 🥺 it's not a big deal but it still ticks me off
folks, is there a way to create a card with modified attributes? i wanted to create a card usin SMODS.add_card but i wasnt quite sure how to modify some of its attributes(like card.ability.extra.[field])
is there a way to do that?
Tried this, the speed tag joker works now. I have another joker that creates a double tag though and it's being extra weird now. The first tag you skip gets ignored, then the second gets copied by the first and second double tags.
like what, this?
local _k = ''
func = function()
return SMODS.add_card({ Set = 'set' }) == _k
end
_k.ability.extra.field == 2 * _k.ability.extra.field -- example
SMODS.add_card({ key = '_k' })
hello modding dev
i am doign pr stuff
Why are you doing it in a func?
<eof> expected after return
great
Yes, returning ends the function.
yeah and it's inside another function
gonna do it for jokers/cards period if i can
also hi somecom
Yes, why do you need that function.
so im calling a second function to not kill the one i want to continue
for i = 1, #G.jokers.cards do
if my_pos == 1 then
stupid = true
break
end
if i == my_pos then
stupid = true
break
end
-- this line
if my_pos and G.jokers.cards[my_pos - i].config.center.key == "j_tmod_catofboxes" and not card then
stupid = false
break
end
end
one of the ifs in this for loop never outputs true
idk why
(my_pos is set to the joker position right before this and stupid is nil)
or is that not necessary
Yes.
no
idk what you're doing there
== is comparison not assignment
local added_card = SMODS.add_card{...}
added_card.ability.extra = blahblah
that requires reading
is that gambling??? 💀
i had to rewrite the whole thing
somehow
it worked !!!!!!!!
i wanna know who's responsible for this ui change@red flower
aikoyori
am i burping too loud
because it looked so bad ,,,,,
to be fair , i was the one using a release not a commit
what's the second add_card supposed to be doing
issues with mods
no why would you
idk
(all the display is done in one row and it dynamically changes display)
Two mini questions
First one is how do I make a sticker only be able to spawn on Jokers
Second one is how do I make it not spawn 100% of the time
thought it only fetched the created key not that it actually created the card lmfao
that sounds like typical stiker code to me
Is this a good sticker to add for a bonus stake
Ultimately it's just a worse Perishable on its own but I can imagine it having uses where it stacks up
i mean you can just sell it?
theoretically you could get explosive + eternal but that's like a 9% chance
which actually isn't that uncommon now that I think about it
does this appear on every joker
wdym
in vanilla scaling jokers can't have perishable sticker
and food jokers can't have eternal
i made a whole bunch of stakes
I was about to show them but apparently it thinks I meant an alloy stake when I said gold stake
It's meant to be a bonus challenge on top of gold stake since Alloy kinda trivializes gold stake
so it has all the previous stakes effects applied
yes
o
becuz it seems to be acting weird about it
i wonder how would the game be if every joker had 100% to spawn with a stciker
sticker*
apparently very interesting
the two stickers I added seem to be at 100% constantly despite changing the rate
btw i've talked to , someone in your group apparently you are working on an integrated bmm , how's that going for you ?
It's going alright
I've been working on making the backend more modular so it can be adapted more easily to different platforms
very nice, i hope you don't face a dead end
if you do , consider slamming into it multiple times, it works on the 55th time
Oh yo that's a me reference
Actually I haven't asked much about the progress of this
Have you integrated it into the fork yet
sorry im not good with names,also new here
i've done everything , also added dynamic mod counter/activated mods/inactive mods/mods with issues
but i haven't done localization , i'll do it tomorrow
i need to add a little padding between the cinfirm and cancel button aswell
No worries
Oh I was asking corobo haha but that's awesome!
Very nice feature genuinely
oh lmao
do you think mod counter should be in a global variable ?
idk maybe someone can use it
maybe?
seems like a good idea
i was thinking maybe someone would make a joker that gains mult based on how many mods you have , and this would help lol
i'm not sure who's gonna use it but i'll add it anyway
i feel like someone already did it
i'll check
I think I sent it in the GC
I mean as of now it's just one file so
Yo chat im havin problem installing steam modded
got it
so not integrated yet
(no pressure ive barely done anything so far)
If yall want while i try and fix it can i send the zip of the mod and who wants tests it out for me pls?
I keep forgetting we have a github
I tought it was forbid to send straight up zips on moddin chat
Thats why i didnt ask there
if it's forbidden there it's forbidden here
mhm!
im working on the mod-management branch
Yea
whats the problem then
ingame
I jus made a mod and im new so they explained like, you need to try it on your steam modder but my wifi isnt workin today and steam modded aint want to install
So like i have a zip and no way to test out if it works
i dont really understand the problem
you cant install steamodded?
or the game is crashing?
or its just not loading
No no its not really a big problem
Rn in having trouble installing steam modder
And i have a mod finished to put on github
But i cant test it on my pc
Thats the only thing
So like i jus wanted to ask in chat if somebody who wanted could try it out while i wait for this to actually install here
Yeah i expected that
I mean the mod is simple is like 1 joker
So it wasnt a problem the testinf just
Im anxious man its my first mod i wanna try ittt
but like why are you making mods without steamodded installed
I wanna see it in game
Cuz this is my first ever mod
I never modded a game before
At first i entered only with my artist experience planning to make art for jokers for free to whoever wanted to, but then they told me about joker forge
So i tried workin on my own stuff
Im doin anythin from scratch
most things that go wrong are on joker forge's end though
With the amount of mods that exist currently, 1 joker might not be enough for people
Oh im plannin too, but for now i jus wanted to test out 1 joker like, first ever experience
And always put stuff on GitHub if you want people to test
Wait I’m in the wrong chat
Hi
Hi flote
I wanted to make like a 50+ joked pack
All jokers that you could build an entire run aroubd
Around
Why did it say it sent twice
Nothing sent twice I think
Thank god
why is card.config.center.pools.cat always returning true
if context.selling_card and card.config.center.pools.cat then
x
end
how do ig et the card sold
context.card i think
yeah thats what i thought
ty
it will crash if you dont check if pools exists
you see im trying to do that
and it just always goes through fully
speaking of pools what are they? i have that issue
because your joker is probably in the pool
look up SMODS.ObjectType in the documentation
even if i sell smth like scary face which 100% does not have the cat pool
ahhhhh
how would i activate an effect whenever a specific type of card spawns
spawns anywhere? or in the owned slots?
anywhere
if it appears in the shop or in a pack or is directly created
basically during set_ability
pngs wont spawn on my mod. that's actually the current issue. i just see the default joker image. im good at coding but dont understand, they're in assets/1x...
but without adding it to the set_ability of every item
hook set_ability?
you can do that?
yeah you can hook any function except for like 2 that load before the mod is loaded
can i see the code
yaaaaaaaaaaaaaaaaaaaaa
local set_ability_ref = Card.set_ability
function Card:set_ability(...)
-- code before the function
local ret = set_ability_ref(self, ...)
-- code after
return ret
end
so how would I check data from the card whose set_ability is current being run
self is the card
gotcha gotcha
if context.selling_card and context.card.config.center.pools.cat then
catcount = -2
end
end
why is it not working now
at all
i dont get it
(it doesnt set catcount to that amt)
you wrote if context.selling_card inside context.selling_card
yes
why
here's the whole thing i guess
what's the effect supposed to be
yes.
so it counts the amount of jokers with the cat pool
and i need to do this for some reason for it to work better
it adds that many jokers slots
is this made with chatgpt
yes.
ew
stop
yes.
start again
yes.
spin around
pull it twist it
yes.
bop it!
I’m not gonna question why your file name like that
anyway it would be too much of a pain to fix that code
But using ai is just bad
If you’re lazy use jokerforge
yes.
I'll have nightmares
numnbnvnmp
not (pools and next(pools)) is true only if pools doesn't exist
I'm having a repeatable bug that causes all hands played to be worth 0 score, what's the best/easiest way for me to get a log or something for you guys?
wait shit how do i make this not happen in the collection
i forgot about that part
card.area and card.area.config.type == 'title' gives you if it is in a menu area
Btw how can i change the background to a color like when opening a spectral pack
check vremade for examples
does cryptlib (when it works again) include Gateway
should this be true or false if it's in a menu
regardless, it doesn't seem to be doing anything
it doesnt include any content so no
the code is running both on cards inside and outside the collection so now I don't know what to do
and it doesnt have exotic rarity anyway so what would be the point
what does cryptlib have
true also i put card but it should be self for you
the stuff for the middle layer that exotics have
force trigger??? nubby reference??
hmm weird
i added and not (self.area and self.area.config.type == 'title') to the end of the if statement
and it seems like it's just being ignored
can you print the statement on its own to see if it's ever true
what's the card area called for the collection
idk how to print out the info for cards in the collection
spoilers: i can
i mean do print(self.area and self.area.config.type == 'title') before the if
oh
it's going to print a lot but i want to see if it prints a lot of true when you open the collection
That's a lot of nil
yeah
it shouldn't be nil wtf
new idea
i feel like that will crash if the area is nil
let's see
now it's printing nothing
so the cards in the collection don't have a card area
?
it seems like it
that can work
i can just check if self.area and that'll make it not happen in collection
to do list does check for it so it's weird
yeah
isn't emplacement and area setting far after set ability
to do list checks for it in set_ability
How can i for a blind outta curosity subtract chips? im not sure if diff than G.GAME.chips but ik that is for the total chips of blind
i think you could do
return {
chips = (negative value)
}
and to-do list check famously doesn't work
I am going to surprise a friend with something. How do you localise a seal's label and description? misc > labels?
exaggeration lol
well im fixing it in vanillaremade then
oh not a bad call lol
this might work nice thinkin dude
it makes sense
yeah you can return negative values to chips and mult!
i honestly was overthinking it...
i believe there's a fix in smods to make all rng calls during game pause return math.random instead of going through pseudorandom
and just didnt think of using chips = - of my local param🤦♂️
i cant remember if i asked this before but does anyone know if its possible to check if a played card currently has a perma bonus attached to it? if so, how?
good practice to avoid it anyway
check all the card.ability.perma_whatever
maybe see if perma_bonus param works and check with that
this too goated answer
wha
what
https://github.com/Steamodded/smods/wiki/Perma-bonuses @distant junco look at this
hiker implementation explain too 🙂
can i localize a rank from an ID
yea use get_id()
ex for Ace
it will need sum thing to check card so use if context.other_card or sum else
why do you have the id and not the rank
idk
this is the function i made
SMODS.Seal {
key = 'sealSeal',
badge_colour = HEX('95E9F5')
}
return {
descriptions = {
Mod = {
seal = {
name = "Seal",
text = {
"A mod about a Seal Seal and a related Joker."
}
}
}
},
Other = {
modSeal_sealSeal_seal = {
name = "Seal Seal",
text = {
"TEST"
}
}
}
}
The joke is that it's a seal about the animal
ohh
sweet i gots it
yeah
localize(card.base.value, 'ranks')
thanks mills and N
i have it return id so i can compare ID
return the rank too
ill return a table
you can return id, rank
i think i need to rewrite my func a bit
because my goal is to get the most played rank in deck
so im iterating over playing cards and making a table of {RANK, TIMES_PLAYED}
hey so uhh I'm trying to make Kronos (a consumable) create an Unfair Scaling joker but the SMODS.Joker center didn't inject into G.P_CENTERS so I had to inject it directly. Now, when I use Kronos, it makes a joker with the texture of a random vanilla joker with no name, description, or rarity, and cannot be sold.
