#💻・modding-dev
1 messages · Page 619 of 1
It's #context.full_hand == 5 not context.full_hand == 5
Well that got it a lot closer to working
Now it works TOO well, it's summoning a spectral card per card discarded
But that's better than it was
I've got it lined up with the implementation for ancient joker, shouldn't it be okay? It runs through each suit but excludes the one that trash_card currently is, right?
yeah but youre not updating or checking trash_card in the joker
you're checking trash_suit
Oh that's just a naming error
There is no trash_card, I meant to change them all to trash_suit
Whoops
try context.pre_discard
how do i check if the player is in the shop
if G.STATE == G.STATES.SHOP
peak ty
how do you add spacing for dynatext
joker display problem, how do I display a joker that has both xmult and plus mult
anyone?
how do you detect a joker trigger
you should ask these in the jokerdisplay thread but you can do
text = {
{ text = "+", colour = G.C.MULT},
{ ref_table = "card.ability.extra", ref_value = "mult", colour = G.C.MULT },
{ text = " " }, -- space in between
{
border_nodes = {
-- xmult stuff
}
}
}
context.post_trigger
is there a way to make that joker trigger it's effect again
just use joker retriggers
how to?
is it possible with a deck or anything to preset the boss blind for certain antes?

my code was a so much of huge mess that I actually managed to trigger race condition
i get an error at line 6685 where i try to get an edition of a playing card from the card array but that somehow isn't allowed to be done
too many ipairs calls at once that the next function just fails to work sometimes
yay I love race condition
does there exist a method to get the edition of a card because I couldn't find any documentation for it
G.play.cards[i].edition and G.play.cards[i].edition.foil
thank you!
how do i make a modifier to make all blinds bosses and disable skips?
how do you localize seals?
i know the format is like
Jokers = {
j_modprefix_jokerkey = {"
name = "test"
text = { text}
but
i cant seem to figure out the logic for seals
<@&1133519078540185692>
It would be modprefix_key_seal in Other
Yes.
alr ty
Seals = {
YA_Discord = {
name = "test",
text = {
"test"
}
}
}
is there something wrong with this?
YA being my mod prefix Discord being the seal key
return {
descriptions = {
Other = {
Seals = {
YA_Discord = {
name = "test",
text = {
"test"
}
}
},
```nestled like this
No, it's in Other not Seals
oh just other?
Yes.
return {
descriptions = {
Other = {
YA_Discord = {
name = "test",
text = {
"test"
}
},
is there anything wrong with this?
because it just doesnt do anything which i find weird
it has to have _seal at the end of the key
show
return {
descriptions = {
Other = {
YA_discord_seal = {
name = "test",
text = {
"test"
}
},
this is what this looks like right now
the only two differences from the previous one is the capital D (i changed the key)
and the _seal
key = "discord",
loc_txt = { name = "Discord", text = {
'gives you a {C:spectral}Discord {}message ',
"When this card triggers gain {X:mult,C:white} X1,1{} mult",
"{C:inactive}did someone ping me?{}"
} },
pos = { x = 0, y = 0 },
config = { extra = { X_mult = 1.1, } },
atlas = "discordseal",
badge_colour = G.C.SECONDARY_SET.Spectral,
```with this being the seal code
oh wait
localization keys are all lowercase
also if its just the label not working under the card, you need to have a ya_discord_seal entry in misc.labels
labels are an issue for later
since the text for the collection should work fine
that ssomething ill get a headache over later
first i wanna get the thingie in dutch because then i can write that off as done
what key tho?
bcs my mod prefix is uppercase in other places where it works
oh
j_YA_mango = {
name = "Mango",
text = {
'{C:chips}+6{} fiches{}',
``` like this one that works
zes zeven
yes
anyway
it also gives zeven multi
i have no fucking clue anymore
which i accidently left out
chat zijn we gekookt?
smth like that yeah
but
can you in that case help with with the error tag?
bcs i wanna be done with the mod for the most part today
because tomorrow evening is the last chance i get to work on it so i dont wanna push things off even more
yeah, the seal needs an entry in misc.labels with the text for it
label is the tag below the description
so lets start with how does one go about making a label
i figured but how do you make one?
see misc section vanillaremade localization https://github.com/nh6574/VanillaRemade/blob/0d158691dc9aac5664bca0e09e531d93519fba04/localization/en-us.lua#L3191
as an example
oh like that
but what i wanna do is make one label from my mod and apply it to everything
i mean that should happen by default for all mods
you might have turned off displaying mod badges in steamodded config
maybe but i havent even made the label yet
it just uses the display_name and badge_colour fields from metadata
or the mod name and white by default
so like this?
okay so
what should that do exactly?
because this makes the label but what does it apply on?
any items from your mod iirc
well anything with a standard description, tooltips and blinds wont show it outside the collection
Everything you add basically
now that i think about it
maybe this isnt te play
maybe i just need to do what is more normal lol
what
well i dont think my mod would really benefit from its own label all too much
ofc my seals need labels
i mean its like 2 seconds to add
but besides that i dont think it adds much
and mods have it by default regardless
first let me make the seals label i can "pieker"(idk the english on the top of my head lol)
so how do you update the badge text
okay but wdym update
well you have the label in your localization file right
no not yet but now that i think about it
is it vremade_ sealkey?
no vremade is just the vanilla remade mod prefix
its just YA_discord_seal still
aha
ive taken alot of it and remade it for my own mod yeah
like this one
the 1 in 4 to become a lucky card is straight from midas mask
wizar
nyway
what do you think of it
i added wizard(tovenaar) and magician(goochelaar)
this one
might be my magnum opus joker
its thematic, effect and just overall fun to have
is so incredible
peak
and also feels very vanilla to me
but yeah i really like lucky cards
so i thought id add more
is it possible with a deck or anything to preset the boss blind for certain antes?
misc = {
labels = {
YA_discord_seal = "Discord_seal",
}
}
```got any clue why this doesnt work?
more of a mod advice
as a fellow dutch person
should i translate discord or keep it the same?
i mean discord is also an actual word
another fun dutch typo
im the $ _ _
3
its a feature now 🔥
Currently
currently doesnt matter because this is in collection
yeah but currently in dutch
balatrue
lmao
but yeah
im doing all of this
just for that one inside joke
of him enjoying translating memes in dutch
i mean localization files are also quite a bit more organized imo
is there any good way to set the win ante of a challenge
change G.GAME.win_ante in apply
doesn't seem to be an apply field
there is
why is it undocumented???
because the page hasnt been updated since july
*june
and the feature is from after that
what arguments does apply take
for challenges its just self iirc
also eris
one quick question
is it possible to update loc_vars?
when something happens?
like lets say i buy blueprint, for the local vars to then say "you obtained blueprint"
just an exmaple
i think it's the same as deck
so you can refer to deck documentation for it ig
save a variable in card.ability.extra that tracks stuff for loc_vars
how do you do that?
well that depends on what youre doing
okay well full context
i have two jokers that are matching with eacother
one stacks itself on highcard
the other gives money and a tarot on highcard
i want both of them to get buffed when you have the other one
so the stacking one gets additional stacking and the money one gives a level to highcard for example
now what i think would be cool would be to update local vars saying like "you found the other end, now gaining (specific buff)
you can return key = ... in loc_vars to change the localization key it uses
so you can check for the other in loc_vars and add a key to the return if so
anyway i gotta eat now
you'll have to give a more indepth explanation of that
but i think i sort of get it
how do i detect if you use a specific consumable card. like the judgement tarot card for example
i've tried a lot of permutations of if context.using_consumable and context.consumable.ability.key == "c_judgement" then but nothing seems to work
it's context.using_consumeable and context.consumeable...
with an extra e
because localthunk doesn't fix his typos
<@&1133519078540185692>
<@&1133519078540185692>

mfw caino
neat
w mods
thanks mods
thanks mods
lol
pls i don't want to look at cryptid code anymore
see entropy LED as a reference if that helps code | localization
i think i have an idea one sec
probably done horribly but i have successfully implemented determining of the latest video on a youtube channel and how many views it has
okay so what i have in mind
i make two of the same joker desciription in localization
i make a local variable
true = 1 version
false = 2 version
and the variable checks for if the other joker is in joker_main
thats pretty similar to what entropy does except that its stored in the ability instead of being a local variable
so you can just return key = <bool> and self.key or <other key>
or the other way around
whichever is before the or is whats used when the bool is true
for _, j in ipairs(G.jokers.cards) do
if j ~= card and not j.getting_sliced then
local key = j.config and j.config.center and j.config.center.key
if key then
if key:find("ice_cream") then
card.ability.extra.chips = card.ability.extra.chips + 50
j.getting_sliced = true
j:start_dissolve({ G.C.RED }, nil, 1.6)
```so something similar to this without the slicing part is what im thinking
wdym?
check if the string is equal to something
rather than string.find with some part of the key youre looking for
why
so it always checks for the loc_vars?
ohh i see i see
im having a little trouble actually working this out
what is the code currently
okay well the full code is a little more than just that
but i already have a joker main
if context.joker_main then
return {
chips = card.ability.extra.chips,
mult = card.ability.extra.mult,
Xmult = card.ability.extra.Xmult
}
end
```being this
idk how i add the check for the other joker key into this
you should be able to just add key = next(SMODS.find_card(<joker key>)) and self.key .. "_alt" or self.key to the loc_vars return
you can do the same here
by using a different number
instead of a different string
self.key is the joker key
fun thing about lua is that <condition> and <thing 1> or <thing 2> just works
ive never worked inside of loc_vars othar than card.abillity.extra smth
whats the alt used for tin this case tho
it adds _alt to the end of the returned key if the other joker is present
so itll get its own key with _alt at the end from the localization instead
im so confused at all of this
return { vars = {
card.ability.extra.chips, card.ability.extra.chip_mod, card.ability.extra.mult, card.ability.extra.mult_mod, card.ability.extra.Xmult, card.ability.extra.Xmult_mod },
key = next(SMODS.find_card(<YA_matthsilly>)) and self.key .. "_alt" or self.key
}
end
```this on its own already gives 2 errors on they key line
yeah you do have to make the joker key a string
in the SMODS.find_card
"j_YA_mathsilly"
i even then i get this load of errors
show the code in editor
yeah remove the <>
okay so
now i just make in my loc_vars
what i have and add _alt
and then just
it works?
well assuming you have that key in your localization file yes
yes i do
okay yeah then it should work
okay got it to work
Tarot = {
t_YA_fentanyl = {
name = "Fentanyl",
text = {
"Geeft een kaart de{C:attention}Fent zegel{}"
}
}
},
Spectral = {
s_YA_Everyone = {
name = "@Everyone",
text = {
"Geeft een kaart de {C:spectral}Discord zegel{}",
"{C:inactive}wtf bro waarom zou je dat doen?{}"
}
}
}
any idea why these arent working? @slim ferry
its c as a prefix for any consumable
i recall them working before
it's still c as a prefix for any consumable
you recall wrong then
correct
hey, fun issue. For whatever reason, a Joker I have crashes when trying to modify a card using a variable. The issue line is
rank takes rank keys, not IDs. so "Jack", "Queen", "King", and "Ace", not "11", "12", "13", and "14"
does the local ranks = { not convert the ID to a Key?
No, because 10 is 10 but also you're not using it.
you'd need to do ranks[G.GAME.current_round.RevengeRankVar_card.id] in the change_base call itself
and also yes fix 10
holy shit that fixed it
one little change
damn
thanks
I really appreciate it
Hi, massive noob question - what does the pseudorandom function do? I know the string there is like some seeding for it, but what range does it give out - is it a 0 to 1 deal, a 0 to 100, 0 to 255, what's the usual range of numbers it spits out?
its 0 to 1 by default
but you can add the min and max arguments to get a random integer in any other range
Alright, thanks!
if context.starting_shop then
for i = 1, #G.GAME.tags do
if G.GAME.tags[i]:apply_to_run({ type = 'new_blind_choice' }) then break end
end
end
This code causes all the booster tags to overlap - is there a way to make each tag wait until the previous tag is resolved?
I have a joker that adds booster tags during the round. In the following shop, the tags begin to trigger at unusual times
like when you buy something
the above code is to have the tags trigger when the shop begins
they already trigger after ending a booster, the best you can do is just completely copy the original tag calculation if you really want them to go at the start of the shop
Hello. ObjectType can be used to create pools for specific jokers? Does anyone have an example of this?
PSI.republicans = {
["j_castle"] = true,
["j_baron"] = true,
["j_hanging_chad"] = true,
["j_popcorn"] = true,
["j_even_steven"] = true,
["j_diet_cola"] = true,
["j_caino"] = true,
["j_triboulet"] = true,
["j_burglar"] = true,
["j_wrathful_joker"] = true,
["j_onyx_agate"] = true,
["j_para_republicandiscordserver"] = true,
}
local function inject_republicans(self)
for k, v in pairs(PSI.republicans) do
if G.P_CENTERS[k] or SMODS.Centers[k] then
local center = G.P_CENTERS[k] or SMODS.Centers[k]
if not table.contains(self, center) then
self:inject_card(center)
end
end
end
end
SMODS.ObjectType({
key = "para_republican",
default = "j_hanging_chad",
cards = PSI.republicans,
inject = function(self)
SMODS.ObjectType.inject(self)
inject_republicans(self)
end,
and then i can spawn a random one with ```lua
SMODS.add_card {
set = 'para_republican',
key_append = 'para_republicandiscordserver'
}
fym republicans 😭
SMODS.ObjectType{
key = "modprefix_key",
cards = {
j_modprefix_key1 = true,
j_modprefix_key2 = true,
j_modprefix_key3 = true
},
}
Thanks!!
he has a joker that spawns republicans
You should add bootstraps and maybe hiker
the republican discord server
was wondering how to get this artist credit popup when you hover over the deck skins
(taken from base game)
that's in the base game???
oh it's not, it's something that smods adds to the base game deckskins
this is where smods adds it if you care https://github.com/Steamodded/smods/blob/14ab7d4784140448a0e709eca2f1a90ce155a097/src/game_object.lua#L2605
i mean this sort of helps but idk how to get it working-
this isn't mentioned in the smods wiki for some reason, not even in the deckskin page
how do I get the cards in G.play
G.play.cards
Hello. I'm trying to create a deck that spawns a random negative, eternal joker. But when I create the joker it spawns in the Joker area but then I can move it anywhere, can't sell it and it doesn't work. Any idea why?
Here's the create code. I can provide the rest if needed.
SMODS.create_card({set = 'Joker', area=G.jokers, key = random_joker, stickers={"eternal"}, edition="e_negative"})
use SMODS.add_card rather than create_card
fair enough
do u guys know why a voucher would just not generate in the dictionary in game
Contribute to Kekulism/Wiki development by creating an account on GitHub.
Hello, I have a dialogue system for the jokers talking mid-game.
Right now tho it says all 3 lines at once; "remove dialogue" is how long the message stays, but they fire all at once.
How can I add a "delay" to the code'? Is there like a wait function?
key = "jimble",
path = "jimbonium.png",
px = 142,
py = 171,
atlas_table = 'ANIMATION_ATLAS',
frames = 70
}``` I KNOW THE CRASH HAS SOMETHING TO DO WITH THIS BUT CAN YALL HELP
sorry caps
Is this for a blind?
no its for a joker
non-Blinds cannot have ANIMATION_ATLASs.
what then how do would i animate a joker
set it up in a series of G.E_MANAGER events, you can set delay like that
guys can someone help me make a challenge similar to Enter the Gungeon in cryptid that code is gibberish for me
i want to make all blind bosses and unskippable
like uh
add_to_deck = function(self, card)
G.E_MANAGER:add_event(Event {
trigger = 'after',
delay = 0.2,
func = function()
card:add_dialogue("whatever")
return true
end
})
G.E_MANAGER:add_event(Event {
trigger = 'after',
delay = 0.2,
func = function()
card:remove_dialogue(2)
return true
end
})
end,
you can set the delay with the delay value
i think it's in seconds by default, but you can scale it to game speed by multiplying it by G.SETTINGS.GAMESPEED
like delay = 0.2 * G.SETTINGS.GAMESPEED
I see, thank you
ok well uhh how do I animate a joker
i do not know, the vanillaremade wiki is working on a section on that but it's not done yet
i have a question of my own, is there an easy way to change the sound and colour of chip, mult, and xmult calc returns? my current code does not work
return {
sound = { sound = "foil1", per = 1.2, vol = 0.4 },
colour = G.C.DARK_EDITION,
chips = 50
}
it just returns the chips but the colour is still blue and the sound is the default chip sound
Yes, chip_message
Also sound would be a string.
so would per and vol just be separate lines
whats the play here
No, it would be pitch and volume
When do you want it to play?
when the joker is in your joker slots, theres more code to this btw
Then remove the and G.STAGE == G.STAGES.
key = "music_getr",
path = "music_jimbum.ogg",
vol = 0.6,
pitch = 0.7,
selectmusictrack = function()
if G.jokers then
if next(SMODS.find_card("j_jabong_jimbyramid")) then
return SMODS.Mods.jamod.config.getr
end
end
end
}``` ok so it didnt work, but i'm on the right track, right
It's select_music_track
What is not working about it?
It's modprefix_key
is there a way i could make a pitch scale with scoring? like how the base game does it
its supposed to be an automatic thing
but it's not subject to that because i'm overriding the default message
Are you trying to have cards count as having the foil edition?
no i have a joker which makes foil, holo, and poly cards score in hand
calculate = function(self, card, context)
if context.individual and context.cardarea == G.hand and context.other_card.edition and not context.end_of_round and not context.blueprint then
if context.other_card.edition.foil then
return {
chips = 50,
chip_message = {
message = "+50",
sound = "foil2",
pitch = 0.8,
volume = 0.4,
colour = G.C.DARK_EDITION
}
}
elseif context.other_card.edition.holo then
return {
mult = 10,
mult_message = {
message = "+10",
sound = "foil2",
pitch = 1.0,
volume = 0.4,
colour = G.C.DARK_EDITION
}
}
elseif context.other_card.edition.polychrome then
return {
xmult = 1.5,
xmult_message = {
message = "X1.5",
sound = "foil2",
pitch = 1.2,
volume = 0.4,
colour = G.C.DARK_EDITION
}
}
end
end
end
}
Then you should be hooking Card:calculate_edition
local oldcalcedition = Card.calculate_edition
function Card:calculate_edition(context)
local g
if self.edition then
if (self.edition.foil or self.edition.holo or self.edition.polychrome) and context.cardarea == G.hand then
if next(SMODS.find_card("j_modprefix_key")) then
context.cardarea = G.play
g = oldcalcedition(self, context)
context.cardarea = G.hand
else
g = oldcalcedition(self, context)
end
else
g = oldcalcedition(self, context)
end
end
return g
end
oh thank you
this seems to disable foil holo and poly from scoring when played?
what's the context for just sitting in a blind? no cards selected, nothing being played or discarded
contexts trigger when something happens, if nothing happens there cant be a context
what do you need to do
I've got this snippet of code to make the joker jiggle when its active, but its a lil funky
It gets progressively juiced kind of? Seems like if I'm on my last discard and play hands the jiggle gets more intense
So I thought maybe finding a proper context for it to activate the jiggle is the answer
Maybe I should trigger context.after
yeah if theres no context check it will happen over and over
I figured that was the issue
I'm unsure what context to use since its discard specific, and there's not a first_hand_drawn equivalent for last discard(?)
just do that check you have right now in context.pre_discard
It won't only jiggle once the discard has begun to be used?
if you do the check correctly it will start once you do the second to last discard but yeah if something else messes with discards it wont work
hmm i would probably do it in update then
instead of calculate
in update?
yes, check in update when discards is 1 and you're in a blind (G.GAME.blind.in_blind) and start the juice then, you also need to set a flag so it doesnt juice again that blind
it would basically be what you were trying to do
but doing it in calculate would be bad because it will be dependent on contexts instead of being every frame like update
(e.g. if you had a burglar-esque joker that left you with one discard, the joker would never jiggle because you never actually discarded down to the point where you had one discard left, you lost them to external factors)
Got it to work, ended up going about it like this
booster_size_mod how does booster_size_mod function?
i was doing a lovely patch but i saw it ha dimplementation
the game adds G.GAME.modifiers.booster_size_mod to the number of cards available in any given booster pack, its default is zero
right its default is nil if nothing's touched it before
my bad
before you do anything with it, you'll need to check if it's nil, and if it is, set it to 0
ah easy fix
how come I only just hear about this existing
oh it's only 3 months old
how do i color dynatext to look like xmult text
since afaik you can only color the text
hey y'all, i'm trying to dick around with shaders. how would i get the horizontal position of a pixel(?)? i've tried to use texture_details.x and sprite_pos_x, which is code from the flipped.fs shader, but both seem to be set as 0 regardless of position.
vec4 effect( vec4 colour, Image texture, vec2 texture_coords, vec2 screen_coords )
{
vec4 tex = Texel(texture, texture_coords);
vec2 uv = (((texture_coords)*(image_details)) - texture_details.xy*texture_details.ba)/texture_details.ba;
const vec3 BALATRO_RED = vec3(0.992, 0.373, 0.333);
const vec3 BALATRO_BLUE = vec3(0., 0.612, 0.992);
float sprite_width = texture_details.z / image_details.x; // Normalized width
float sprite_pos_x = texture_details.x * sprite_width; // Normalized pos_x
vec4 hsl = HSL(tex); // convert texture to HSL values
vec4 bhsl = HSL(tex); // make a base copy of HSL values
vec3 sepiaVec = tex.rgb;
sepiaVec.r = 0.05 + (1 * tex.r + 1 * texture_details.x / sprite_width);
sepiaVec.g = 0.05;
sepiaVec.b = 0.1 + (1 * tex.b + 1 * texture_details.x / sprite_width);
tex = vec4(sepiaVec, tex.a);
// Does not do anything. Required for shader to not crash.
if (uv.x > 2. * uv.x) {
uv = evil;
}
// required
return dissolve_mask(tex*colour, texture_coords, uv);
}
I have an animation bug with my seal by upgrading it it disapear at start of the animation but like I just want it to be upgrade by turning the card. I know why it does that (cause set_seal make the seal nil at start) but how can I solve this
Code?
function upgrade_seal(selected_card)
G.E_MANAGER:add_event(Event({
trigger = 'after',
delay = 0.4,
func = function()
selected_card:juice_up(0.3, 0.5)
return true
end
}))
G.E_MANAGER:add_event(Event({
trigger = 'after',
delay = 0.15,
func = function()
selected_card:flip()
selected_card:juice_up(0.3, 0.3)
return true
end
}))
delay(0.2)
selected_card:set_seal(G.P_SEALS[selected_card:get_seal()].giga_data.seal_upgrade)
G.E_MANAGER:add_event(Event({
trigger = 'after',
delay = 0.15,
func = function()
selected_card:flip()
selected_card:juice_up(0.3, 0.3)
return true
end
}))
G.E_MANAGER:add_event(Event({
trigger = 'after',
delay = 0.2,
func = function()
G.hand:unhighlight_all()
return true
end
}))
delay(0.5)
end
I use this function when I need to upgrade a seal
you could set the seal while the card is flipped and use the immediate argument
oh yeah. and if like a seal is upgraded while a hand is play like a joker effect does it going to have the effect of the upgraded seal ?
like that
by doing that it set the seal after the flip animation
Is it possible to give playing cards tooltips without giving it, like, an edition? For example, if I switch the suit of a card, am I able to add a tooltip to the side for elaboration? (It's for the card merging mechanic)
Yes, patch generate_card_ui
i'll look into that
no I meant the immediate argument to the set_seal function
and you'd put the set_seal call in an event that happens after 0.2
instead of the delay
oh
so like that
Is there a way to use pseudorandom stuff to grab a random tag?
presumably, idk which argument the immediate one is, but also you're forgetting the trigger = "after" on the event
np mryamitsu
tag you own or any random tag
now no one can say that my seal animation are broker
I mean someone was laughing about my wacky animation
is there limit to how many mods can be downloads but not active
Because I had like 70 and the mod manager keep crashing and deleted like 8 and it came back
only limit is your storage space
this really odd and this mods were working yersteday too
manually install mods if mod manager is being fucky
Ya that what going to do
Potentially stupid question is it possible to add a Joker and have it NOT appear in the collection?
I figured out the random tag thing, but on rare occasion no tag spawns and the game crashes upon leaving a shop. Does the game not allow certain tags to show up at certain antes? I know they can't show up as skips, but I figured that it would be okay if given manually
I checked through the tag options that can be selected and none seem to be invalid or spelled wrong or anything
You're the best ty
Code?
it might be orbital tag shenanigans? i know that one in particular tends to have issues when it's not created specifically from a blind skip because of how it picks the hand to level up
I want to make it work with blueprint at some point which will require altering some things but I haven't gotten there yet
local tag = Tag(get_next_tag_key())
tag:set_ability()
add_tag(tag)
Would blueprint work if I make the first if statement
if context.ante_change or context.blueprint then
No, remove the first if and change the second if to if context.ante_change and context.ante_end and remove the third if
i was just going to point you out to the vanillaremade wiki lol
does this make print_tag irrelevant
Yes.
Getting "attempt to index nil value" crashes after beating a boss blind with this code
anyone have any idea? i can't run mods as of right now which is really hampering my ability to. actually develop my mod
wait
I see the issue
Yep it works now thanks so much
It does still have a crashing issue with orbital tags but I think I'm going to temporarily leave those out of the pool of tags and figure that out another itme
time*
or something
may i point you to the vremade wiki again
i didn’t check but did you try and do verify game files
Yes you may what should I look at
search for tag
there's a section on how to create a random tag that accounts for orbital
it’s 11:30 i shouldn’t be here rn
The wiki is seperate from the github?
the repo i mean
nvm i see it
Can't find a spot on specifically orbital tags
I saw this for random tag generation
what's the crash and the code
you can just look at your earlier logs 😭
yeah in Mods/lovely/log
also can i see the code
do you still have the set_ability thing
hmm
oh it might be a timing thing
i fixed this in hot potato let me search for it
yeah if you're doing it when the ante resets it's weird
i did this to fix it but maybe there's a better way
https://github.com/Balatro-Potato-Patch/Hot-Potato/blob/9dbfb5d7c9463f94ee76dbfdc3fe92add7c30e10/Jtem/events_definitions.lua#L4625
I'll have to come back to this potentially
Is there a way I can temporarily exclude the orbital tag just to not crash for now
like while selected_tag == 'UNAVAILABLE' or selected_tag == 'tag_orbital'
yeah
i did 2 full reinstalls im pretty sure that covers iy
how do i use mod.calculate to check for if score reaches 1e100 with played hand being a flush five of spades?
Compare SMODS.calculate_round_score() to that.
pardon
if SMODS.calculate_round_score() >= 1e100
how do i make it so that played hand must be a flush five of only spades? (i'm changing clubs to spades)
well :is_suit() looks at one card and returns a boolean, so comparing it to a number isn't gonna do it
also you're not passing context into the calculate function there
or more accurately you're naming the context table
add_tag(Tag('tag_rare'))
So this isn't correct for creating a rare tag, just curious about what the key for a rare joker tag would be
tag_rare is the key though.
odd
This yielded the tag.
Thank you kindly, I will simply strangle my code till it works
cause i ripped it off of the wiki
i'm still new to this lua stuff
despite knowing a bit more
I'm curious if there's some super obvious way to change the local text of a joker (The description) when a condition is met, I've been trying for a bit to decypher another mod but I realized I should ask
In the loc_vars, if you return a key in the table, you can change what localization entry is used.
https://github.com/TheOneGoofAli/TOGAPackBalatro/blob/54e3472c2931a4f1f4dfb6f4f78864910ebc6f13/items/joker.lua#L2010
Thank you for the response and also the example
@shell timber hey i was wondering how did you do atlas for rotated tarot card since it's tilted and not the usual vertical
its not tilted
rotated*
its not rotated
whatever it was
its just a larger square
how do you remove a card's seal or edition?
card:set_seal() and card:set_edition()
No, it would be card:set_ability('c_base')
i have this blind ability:
First scored card in poker hand is debuffed
how might this be implemented?
if context.before then
SMODS.debuff_card(context.scoring_hand[1], true, self.key)
end
if context.after then
SMODS.debuff_card(context.scoring_hand[1], false, self.key)
end
ah, thanks ^u^
also one more thing
this is swapping chips and mult, but then swapping it back
what have i missed?
Use context.initial_scoring_step instead of context.before
👍
okay what about poker_hands? @faint yacht
if context.after and context.poker_hands and next(context.poker_hands['Flush']) then
if bigscore then -- put the score check here.
local allspades = true -- assume all Spades.
for k, v in ipairs(context.scoring_hand or {}) do -- 'or {}' is fallback in case context.scoring_hand somehow doesn't exist?
if not v:is_suit('Spades') then allspades = false; break end
end
if allspades then
-- spawn the goober.
end
end
end
replace bigscore?
With your to_big(getscore) >= to_big(1e50) check.
how do you check if a card is debuffed?
card.debuff
if card.debuff == true?
you can just do if card.debuff then
any way i can learn how to put stuff on the title screen?
i wanna try to add something on the bottom right of the logo
this is how kino does it
https://github.com/icyethics/Kino/blob/094d3a0275ac808076ffcd208f1017d63561e181/lovely/current.toml#L920
I found there's a dependencies field for object parameters, but the object will only load if all the dependencies are present. Is there a way to load something if only one is present?
I wanna make a deck that only loads when playing multiplayer, but there's Multiplayer and NanoMultiplayer and obv you don't want both multiplayer mods at the same time
if next(SMODS.find_mod('modid1')) or next(SMODS.find_mod('modid2')) then
SMODS.Back{...}
end
i would hope that nanomultiplayer just is set up to provide regular multiplayer though
i guess that works yeah
so you can just check for multiplayer and not worry about explicitly checking for nanomultiplayer at all
nah you have to check for both
what is nanomultiplayer anyway
multiplayer but with more than 2 players gamemodes
isnt that already on some branch of multiplayer
yeah that's nanomultiplayer
why does that have a seperate mod id
🤷♂️
it definitely shouldnt do that
yea that should really be something for multiplayer to fix
if i cared about it at all i'd join the server just to pester them about it
but i don't
well there are some differences
thats like one of the worst practices
so that's someone else's job
its still the same mod that provides the same stuff in theory
for example, for a joker of mine
why the fuck do they do that
don't ask me im not the multiplayer dev lol
hold on
how do i get the name of the booster pack being opened
yeah it's a different repo i believe
during context.open_booster, context.card is the booster object being opened
ok thing is i'm doing this for a patch that makes a dumb sound play when a specific booster pack is opened
could you do that in a mod calculate
yea i'd just do that in a mod calculate
or in an i == 1 check in the booster's create_card
this doesn't seem to be doing anything
context.card.config.center.key
^context.card is the whole card object, not just the key
Anyone know what I'm doing wrong?
still doesn't seem to have done anything
It's modprefix_soundkey
just implemented that
it still hasn't done anything
i think it's a fault with the logic seeing as how i haven't had any crashes
why is the mod calculate underlined yellow
put a print statement in to see if it's even making it through the context check in the first place
duplicate field "calculate"
shouldn't affect how the function works
it does because that means you define it twice
and the last one overrides all the previous
yea everything needs to go into a single calculate function, you can't have two of them
i see i see
alrighty
i think it's worth me making a new file to contain this calculate function :]
wtf is this I thought we made them all text
yep
that was the issue
thanks, all
hey uh whats the diff between card.base.value and card.base.id
card.base.value is the key of the rank and card.base.id is the id of the rank.
oh
the key of the rank is consistent, the ID isn't (because it could change if another mod loads a custom rank before you do)
Hey guys, i'm trying to code a joker that switches languages when owned and i have no idea why this doesn't work. Can anyone help me?
also how does smods watch file work
bump
yeah hw
just change the size
the atlas size?
yeah sure
does anyone know what the difference is between _c and card in generate_card_ui?
(function in common_events)
?
_c is the center and card is the card.
is _c the center of card?
No, because card doesn't always exist.
i see, thank you
how do you use debugplus watch file
theres a set parameter
what
yes
No
damnit
also whats the primary and secondary color for
Uhhhhhhh
I think secondary is text and collection button
And then primary idk
Or the other way around
yeah you got that
pretty sure they're colors for buttons and collection button
i forgot
respectively??
ah fuck it
i have no clue lol
https://tryitands.ee moment
wii
primary is not used afaik
there's a new parameter for the button text that idk if it's documented
primary color
looks inside
never used
Does anyone know how to do an if statement that checks to see if the player has 0 vouchers?
i LOVE undocumented stuff
how would i use it if theres no documentations for it
😭
if #G.vouchers.cards == 0
thanks!
you dig through the code
and find it while searching for something else
am i doing this right
No, remove the inject_card
oh okay
It should be documented, I know I made the PR to the wiki at least
Remove the inject function.
so i put my own consumables to
cards function?
No, set = 'mistarot'
oh okay
Code?
the object type of the consumable
fixed it
now how do i fix this
is there something like this but for discards?
show you're code
b_key_cards = 'Cards Cards' in Localization > misc > dictionary
So I've got an enhancement that give xmult when a Joker triggers it while it's held in hand. I'm using post_trigger to do it, but I want to limit it to only giving xmult once per (re)trigger pass instead of giving xmult for every effect, like it would when scored. Any suggestions on how to limit it like that?
if context.post_trigger and context.other_context.individual and context.other_context.cardarea == G.hand and not context.other_context.end_of_round and context.other_context.other_card == card then
these are the contexts I'm using
context.pre_discard and instead of context.scoring_hand use G.hand.highlighted
can you elaborate? I don't get the difference
in context.pre_discard, context.full_hand = G.hand.highlighted
you need to add a localization entry for the consumable type
so say you have mime, two barons, and an enhanced King. currently its giving the enhancement xmult 4 times, but I want it to only give it twice (once per retrigger)
so in the same context as a baron?
should be under G.localization.misc.dictionary.b_your_id_cards
if you only have 2 barons it would still be twice?
each baron happens once
can you let the person that im helping reply to my question
but also mime gives a retrigger so its 4 baron triggers total
and yeah with no mime the enhancement triggers twice
thanks
hmm that's a bit hard because I don't think the contexts get if it's being retriggered
yeah for real, been scratching my head at this thing for a bit lol
the naive solution would be to flag each joker but each enhancement would have to do it separately
someone should make an smods pr for that retrigger checks seem to be a fairly common effect
is there any way to check how many retriggers are calculated for a card? Maybe I could cobble together a fix with that?
I'm trying to add a variant of rare spectral cards that appear rarely in spectral packs like how the soul card rarely spawns in tarot packs. to be clear, they are registered as spectral cards. how can i do that, i want them to not appear in spectral packs like the other ones unless the rare chance is rolled. how do card pools work, is it from the entire consumable type?
hidden = true
does that stop the card from appearing in packs normally?
Yes.
thanks for the help
trying to make something similar to baseball but for negative editions, can't figure out exactly what to include in the calculae function to get this to enact on negative editions
--Antimeme
SMODS.Joker{
key = "j_antimeme",
loc_txt = {
name = "Antimeme",
text = {
"{C:dark_edition}Negative{} Jokers",
"each give {X:red,C:white} X#1# {} Mult"
},
unlock = {
"Have at least {C:attention}3",
"{C:dark_edition}Negative{} Jokers"
}
},
rarity = 3,
cost = 10,
blueprint_compat = true,
pos = { x = 4, y = 0 },
atlas = "jesters",
config = { extra = { xmult = 2 } },
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.xmult } }
end,
calculate = function(self, card, context)
if context.other_joker then
return {
xmult = card.ability.extra.xmult
}
end
end,
unlocked = false,
check_for_unlock = function(self, args)
if args.type == 'modify_jokers' and G.jokers then
local count = 0
for _, joker in ipairs(G.jokers.cards) do
if joker.ability.set == 'Joker' and joker.edition and joker.edition.negative then
count = count + 1
end
if count >= 3 then
return true
end
end
end
return false
end
}
is there an additional context parameter to invoke to be able to fetch the correct methods/properties?
if context.other_joker and context.other_joker.edition and context.other_joker.edition.negative then return {xmult = card.ability.extra.xmult} end
This feels like a stupid question, but the vibe coding ain't working.
Is there a way to draw the pips on the cards? I'm trying to save time from having to save eight different versions of suit sets.
thanks! that works perfectly!
good to have a reference now since the other jokers i've written use the SMODS-adapted source code as a use reference
What do you mean the pips?
the dots
dots on cards/dice are known as pips
The "9
" in the corner
that too ig
Yeah, I didn't know there was a name for those either.
how would i go about converting a single strintg like {C;blue}this{} into a node tree
Is the robe doing this? Or is this like, an actual robe?
I don't really know what I was going for sorry lol. I just want it to maybe have a few folds. witch robes are pretty plain
clothes are hard to shade
I'm trying to make a silly text mod like Balagay, but I can't seem to see what's wrong with my mod metadata. It shows up in BMM, but not in game. Any help?
{
"id": "polylatro",
"name": "PolyLatro",
"display_name": "PL",
"author": ["Lavender9999"],
"description": "Make your Polychromes even more queer!",
"prefix": "pl",
"main_file": "us_en.lua",
"priority": 0,
"badge_colour": "80608a",
"badge_text_colour": "FFFFFF",
"version": "1.0.0",
"dependencies": [],
}
can i see the rest of the file structure
I assume you mean how my folder is set up? This is what I have, I looked through this chat and this is how I read to do it.
Where is the JSON?
That would do it, yeah--
That and your main file is also improperly set
Should be polylatro.lua
even if that lua is just a replacement localization file?
Okay, so, last question; now that my mod works, why is it showing up like this in BMM when the JSON is set up properly to show all it's info?
bmm is weird
i can only assume bmm is set up to read the author from a specific field in the mod index, and not the json of the mod itself
and therefore all local mods will just say "By: Unknown" because they aren't in the mod index
It's weird, because my DeckSkin mods work perfectly fine... ah well, if the mod works, it works.
uh oh
ok so the event queue gets flooded with events pretty much bricking the game if i have a two-faced try to copy another two-faced
i can only assume that the two-faced on the left tries to copy the ability, which involves debuffing the joker to the right, but the joker to the right is itself, so it gets super confused and floods the queue
here's the calc code, any help is greatly appreciated as this is a pretty detrimental bug
calculate = function(self, card, context)
local other_joker = nil
local debuff_joker = nil
for i = 1, #G.jokers.cards do -- Mark Joker to copy and debuff, choose debuffed Joker
if G.jokers.cards[i] == card then
if G.jokers.cards[i - 1] ~= nil then -- Ensure copy Joker exists
other_joker = G.jokers.cards[i - 1]
end
if G.jokers.cards[i + 1] ~= nil then -- Ensure debuff Joker exists
debuff_joker = G.jokers.cards[i + 1]
debuff_joker.ability.two_faced_chosen = true
end
end
end
if debuff_joker ~= nil and not (debuff_joker.debuff and debuff_joker.debuffed_by_blind) then -- Debuff chosen Joker if not aready debuffed
if debuff_joker.ability.two_faced_chosen and debuff_joker:get_seal() ~= "chak_orange_seal" then
SMODS.debuff_card(debuff_joker, true, "two-faced")
end
end
for i = 1, #G.jokers.cards do -- Undebuff previously chosen Jokers which aren't currently chosen
if G.jokers.cards[i].ability.two_faced_chosen and G.jokers.cards[i] ~= debuff_joker then
if not G.jokers.cards[i].debuffed_by_blind then
G.jokers.cards[i].ability.two_faced_chosen = false
SMODS.debuff_card(G.jokers.cards[i], false, "two-faced")
end
end
end
local ret = SMODS.blueprint_effect(card, other_joker, context) -- Copy
if ret then
ret.colour = G.C.BLACK
end
return ret
end
if context.blueprint then return nil end
won't that disable other blueprint effects?
Also why are you not using context.debuff_card?
because i didn't know that was a context it's not on the smods wiki calc func page
outdated wiki strikes again :/
yeah doing this fixes the bug but prevents other copy effects from copying it
yeah and context.debuff_card debuffs cards too slowly to look good, only at specific times like leaving a blind, so reordering the jokers doesn't have an immediate effect
No, hook Card:stop_drag and do for k, v in pairs(G.jokers.cards) do SMODS.recalc_debuff(v) end
Does lovely patches doesnt work on localization files?
Yes, they don't.
thinking about taking a function from jenlib for my own mod (and editing it) ..is that allowed?
i know mayhem uses jenlib, and has that as a dependancy, but i really only need one function from it for a spectral card i wanna do
Which function?
that's already in the game btw
or do you not mean shuffling, but randomizing the card ranks, suits, etc?
nono not shuffling
the card i wanna make is that is randomizes all the suits in your deck
jenlib has exactly that, and a bunch of event logic for how it plays out in the game
kinda want it to be consistent with other mods that do the same thing
check the mod's license and if it allows it then sure
or just ask the devs if you want to be sure
and always remember to credit!
its jenlib, so idk where to even find the license.. or the mod owner
jen didnt want their mods to be shared anywhere but it uses smods which has a license which says "yeah do whatever the fuck you want but this license applies to other shit using this" so you CAN use jenlib code
crediting is the nice thing to do though
alrigh
so after hooking and doing some code rewritting, i've come across an interesting situation where it no longer debuffs itself (intended?), will debuff other cards (intended), but won't debuff a card if it's being copied (unintended)
i'm 100% sure this is because of the if context.debuff_card then if context.blueprint then return nil but i wouldn't know how to structure it any other way
calculate = function(self, card, context)
local other_joker = nil
local debuff_joker = nil
for i = 1, #G.jokers.cards do -- Mark Joker to copy and debuff, choose debuffed Joker
if G.jokers.cards[i] == card then
if G.jokers.cards[i - 1] ~= nil then -- Ensure copy Joker exists
other_joker = G.jokers.cards[i - 1]
end
if G.jokers.cards[i + 1] ~= nil and G.jokers.cards[i + 1] ~= card then -- Ensure debuff Joker exists and isn't itself
debuff_joker = G.jokers.cards[i + 1]
debuff_joker.ability.two_faced_chosen = true
end
end
end
if context.debuff_card then
if context.blueprint then
return nil
end
if debuff_joker ~= nil and not (debuff_joker.debuff and debuff_joker.debuffed_by_blind) then -- Debuff chosen Joker if not aready debuffed
if debuff_joker.ability.two_faced_chosen and debuff_joker:get_seal() ~= "chak_orange_seal" then
SMODS.debuff_card(debuff_joker, true, "two-faced")
end
end
for i = 1, #G.jokers.cards do -- Undebuff previously chosen Jokers which aren't currently chosen
if G.jokers.cards[i].ability.two_faced_chosen and G.jokers.cards[i] ~= debuff_joker then
if not G.jokers.cards[i].debuffed_by_blind then
G.jokers.cards[i].ability.two_faced_chosen = false
SMODS.debuff_card(G.jokers.cards[i], false, "two-faced")
end
end
end
end
local ret = SMODS.blueprint_effect(card, other_joker, context) -- Copy
if ret then
ret.colour = G.C.BLACK
end
return ret
end
No, it's return {debuff = true} not SMODS.debuff_card
Also you would check if context.debuff_card is the card you want to debuff.
even with that change the problem persists
actually i did figure it out with a quick rewrite, if i move the check for the debuffed card to before the context.blueprint check rather than at the step before it gets debuffed, it seems to work as intended
thank you for your help
how do i check if the player has a certain voucher?
G.GAME.used_vouchers["v_whatever"]
oh, hi. thanks!
whats the best way to modify every booster pack for, say, tarot cards. because there are lots of pack variants.
How do you refer to a joker using SMODS.find_card?
SMODS.find_card('modprefix_key')
you need to put j_ if it's a joker c_if it's a consumable etc
SMODS.find_card('j_egg') for example
No no I mean like
If yo uwant to set things to that joker
like setting card.ability.extra.active to false
how do you force highlight cards until the end of a round when using a consumable even before entering a blind
SMODS.find_card() returns a table of all found cards with the specified key, so you can literally do local cards = SMODS.find_card("j_modprefix_whatever"); cards[1].ability.extra.active = false
though you'll want to handle the case where you don't find the card, or find more than one of it
SMODS.Shortcut runs any time the poker hand is calculated, so this definitely won't work how you want it to
I'm having issues loading localization info into a modded joker, technically a partner for the partner mod, and I can't seem to have it work it just reads ERROR for the name, I had made it work before without the use of a seperate lua file for the info but I was told if I want the desciption to update I needed to have a file for localizations but despite looking at other mods and trying it for myself I'm just confused
?
is it or is it not possible to use dynatext for joker's name
a jokers name is dynatext but you can't give it an effect if that's what you're asking
you would need to modify the name nodes in generate_ui
i see
if i wanted to add a custom localization, how would i do it
custom as in... ?
like new "language"
if you just mean for new text for everything in the game
that would be SMODS.language? no?
you mean the dictionary from misc?
when making a localization file theres a bunch of stuff in misc
I dunno much but i know that some others that are with me on cold beans have been using it
that yeah
so is that ur question answered?
also you dont need no k or j_ and what not, unless thats what your loc has
Btw thanks a bunch for your examples, I ended up figuring out my localization file was named incorrectly (en_US when it should've been default) Finally I am rid of the multi-hour horror of dealing with file names
🤝
hi so
does Game:init_game_object just set the values of G or does it create a whole new G object
if you dont set a var to 0 in init_game_object does it carry between runs
G has the gameobjects in it set by that afaik (and probably some other values)
just use G.GAME to save things to run
I need somone who can hack instagram
Somone with experience
In codding
Of that kind
You guys know such guy?
??
dude what
go ask some hacking reddit not some balatro modders 😭
😭
sir this is a balatro modding chat
ts cant be serious
no one doing allat 🤣😭
Loool
sir... this is modding chat... we sell balatro modding here
we are lua coders, not anonymous hackers
why are you laughing with us as if you didn’t just ask the most absurd question ever😭 😭 😭
what was the thought process here
also ignoring that vro wants to hack the entirety of instagram
I have plans for that too
We just need time
And the right people
-# edgelord here holy
you're literally going to get life in prison if you try
instagram is a MULTIBILLION dollar company what do you think will happen
-1000000000000 social creidt
instantly get all of the multi billions of course
🧠
I can do it
Trust me
I have the skills
I learned in the nigerian mountains
How to hack using only my mind
peak
of course, it's so simple!
this might be gilgamesh
-# you're not him bro
Jhon Pork Ahhh
what did i step into 😭
anyways what is the reason for this lovely (not the Lovely injector) crash report i have no idea the reason of
you are attempting to index a local 'deck' that is a nil value in line 67 (!) of the "additions/decks.lua" file of the mod with id "Goodsoups_Garbage"
Apparently it was since loc_vars doesn't like to work in decks 🥀
yes it does
according to the log it only receives self it seems
which makes sense because the deck doesn't exist in the deck select
So it ignores the rest of loc_vars = function(self, info_queue, deck)?
Oh wait yea you make a point
yes that's what I'm seeing at least
So it would work in game, but not on the deck select?
it's weird that it's not documented tho
uhhh probably not
I was adding configuration to my additions earlier, happened to want to add loc_vars to show multiInc (being 2 for that deck)
My only real option is (deck.effect and deck.effect.config.multigain) or 2
yeah
deck and deck.effect
if deck never exists then you would need to use G.GAME.selected_back
Alr, also for the localisation thingy, decks don't show descriptions when I add a loc key :D
Dunno why 🥀
Like key = "j_GG_blahblahblah"
In loc_vars
I will see later what I can do to change this, since apparently although name works fine, text for decks in a localisation file does not pick up unlike loc_txt
yea but im saying do i need to reset it in initgameobject
and if i dont does it carry between rounds
no
I felt like doing this after making a joker that looks officially vectorized and thought how a joker but in that HD would look for the game:
so why would you set a var in init game object exactly
idk some people don't understand how nil values work so they initialize it so it's never nil
if you mean why thunk did it it makes sense for organization
oh ok
on second thought having a array variable being potentially nil is probably a bad idea
how do i add another label
like how rarities
show the label on the joker
can i add another thing like that, next to the name and rarity?
Hello again with another problem:
why does the game crash when you try to load the voucher with the custom shader?
do i need to put the prefix of the mod?
yes you need the mod's prefix
alright...
How do you make it so a joker can draw x amount of cards to deck?
anyone know what i mean?
Like if you have 8 cards the joker can draw 10 extra cards to give you 18?
SMODS.current_mod.calculate = function (self, context)
--#region Retrigger Jokers that care about 3s (rank) if a 3 (suit) is played
--TODO: Figure out why Hack sends 'Found effect table with no assigned repetitions during repetition check' message
local map = {
j_hack = true,
j_odd_todd = true,
j_fibonacci = true,
j_cry_wee_fib = true,
}
if context.retrigger_joker_check then
local jokerkey = context.other_card and context.other_card.config and context.other_card.config.center and context.other_card.config.center.key or nil
if map[jokerkey] then
local count = context.other_context.other_card:is_3()
if context.other_context.other_card:get_id() == 3 then count = count - 1 end
if count >= 1 then
local joker = context.other_card
return {
repetitions = count,
message = localize("k_again_ex"),
message_card = joker,
}
end
end
end
--#endregion
end
why does this result in Hack sending the 'effect table with no assigned repetitions' message? at no point am i returning a table without repetitions, i'm pretty sure?
SMODS.draw_cards(number)
thx
gah, never mind, i just realized it's going to break something unrelated and i shouldn't do it like this to begin with
guys, I genuinely don't understand what's the problem here 😭 (don't mind the contexts of second if, idk how to properly do what I want it to do)

