#đ»ă»modding-dev
1 messages · Page 18 of 1
I got a cool effect idea you could do for the effect
"Wild Cardback - Rare - The Lowest Hand you can make is a Full House"
the problem is that i don't know how to add jokers lmao
oh
i can replace images
Right, forgot that's a problem lol
atleast we can have a view of how the joker will look like
What have you done so far?
Try adding this to the game. Itâs missing a header and the assets #âă»modding-general message
Hereâs a version with the header ```lua
--- STEAMODDED HEADER
--- MOD_NAME: Four Leaf Clubber
--- MOD_ID: FourLeafClubber
--- MOD_AUTHOR: [Victin]
--- MOD_DESCRIPTION: Lucky Clubs trigger again
------------MOD CODE -------------------------
local localization = {
fourleafclubber = {
name = "Four Leaf Clubber",
text = {
"Lucky Clubs trigger again",
}
},
}
function SMODS.INIT.FourLeafClubber()
local jokers = {
{
name = "Four Leaf Clubber", slug = "fourleafclubber",
config = {extra=1}, rarity = 1, cost = 0,
blueprint_compat = true,
eternal_compat = true
},
}
-- Add Jokers to center
for _, v in ipairs(jokers) do
SMODS.Joker:new(v.name, v.slug, v.config, {x = 0, y = 0}, localization[v.slug], v.rarity, v.cost, true, true, v.blueprint_compat, v.eternal_compat, "", "j_"..v.slug):register()
SMODS.Sprite:new('j_'..v.slug, SMODS.findModByID("FourLeafClubber").path, "j_"..v.slug..".png", 71, 95, "asset_atli"):register()
end
-- Lucky Seven
SMODS.Jokers.j_fourleafclubber.calculate = function(self, context)
if context.repetition then
if context.cardarea == G.play then
if self.ability.name == 'Four Leaf Clubber' and context.other_card:is_suit("Clubs") and context.other_card.ability.name == "Lucky Card" then
return {
message = localize('k_again_ex'),
repetitions = self.ability.extra,
card = self
}
end
end
end
end
sendDebugMessage("Loaded FourLeafClubber~")
end
------------MOD CODE END----------------------
The assets should be a folder inside the mod folder named âassetsâ, and then two folders â1xâ and 2xâ (or maybe the X came first) with an image j_fourleafclubber in each
so i need to create another mod?
I mean, I think itâs easier if you create another folder for a new mod so you can at least get this working
You also probably should temporarily move your modâs folder elsewhere just so it doesnât stop the game from loading if itâs still crashing
Does the effect work?
Itâs easy with Debug Mode mod
Idk I havenât used deck creator
Now get some Lucky Clubs
I suggest slowing down the game speed so itâs easier to see if it works
There we are, you can now (kinda) see all the removed spots for jokers that didn't appear in versions
let me record
at least i categorized them by that
what on earth am I looking at
The Joker list
Barcode
Anything in Black is a joker not appearing in a category of the game
well it worked fine
There you go
Now you have a working mod to copy from
Most of the magic happens inside calculate_joker though sometimes you need to hook into other functions to make some effects work
when i get a bit more hyped i will start learning more
i'm still new to this
its like every other game modding, i start without knowing nothing
then i get the basics
i remember when i started modding crosscode
i was so new that i did even know what was a json file
lol
I started with a small mod to learn how to mod; Iâd have liked to release it for beta testing but I held in from it because 1.0 seems like itâs coming soon⊠though maybe I should just release it since most people are on 0.9.8 anyways
oh boy if that aint a mood (it aint stopping me, it's the coding that is /silly)
how do i add another joker in the same file?
The way I wrote it, you need a new entry in the localization dictionary, a new entry in the Joker dictionary, and then you manually write the methods it needs to work
so how do i do it?
To you code in any other languages?
Uhhh
and a bit of js (i'm not a genius)
Iâm not familiar enough to compare to any of them
Anyone know if there are any mods with consumables that have an effect on jokers I could take a look at?
{} are arrays delimiters in Lua; you can see that localization and jokers in my code are arrays of arrays
What kind of effect?
any effect that needs to check that jokers are present or available to receive an effect
like this?
uhh
where is my screenshot?
The base game does do that already
there
Yes
yeah but when I copy what I've found in base game I just get errors when I select my card
then what do i do next?
What do you have?
do i just call another function?
Well, thatâs the localization, you need the parameters in jokers
Thereâs a list of them in the Steamodded wiki
Also I have some comments I copied from elsewhere
local joker = {
slug = "the_red_hand",
name = "The Red Hand",--name used by the joker
config = {extra={}}, --variables used for abilities and effects.
pos = { x = 0, y = 0 }, --pos in spirtesheet 0,0 for single sprites or the first sprite in the spritesheet
rarity = 1, --rarity 1=common, 2=uncommon, 3=rare, 4=legendary
cost = 3, --cost to buy the joker in shops
blueprint_compat=true, --does joker work with blueprint
eternal_compat=true, --can joker be eternal
unlocked=true, --joker is unlocked by default
discovered=true, --joker is discovered by default
effect=nil, --you can specify an effect here eg. 'Mult'
atlas=nil, --defines the atlas that you want to use for the sprite sheet. atlas=nil if you want to use single sprites
soul_pos={ x = 0, y = 1}, --pos of a soul sprite.
}
Usually you want soul_pos to be nil, so you can either delete or replace the array with nil
Can what work?
this is my code and this is the error I get when I click on my consumable
If you look at can_use_consumeable, it has an if before it arrives at the if you copied
well i did it
LMAO
gonna see if it works
the effect doesn't work (the one i tried to make)
i'm trying to make the new joker reactivate diamonds
even wrapping it in that if it still throws the same error, it doesn't have anything stored in eligible_editionless_jokers
oh I think I've figured it out
What did you do?
the effect just doesnt happen
Maybe you spotted it, but I searched to see where eligible_jokers is created and it seems that itâs updated every frame
I mean, I got that, but how did you implement it?
yeah that's what I found, so I need to hook into that function too right?
Is the Joker named âFire In The Holeâ? Isnât it âGeometry Jokerâ?
Either hook or inject into it
sweet
oh
it needs to be named after the joker?
đ
mb
Actually you can remove that part
where's the pseudorandom stuff defined?
At the time I didnât know but Steamodded doesnât need to check for the Jokerâs name inside calculate
misc_functions
one question, can i put this code into another mod i made and make it work there?
like, i changed some textures in that mod i made
You can use it as reference
You don't need the ability.name check inside a calculate function
how do i make the diamonds get retriggered by the joker 2 times?
Check how repetition joker works (Hack, Hanged Chad) and use the function check the suit (forgot what it's called, x:is_suit("Diamonds") I think
Looking at my calculate, you can see it uses the value I defined in self.ability.extra
i tried many things and it did not work
Changing that value increments the number of repetitions, as the calculation for repetitions is already done by the game
how do i change it?
Type another value
like another repetitions?
What do you mean by another?
In my code itâs defined in the joker array
how do I replace vars in the collection?
How does Ox do it?
I mean, it refers to the most played hand, so it has to do something either by having a default value or by it being hardcoded elsewhere
I use the same value tho
and the second value I created also has default value
Again maybe it's hardcoded elsewhere
hmmm
that's "ph_most_played" and it's used it vars
okay I got it
vars that are in the blind's SMODS.Blind:new are the ones I need
about to play a high card with the chips and mult of a straight flush
true
it has that ability, making your bad hand play good hand's score
but it really really depends
okay gonna ask AGAIN
because I need to finish this like now
How do I make the game start with a joker
idk try injecting into Game.start_run maybe?
I never tried to but that'd be the first thing I'd try
Lemme check rq
I thought it'd be easy since there's start with consumable and start with Voucher
You could append Back.apply_to_run with code that's very similar to how consumables are loaded
I have to find how the consumables are loaded then
Wait, what if I used the old random joker effect from Archived?
That could work
Though that may just give me a random joker
No that's a random joker
Lemme try the method you sent
Well that worked
that was like... stupid easy
Life saver
using smod 0.9.8 can I also inject ito a certain place using lovely?
You only need lovely for that
oh right, I can inject to certain lines what I need then just append my main stuff at the bottom of the file?
What do you need exactly?
I want to add my custom edition to the option cycle in game.lua line 1307 so I can cycle to it in debug mode
although that's not actually that important to do
nvm
sounds like a job for lovely
Tell me when you do
I tried earlier and it didnât work
i think you might need to use lovely to inject a check for your edition but im not 100%
i need to learn how to use lovely XD
this guy really works
and i love it
i need to thank @zealous glen for helping me with this
tysm man
one of us one of us one of us
what file is the Not allowed! code detection in again...?
ooh, perfect! i can hook right into it
how do i make a joker give me chips?
I did inject for it but it doesn't work when I use the custom localization key I added
It works when I switch to the negative consumable tooltip
It's quite simple
at least if you don't need to do regex
Is there a similar Joker in the game?
Like the Jokers that grant Chips when your hand contains a specific hand?
yeah
You can search the source code for how they're implemented and do the same
FYI they mostly return an array with the number of chips and a localization key; also you need to find the appropriate context which can include implied absent context due to the tower of if-elseifs
Oh I know regex
(it can also just be joker_main but not be explicitly called as such)
i get this error
every time
:(
What does the jokers array look like?
By the way, do you have any suggestions regarding localization troubles?
could you be any more specific than that?
I can make negative playing cards show the badge and tooltip for negative consumables, but as soon as I try to display a custom tooltip it errors
morning balatroheads
how do i make the chips message appear?
you might need to hook into this portion of card_h_popup
or well, create loc entries for the corresponding label and add the badge color to get_badge_colour
Already done that
Again, you probably just need to return an array with the correct info
Because the game does the displaying for you
(you can do it manually too)
also i'm getting an error everytime i start a round with the joker
What does the calculate function look like?
well that's all that negative consumables do, idk how differently playing card UI gets generated?
If I let the key be negative_consumable it works
@worldly sapphire
i don't even know if its working
You don't need the self.ability.name. It's probably missing some relevant context or lack of context
so it definitely doesn't have a function hand_name
Also what loadingâŠ[^^^^__] said
idk what is the hand name check
That's what looking at existing Jokers and which contexts they use help
i did that in the jokers section
Keep doing it
please call me Aure
he actually does this
but idk if it works
That doesn't do much by itself besides initialize some data
context.scoring_name == 'High Card'
The calculate does the actual jokering
well, since the config has a type he ought to use self.ability.type
so how do i do it?
does that even get copied to ability? I'm too lazy to think about that and like to just put things in extra
I'm lazy too
I donât think anyone except maybe thunk has all contexts memorized so I just look them up as I need them
can you help me with the idea, like i'm making a joker that acts when i play a high card
it gives 100 chips every high card played
thats SMODS.end_calculate_context(context) i think
Well, I have made this, maybe its code will help
Is that in 0.9.8? I remember trying to GitHub search it but it didn't return any results. Maybe I searched wrong since I did it from memory
Yes it is
local joker = {
slug = "the_one",
name = "The One",--name used by the joker
config = {extra={Xmult = 6, type = 'High Card', rank = 'Ace', suit = 'Spades'}}, --variables used for abilities and effects.
pos = { x = 0, y = 0 }, --pos in spirtesheet 0,0 for single sprites or the first sprite in the spritesheet
rarity = 3, --rarity 1=common, 2=uncommon, 3=rare, 4=legendary
cost = 8, --cost to buy the joker in shops
blueprint_compat=true, --does joker work with blueprint
eternal_compat=true, --can joker be eternal
unlocked=true, --joker is unlocked by default
discovered=true, --joker is discovered by default
effect=nil, --you can specify an effect here eg. 'Mult'
atlas=nil, --defines the atlas that you want to use for the sprite sheet. atlas=nil if you want to use single sprites
soul_pos=nil, --pos of a soul sprite.
}
joker.calculate = function(self, context)
if context.cardarea == G.jokers and (not (context.before or context.after)) and context.scoring_name and context.scoring_name == self.ability.extra.type and context.poker_hands and next(context.poker_hands[self.ability.extra.type]) then
for i = 1, #context.scoring_hand do
if context.scoring_hand[i]:get_id() == 14 and context.scoring_hand[i]:is_suit('Spades') then
return {
message = localize{type='variable',key='a_xmult',vars={self.ability.extra.Xmult}},
colour = G.C.RED,
Xmult_mod = self.ability.extra.Xmult
}
end
end
end
end
hmmm lemme try again
yeah it's there; maybe I had searched for end_calculate_joker or something
so if I add a new context I should make a hook for it and add return end_calculate_context_ref(c) and not context.new?
for 0.9.8 you may screw up vanilla jokers
1.0.0 resolves this by injecting SMODS.end_calculate_context(context) into vanilla code
Nothing seemed to break when I added a new context for selling other Jokers without changing end_calculate_context, which is why I'm not sure what I should do
how do i disable the debug mode lines?
were you also packaging an existing joker context?
What do you mean?
can I get the Credits info badge code pleaseee
Hmmm ah I only put the screenshots in the Balatrostuck thread not the code
in your calculate_joker call
Here's the copiable version:
local info_tip_from_rows_ref = info_tip_from_rows
function info_tip_from_rows(desc_nodes, name)
if name == "Credits" then
local t = {}
for k, v in ipairs(desc_nodes) do
t[#t+1] = {n=G.UIT.R, config={align = "cm"}, nodes=v}
end
return {n=G.UIT.R, config={align = "cm", colour = darken(G.C.GREY, 0.15), r = 0.1}, nodes={
{n=G.UIT.R, config={align = "tm", minh = 0.36, padding = 0.03}, nodes={{n=G.UIT.T, config={text = name, scale = 0.32, colour = G.C.UI.TEXT_LIGHT}}}},
{n=G.UIT.R, config={align = "cm", minw = 1.5, minh = 0.4, r = 0.1, padding = 0.05, colour = lighten(G.C.GREY, 0.15), emboss = 0.05}, nodes={{n=G.UIT.R, config={align = "cm", padding = 0.03}, nodes=t}}}
}}
else
return info_tip_from_rows_ref(desc_nodes, name)
end
end
G.localization.descriptions.Other["ModName_credits_example"] = {
name = "Credits",
text = {
"{C:white}Something by{} {E:1,C:white,S:1.1}Person"
},
}
and in the joker itself you need
joker.tooltip = function(self, info_queue)
info_queue[#info_queue+1] = {key = "ModName_credits_example", set = "Other"}
end
@golden lake but I did find a bug with this implementation
The Edition tooltips don't show up
for Jokers with credit tooltips
thats a steamodded issue
Oh. What's the issue exactly?
wait, i can't hook into this?
when you add modded tooltips it causes the vanilla game to think it already added its tooltips for some reason
Actually let me take a closer look at my own code. I might have been thinking of an older version of the code which I updated to only use vanilla contexts.
i forget precisely
shouldn't it be local debuff_hand_ref = Blind.debuff_hand?
sticker tooltips might be added separately
im on 1.0
i'm just confused.
(for winning joker stickers)
I thought the bug was with my code, but if it wasn't then it's fine
See if that works
maybe? idk
1.0 has a different way of doing stuff
I just overload the tooltip if the name is "Credits" but a smarter way to do it would be to name it "Credits_ModName"
so it wouldnt be joker.tooltip
Maybe not, but as long as the dictionary with the proper key and set gets passed to the info_queue it works
Because I hooked into a vanilla function and added directly to the localization dictionary
About what exactly?
Welcome to the club
@worldly sapphire try this for reference
tooltip function in the constructor
does it give +2 chips to nonscoring cards
nah, it doesn't do anything
it would, actually
oh?
it's just not done the janky way
i still can't understand
i was making a balatrostuck joke
i need an explanation
The first part is just me defining variables for the joker. The only important part is the config array which contains the extra array which contains information we'll use later.
The calculate function is where the magic happens
this is the config btw
That's fine, as I said I added mine so you'd know what calculate does
0.9.8
@worldly sapphire
calculate for this Joker checks if:
- Is it being evaluated while in the player's Joker area?
- Is it not before a hand is played? Is it not after a hand is played?
- Is there a hand name? Is the hand name the name this Joker has saved in
extra.type? - Are there poker hands? Is there an element inside the poker hands array?
When all of that is true, then the Joker evaluates each card in thescoring_hand. When the Joker finds a card that is both anAceandSpades, it returns an array that tells the game to create the messagea_xmultwith valueextra.Xmult, aG.C.REDcolor, and to apply the modifierextra.XmultasXmult_mod
oh man
i just need a little example on how do i make the joker work by giving me chips
Look what key and variable vanilla jokers use
The variable is probably something like chip_mod or chips_mod
and the key a_chip or a_chips
its t_chips
That's the variable you defined, I mean the variable the game wants you to pass
You can name your variable whatever, but the game will want specific_variable_name = whatever at some point
i copied from the code. idk if this is the way to do it
i'm just confused
idk what i am doing
you don't need the name check...
uhhhhh
you're also missing an if on the second line
AHHHH, i'm losing my mind
i mean, i'm not saying it needs to be
but that's still probably why it's crashing
in other news
matador rework is underway
no hardcoding~
okay so rookie
try removing the if entirely
when aure says you don't need it
good to assume you don't need it
you dont need the whole == statement or the then part either
or the matching "end" at the end
take that entire second line
i'm getting crazy
and throw it on the ground
For one the syntax on the second line is wrong
yeah, we figured that part out
but aure said that it was entirely unneeded anyway
Delete it?
YES
ALRIGHT
THAT IS WHAT THE CREATOR OF STEAMODDED WAS TRYING TO TELL YOU
SORRY
also me
and then make sure to get rid of the "end" line after it
I said that earlier
yes you are making a function for your specific joker and that if statement checks that the name of the joker its running in is the name you've assigned the joker anyway
it's pointless
it's redundant
also, shouldn't loc_vars be defined in the joker's loc_def() function anyway?
That's partially my fault for sending my first joker as an example
tbh I think he just wants the array
the name can be whatever
the syntax is wrong
only the SMODS line is there now
did you remove the end which came from the if?
show us the entire block
Alright, it should look something like
calculate
(âŠ)
end
its this
I mean it's almost syntactically correct except for the missing end
but it doesn't help with the goal of doing something specific
i'm implying they remove the associated end as well
Lua functions and if/for/while-statements need end like ( needs )
the game crashed when i played a high card with the joker
lol
it actually loaded this time
it loaded
but it crashes
when i send a high card
see this for reference for the appropriate contexts and somewhat the return array
again Idk what keys you want in the array but you can look for other jokers to find the appropriate keys
i just want it to give me 100 chips when i play a high card
:|
i used the Crafty joker as base
because he gives 80 when a flush is played
There's a tower of if-elseifs to evaluate Jokers
so you need to put the same checks Crafty needs inside calculate
Which should be the same I use
oh i know how to do that, rookie
hang on, let me get the syntax
context.poker_hands["top"] == context.poker_hands["High Card"] is the boolean you want
there's also context.scoring_name
a brief excerpt
which is like 500 lines or more
ah, good deal
it's all here
well, all relevant context
The first if is pointless
The first part of the second if is also pointless
The next(âŠ) block is relevant but you want to make sure context.poker_hands exist first
Thatâs what if ⊠and context.poker_hands and ⊠does
and statements are evaluated in order, so you want to make sure it exists before you try to compute next(âŠ)
still not working, i think i give up for today
i LOVE making pack art
ohhhhhhhhhhhhhhhhhhhhhhhh
sometimes it can take some time for me to understand
an unscored hand doesn't even call calculate_joker! good to know
did i just help with something?
is this a tennis ball
@worldly sapphire
if context.scoring_hand and context.scoring_hand == "High Card"
replace both your if statements with that
if you want to make a joker that triggers on playing high card
like this?
just one is fine?
yes
just make sure you remove one of the ends underneath
to balance
you need to make sure your ifs and ends are...
i played a high card
and the joker did not activate....
i'm starting to break
for context here is the jokers section
here is the joker effect
i will brb
that's not how you do poker hand evaluation
the correct form if next(context.poker_hands['High Card'])
no lol
oh, i see!
also it's not context scoring hand
if context.joker_main and next(context.poker_hands['High Card']) is correct form factor LOL
anyways peep this
@worldly sapphire there you go
niiiiiiiiiiiiiiiiiiiice
it also says "Horoscope" in Alternian alphabet
and the Pack text is a reference to the Trollian chat client in Homestuck
You forgot the extra between ability and t_chips
Yea it triggers whenever there's a context.scoring_hand, might trigger 4 times or something
We do a little
i'm back
going to test it in a bit
it would help you massively to literally just unpack Balatro.exe and read the contents of it
read the actual code
lua is easy what
Did you do this?
its because i'm more used to json
use Ctrl+F to search for relevant jokers in card.lua
and a bit of js
And see how they do things
You literally just like type in Cavendish into search in card.lua and bam, all mentions of Cavendish
or Hiker and you get mentions of Hiker
I find the whole chat being paralyzed because you need help to be frankly irritating especially since you've done very little in way of researching this yourself
Please make an effort to read and comprehend the source code then ask for clarification
i am sorry if i made the chat filled with questions
Don't make this other people's problem
It's going to be better for you too, because you'll actually understand what you're doing rather than just taking shots in the dark
and, its giving me chips when i play a flush
probably i need to change something
So what you'll want to do is go into card.lua
And search for a Joker that you can think of that triggers on specific poker hands
Crafty joker
Bad example, Crafty Joker is one of the automated jokers
its entire logic is fully abstracted away
yeah, what i suggested is this:
context.poker_hands["top"] == context.poker_hands["High Card"]
as a condition
maybe not the most efficient way to get it, but certainly a reliable way
here's code for Seance
if self.ability.name == 'Seance' and #G.consumeables.cards + G.GAME.consumeable_buffer < G.consumeables.config.card_limit then
if next(context.poker_hands[self.ability.extra.poker_hand]) then
G.GAME.consumeable_buffer = G.GAME.consumeable_buffer + 1
G.E_MANAGER:add_event(Event({
trigger = 'before',
delay = 0.0,
func = (function()
local card = create_card('Spectral',G.consumeables, nil, nil, nil, nil, nil, 'sea')
card:add_to_deck()
G.consumeables:emplace(card)
G.GAME.consumeable_buffer = 0
return true
end)}))
return {
message = localize('k_plus_spectral'),
colour = G.C.SECONDARY_SET.Spectral,
card = self
}
end
end
I think they mightâve confused it for context.scoring_name but thatâs probably on me for not being more specific, since my Joker only cared about High Card being scored
wait dude
@golden lake you do realize that all hand codes are grabbed individually
Originally they didnât add the variable to extra, just directly to config/ability
and the results table has data for every single hand type that a played hand contains, right?
i played a flush, and still got chips
the reason i coded it that specific way, rookie
it did not checked for a High card
is because all played hands contain high card
by vanilla game logic
mb sorry
Uhm they seem like they did tho
Thatâs why you want context.scoring_name
See
Unless its even way before
@golden lake did you get credits working?
@zealous glen
you know what this is referencing right
sorry for all the trouble i gave to you guys. i will stop the modding a bit just to study how it works
but atleast i learned
That time ||Terezi walked to meet Vriska in the Dream Bubbles||?
you did learn!
not in the || Dream Bubbles ||
The floating path reminded me of them
i have to thank everyone
even if i gave trouble
đ«Ą
I thought the path was different depending on the memory, but that specific one mightâve looked different
how do you soul_pos
There's a specific part on the joker creation
Oops-- I put that message in the wrong chat.
Guess I'll repost here.
What the mouth or the eye does
I've been trying to make a Joker card that does sorta like what "The Family" does, but with 5 of a Kind.
SMODS.Joker {
key = 'quintet',
name = 'The Quintet',
atlas = 'FittingJokers',
pos = {x = 4, y = 2},
loc_def = function(self)
return {self.ability.x_mult, localize(self.ability.type, 'poker_hands')}
end,
loc_txt = {
['en-us'] = {
name = 'The Quintet',
text = {
"{X:mult,C:white} X#1# {} Mult if played",
"hand contains",
"a {C:attention}#2#"
}
}
},
rarity = 3,
cost = 8,
config = {xmult = 5, type = 3},
calculate = function(self,context)
if self.ability.type == (scoring_hand = poker_hands["Five of a Kind"]) then
return {
xmult = self.ability.x_mult,
card = self
}
end
end
}```
Anyone here with some lua experience and can point out what I'm doing wrong with that if-then statement in the `calculate` section?
hi #đ»ă»modding-dev, is there a way i can change the suit names? tryna make custom cards
where would the suit names be located?
What file are the functions for the vanilla Joker cards stored? For example, where can I view Gros Michel's calculate function?
card.lua, line 3018.
Thanks!
What is the proper way to view the output of sendDebugMessage()? I searched the channel and someone mentioned a "steammodded logger" which I don't believe I have.
Cool Egg
thoughts?
i feel like the background could have a little more shading but thats it really
looks good
Is there a way to guarantee my custom joker will show up in the shop so I can test it?
you can use the debug mod to spawn it
I'll try that. Thanks
You need lovely to get the command terminal
I think
wait
does context.individual calculation not get called on debuffed cards?
IT DOES NOT
lmao
yeah that seems pretty good
nice!
haha, women
oh sick tag api
oo i have no idea what this is but cool art!!!!!!!!
(oh also i still need this lol, PLEASE ping me if you know this)
this means that 2 and 3 are going to tecnically be out of order and that's going to be so annoying to me
đ€Ł
homestuck
if context.end_of_round then
if pseudorandom(self.ability.name == 'Plague Joker') < G.GAME.probabilities.normal/self.ability.extra.odds then
G.E_MANAGER:add_event(Event({
func = function()
play_sound('tarot1')
self.T.r = -0.2
self:juice_up(0.3,0.4)
self.states.drag.is = true
self.children.center.pinch.x = true
G.E_MANAGER:add_event(Event({trigger = 'after', delay = 0.3, blockable = false,
func = function()
G.jokers:remove_card(self)
self:remove()
self = nil
return true; end }))
return true
end
}))
end
else
self.ability.extra.baseMult = self.ability.extra.baseMult * self.ability.extra.xMult
return {
message = localize('k_upgrade_ex'),
colour = G.C.MULT,
card = self
}
end
end
Should I be doing the end of round actions in the calculate function? My game crashes when I submit a hand for play, and I'd assume this is the reason.
pseudorandom(self.ability.name == 'Plague Joker') is the same as pseudorandom(true)
everything happening in the else area is happening in every context that isn't end_of_round
I was going off of Gros Michel code and thats what they did. I realized that too, but wanted to stay accurate
oh yeah... big mistake
Also doesn't exclude context.repetition
gros michel's code uses self.ability.name == "Gros Michel" and "Gros Michel" or "Cavendish" iirc
Yea
its a ternary
it says "if the name is gros michel this is "Gros Michel", else "Cavendish""
it's the same as self.ability.name == "Gros Michel" ? "Gros Michel" : "Cavendish" in programming languages that use real symbols
fr wtf is ~=
Real languages use != TRUE
double
Wait, what exactly is repetition context? I've seen it but not sure what it refers to
there ya go
repetition is for anything that retriggers
@stray warren yeah, retriggers
yep
it can cause issues if anything runs in it that isn't a retrigger effect
It has a different return than other contexts so you have to exclude it else you'll run into errors
so you need to be careful to exclude it for a lot of situations
i'm just so upset that there's no way to trigger effects when a debuffed card is played
same with context.individual, because context individual iterates over a set of individual playing cards
make sure to exclude it too
so just add and not context.repetition to the end_of_round if statement? as well as individual?
otherwise you'll get an error saying that the for loop can't terminate
because context.individual skips debuffed cards
in this situation its the same but consider the general case a and b or c, if a is false and b is 0 or false then the result is c, not b
and not (context.individual or context.repetition)
as a rule of thumb
you have to remember that the way Jokers are written in Balatro's source code is in this huge tower of if-else statements
if you add a new joker you have to basically do that tower all over again
in a single joker
keep in mind this function exists in SMODS
goooooooooooooooooooood morning
morning federation
good 11:35pm feder
yeah, in 1.0
Makes sense. Thanks!
it exists in 0.9.8 too
We love elif chains â€ïž
what are you guys doing?
art
ms. balatro Stuck smarty Pants
bites you
oh these look good
lewd
yes
thank youu
feder whats the status on 1.0ifying for your mods 
working on 1.0ifying codex
Also real quick, at the end of the round, it's saying bad argument #1 to 'randomseed' (number expected, got boolean) in the crash report. Is there something different I'm supposed to put in pseudorandom?
are you just porting over the alch cards now
the string will be your unique seed for that pseudorandom call
yes
Ok. I'll try that.
but it includes rewriting some stuff as well
are you moving away from registering everything individually 
hahahahaaha (no)
đ
the word mult itself isn't highlighted
THIS IS JOKER
real
i might write a script for that
Speaking of which, Relic Jokers is ported to 1.0 (Starborn Gauntlet doesn't work for some stupid reason but I wanna rework it anyways, effects is boring)
damn everyones porting to 1.0
i should hope so
now JellyMod is double incompatible lmao
at least people will have more direct issues with trying to load it rather than getting ingame and having things not work
@frosty dock does 1.0 support locked stuff?
a product of its time
i dont think there's a specific framework for unlocks, no
colors are colors and colors 
i think having them darker than standard cards works well for the âš vibe âš
Okay, sorry, but now I'm confused again lol. I added an else statement within the context.end_of_round if statement, and I'm getting the 'for' limit must be a number error again
Misspelled repetition
oop, good catch
consistently getting a crash when trying to use asset_atlas on 1.0.0 in any way (currently just trying to add an icon), and this extends to other 1.0.0 mods that should be useable? latest version of cryptid produces the same crash
i feel a little stupid, i think i'm missing something
yeah idk what's up with the atlas
isnât there a sprite method in vanilla?
nah i just loaded 0.9.8 up with custom font /s
and removed the oddities
So, will my custom jokers show up in the shop automatically, or do I have to implement that myself?
i belive its auto
holy shit the extend system BANGS
Balatrostuck.Zodiac = SMODS.Consumable:extend{
set = "Zodiac",
prefix = 'c_zodiac',
}
you can like
extend any SMODS type
and have it retain all functionality
and add your own defaults
local programmer discovers object-oriented programming
OOP has it's issues sometimes but when they're not present it's so good.
im literally a C# dev lmao
death
btw moving the rank number to upper left was such a good chocie
i'm going insane i've combed literally everything to try and find what i've done wrong with installation đ
whats your code lmao
đ
wh
no that works
isnt ({}) and {} the same
SMODS.Sprite{
key = "HomestuckJokers",
path = "hsjokers.png",
px = 71,
py = 95,
atlas = "ASSET_ATLAS"
}:register()
this is my sprite register
SMODS.Sprite({ key = v, atlas = "asset_atlas", path = (sprite and "j_" .. v .. ".png" or "blank.png"), px = 71, py = 95 }):register()
yea i was thinking its probably a capitalization thing
also px and py is 34 not 32
but idk anything about smod frfr
they are the same thing
the string gets :upper()'d so
oh
idk why that wouldnt work
maybe the path is wrong?
i know the requirement for a :register() call was removed on most things in a recent patch but its supposed to not matter if it's called twice
alright i'll try this
nope
again, i'm pretty sure it's an installation issue?
have you reinstalled?
im like, pretty sure its not an installation issue unless your download got corrupted or something halfway through
you have core debug loader and assets, right
tell me you have the smods assets
this is what your smods folder should look like
the error might not be in reference to your code
rather in reference to SMODS being unable to locate its atlas
@royal ridge
also is cryptid even on 1.0
thats not the problem
girl this is literally. my code. that works
cryptid isnt loaded up on that
yea that would explain why cryptid doesnt work either
oops, pinged the wrong person, mb
sorry, just a little excited bc i wanna show something off
uh
but it seems like someone's having a problem when i have something to share
where's your lovely.toml
^
oh
đ
Oddity Tag??
i mean
!
what an odd tag
i guess i'll just show off what i did
also reinstalled everything several times yes
yus :3
what is the "debug" mod
also the mod icon
@golden lake #1209857245316255744 and #1228149931257237664
debug mode enabler, i removed it and the crash still occurs
it happens when clicking the "mod" tab on main menu, fyi
yes if i remove the icon it's fine
very quirky
can i eat it
aaaaaanyway
no no
smh my head
this is the commit im on
fyi
i dont get the icon issue
you should kill aure over this though
bites you
rude
this commit works
lewd
oh
@frosty dock breaking icons on Loader improvements
or changed it or something
please investigate
it's more than just icons, i removed icon_atlas from cryptid and it still crashed on launch, so i think its a general asset issue?
oh i know whats the issue
function SMODS.GameObject:__call(o)
local should_prefix_atlas = o.atlas and not o.raw_atlas_key and not (self.set == 'Sprite')
setmetatable(o, self) setmetatable(o, self)
o.mod = SMODS.current_mod o.mod = SMODS.current_mod
for _, v in ipairs(o.required_params or {}) do for _, v in ipairs(o.required_params or {}) do
assert(not (o[v] == nil), string.format('Missing required parameter for %s declaration: %s', o.set, v)) assert(not (o[v] == nil), ('Missing required parameter for %s declaration: %s'):format(o.set, v))
end end
if not o.omit_prefix then if not o.omit_prefix then
o.key = string.format('%s_%s_%s', o.prefix, o.mod.prefix, o.key) o.key = ('%s_%s_%s'):format(o.prefix, o.mod.prefix, o.key)
end
if should_prefix_atlas and o.mod then
o.atlas = ('%s_%s'):format(o.mod.prefix, o.atlas)
end end
o:register() o:register()
return o return o
yeah i can't observe emojiokers either huh
ok adding the prefix on the atlas worked on emojiokers but not odditytag.... hum
whats the prefix for oddity
Thatâs pretty odd
with the sprite registering as OddityTag
what if you removed the odd_ from odditytag
same issue as above
sprites skip prefixing
wait
what if you prefix the
this will sound stupid but
prefix your icon's name
with your mod's prefix
thats what i was doing
here
wtf
i havent actually made the Oddity Tag itself
this is just modicon
(which will be the same sprite)
@frosty dock i will ping you 20 times until you wake up and explani this
how are you registering the sprite
loader "improvements"
petition to kill aure with firearms
launching the egg
works very hard or is hardly working
are you gonna develop steamodded
one hour in the gbj for aure
im gonna develop autumnmooded
i'm too lazy to revert the commits so i'll be coding without testing
oh no
aure: "ive made loader improvements
"
balatrogamers:
(this is all jokingly)
(accidental breaking changes happen)
(that said aure will have to spend an hour in the gbj)
okay, so did we solve it?
apparently yes
Flashback to when consumables broke
oh that's fun!
have to use this commit: https://github.com/Steamopollys/Steamodded/commit/bf202af0479794e23849ab2bff1328d3d04a9ff3 or earlier for the time being
sorry, i'm just really excited
which means no tag api yet
because i managed to accomplish this!
unless you splice together commits but that sounds annoying
ima have to recode my code soon đ«
i will, sorry
in the middle
a lot of my descriptions are like that right now, because it's kind of WIP
congratulations on learning how to use lovely i think
^^
oh no
autumn how did you fix it did you just downgrade
function card_eval_status_text(card, eval_type, amt, percent, dir, extra)
card_eval_status_text_ref(card, eval_type, amt, percent, dir, extra)
if (eval_type == "debuff" and card.playing_card) then
for k, v in pairs(G.jokers.cards) do
v:calculate_joker({other_card = card, individual_debuff = true})
end
end
end```@golden lake here's how i added `context.individual_debuff`
better off doing it with lovely...
inb4 Flowwey has already added that context to their mod
Should I drop my extended joker contexts helper mod now? hmmâŠ
you can always just keep updating it
feel free to add my code snippet to that if it would be useful
also chat if i punch myself and it hurts am i weak or am i strong
I already had a debuff_individual context.
you are weak if you survive to think about whether it hurts
epic
ok if my leg gets blown off when i punch it am i weak or am i strong
is this a better ?
yea
i just
that doesnt work on my end..
did?
for reasons unknown
i feel like the only good way to implement this is as a fusion between stuntman and egg
thats messed up
yeah, i think it has almost perfect compatibility with every single boss now
also this is going to break a lot of stuff because there's a very good reason why matador only procs on triggered context
what is the trigger on the needle
set_blind
chat is this real
i dont like that
well, bear in mind
that's one of the least profitable boss blinds
with something like psychic
if you have the capability to win in one hand?
you can gain $4 per spare hand instead of $1
old matador would give $8 each hand lol
and that's a point i was gonna make
i made it pay out less on most of the boss blinds it's already compatible with
(you only make $2 more on a card debuff blind by playing a hand full of debuffed cards)
to compensate for it paying something on (almost) every conceivable boss blind
and now i'm wondering where and if i should make it trigger for wall and violet...
no
thats literally just larger blind requirement
the blind doesnt do anything by itself
if you were to give money for it it'd have to be as soon as the ante loads in
yeah, fair!
because it doesn't even do anything
that, or have it give the big payout when a hand is scored between the normal blind amount and the increased blind amount.
i might bump each payout by 1, just because it only works on 33% of the game
@golden lake is that better, for the formatting?
(yes, i understand this would be broken with đ . no, i'm not sure i particularly care.)
every card is broken with đ



