#💻・modding-dev
1 messages · Page 69 of 1
v
👍
a different issue has just occured to me
my joker says it gives +5 mult per unscored card played
and the message text it outputs correctly identifies how much mult it should give
but it actually gives 5 mult if there's at least 1 unscored card
i still don't understand how jokers giving mult works
I don't understand the issue
ripple has the same issue
it says +5 mult per extra scoring cards but the code checks if there is at least 1 unscored card and outputs +5 mult if there is at least one
so the effect is actually +5 mult if there is at least one unscored card
It checks if there's at least one so it doesn't have to do all the calculation if there's none
If you have 3 extra cards it doesn't give 15?
nope
it says it gives +15 on the message it outputs, but it only gives +5
???
well yeah it looks like it works on the message dont it
Oh nvm you're right lol
easy to miss on high speeds
I pushed a fix
Yea a quick copy paste
what part of the ability triggers it to give mult
the returned mult_mod
okay
Some context return different values so be careful
Like it's not the same between context.individual and context.joker_main
You just need to check vanilla code to be sure
makes sense
soo why didn't this work for me
the value that the message outputs is correct but the mult remains at +5 if at least one
wait i know why it is
it's because i'm still fucking testing with ripple
and not my joker
lmao
Mult_mod needs the var directly
No stop trying to send mult_mod a localized value lmao
oh
mult_mod, most of the time, should be equal to what's in your vars
what happens if it's not
Doesn't matter as long as it's a number
ok
Otherwise it will give you nothing (or crash maybe)
so what about xmult mod
is that just returning xmult_mod instead of mult_mod?
(same for chips would that just be chips_mod)
Not sure if it's case-sensitive but it's Xmult_mod too
so if i wanna increment my joker's value
You mean sell value?
Just look how Trousers do it
okay
okay so it is like that
makes sense
alright next step
how do I apply an effect (like a retrigger or permanent +chip increase) only to cards scored by splash
Idk if there's a way to differentiate scored card and scored card by splash effect
there has to be
be it that I have to recalculate what hand should have played by checking the ranks and suits of each played card to find out which ones don't match the played hand
this is very important to a lot of my fusions
vanilla calcs the poker hand info by doing this
local text,disp_text,poker_hands,scoring_hand,non_loc_disp_text = G.FUNCS.get_poker_hand_info(G.play.cards)
then it inserts splash cards and stone cards into scoring_hand before doing any calcs
is it possible to add a flag to the cards that are part of the poker hand before splash cards and stone cards are inserted
if so then when the joker effect goes through i'd just have to check if the card doesn't have that flag
you can just rerun the G.FUNCS.get_poker_hand_info(G.play.cards)
oh
that's convenient
i'm not really sure what that does though
what does it return (if anything)
it returns 5 different values, the 4th being the scoring hand before splash/stone
ah
see here
its from the very top of G.FUNCS.evaluate_play = function(e) in functions/state_events.lua
but how does one value hold 5 cards
the value is a table
okay that makes sense then
so that returns each card from the original hand
which then means I have to compare that to the table containing every card in the entire hand?
which would be scoring_hand
and if a card isn't shared between scoring hand and this other table then it's a splash scored card
but then how do I apply an effect to those cards
I'd guess some flavor of nested loops and if statements
you could turn it into a "when scored" effect and apply it if the card is not within the original scoring_hand
well yeah the idea is that they are when scored effects
logically i know how this would go but i don't know how to put it into code
mostly when it comes to applying the effect to the cards in the table
context.individual is for individual card interactions and it comes with context.other_card which is the card currently being scored
make sure its also context.cardarea == G.play
so I'd check if context.other_card is in G.FUNCS.get_poker_hand_info(G.play.cards)
and if it's not, apply the effect?
first you check if the context is individual and within G.play but then ye
you lost me on that
if context.individual and context.cardarea == G.play then
oh
ye
alright
then u check if context.other_card is a part of the 4th value returned by get_poker_hand_info
how do I get specifically the fourth value
tbh no idea but you can probably just get all 5 the way vanilla does it
.
if you just copypaste that line then you'll have a non-splashed hand as scoring_hand
okay
got a crash attempt to index field 'ability' (a nil value) when trying this
what's that mean
well i guess i can figure out what it means but why is it showing up
my other jokers worked fine without requiring an ability value
is steamodded debug console still working in latest alpha? I created a sample mod that just prints Hello World! in debug, but nothing is showing up
You mean this one? #1228149931257237664
was the console running before launching the game?
tbh with lovely's console and DebugPlus, theres not much reason to use the steamodded debug console
need to see more code to help with that
what
clyde
???
i'm posting a message here
strange
i don't know what happened there
let me try again
message might contain some words that are not allowed?
should use a different message then
if that happens it gets blocked by a different bot
you get a differnt error
this is the clyde message for when you DM someone who has it off
I've seen this when discord gets confused on your perms and thinks you can send a message but can't
but you can send a message
so idk
this oughta do it
discord is a fuck, try again
that's the joker in question
yeah I know, but that was the thing that made the most sense to me
i want the hiker effect to trigger a second time only on cards not scored by splash
you'll probably need a lovely patch
i already did a lovely patch to apply the splash effect
the hiker effect shouldn't require one(?)
in G.FUNCS.evaluate_play in state_events.lua you can save a copy of the original scoring hand somewhere your joker can access and use that
how/why would that solve the crash
yeah there's a crash
I can never remeber
👀 most OCs in server huh
Hey chat rq question i want to do a meme with the Jimbo text box, is there a tool for it?
Just this but as a gif
From the actual in game Jimbo text
This, basically
This one works well enough as a reaction image but I NEED to clown on people for their agendas
uhh maybe
Is the text box limited in space or?
I think it expands
I saw BU use one for his own messages so I want to know if there's a quick edit tool or if I should just somehow change it in specific
Also yes, I'm the clownposter that's been spamming her silly little guy on #🃏・off-topic and recently on #🎨・fan-art
if you're gonna make a title you should check it first
Nah, I have plenty, I just don't spam everyone in this server because I am both lazy + don't know when to bring them all up
uhuh
Anyways so so uhhh
If it's possible to alter the text box:
How exactly?
Language? Maybe a tool that just makes him say whatever you want?
I'm ready to make the alteration myself so long as I know where to even begin
All for the bit
idk I tried spawning him manually and getting him to speak but the box was empty
Thanks at least for the attempt haha, though I will make it myself as to not bother anyone else past "Hey how do I even do this" lol
oh it seems like at one point you coud pass raw strings to it but now it needs a localization key
Kinda
I showcase how I did it here
Neat! Thanks
I referenced Bunco but Bunco uses in-game code just tweaked slightly
And I tweaked it a bit more to change box colors, etc.
The main change was just to move from the CardCharacter class to the Card class since they’re different
And this works for Jimbo's message screen, right?
I’m not sure what you mean. I haven’t tried to manipulate those
If you just want to change those messages, it might be possible to just change the localization tables
Oh, that was my question from the start, I'm sorry it wasn't clear thanks to the whole meme part
I don’t know how different quips are selected, so I don’t know if you can extend or only replace
Replacing will work just fine enough, it's for a gif/PNG anyways, I just want the gif to be accurate
So long as I can get the funny joker saying the funny meme I will be good enough
Fish mod does a very simple localization replacement. That should probably be enough
Thanks! I'll check it out
what is this
this is the reason of the crash
you're trying to look up self.ability.name in a method where that returns nil
his ass hiked right over to the consumable area
and to the top of calculate(self, card, context) too apparently 😭
how did i miss that shit
now would you believe me if i said removing that line
did not solve the crash
how's the code looking rn
also what line number does the crash point to?
the same as above without that line and with everything in the if statement indented one less so it's in the right spot
141, which is...
context.other_card.ability.perma_bonus = context.other_card.ability.perma_bonus + self.ability.extra
the code above has like an entire chunk that doesnt belong (the hiker thing is more than one line)
which would have to mean it's self.ability.extra
should that be card.ability.extra
is that why
oh do i not need that part
the loc_vars im guessing
yeah those are an artifact
this worked
and holy shit this joker actually functions now
i wish I could make it display "upgrade!" more than once or display something else to signal this
right now it displays upgrade once on the extra cards
but still increments them twice (intended behaviour)
is there a way to do that
I'm pretty certain those messages are pretty configurable. I see mods doing all sorts of things with them
they are
i have attempted to change it to see what happens
okay yeah this second one isn't actually triggering
the upgrade! shows up as normal but raft! does not show up at all
I think you have to define the loc keys somewhere
because return cuts off the function
no its returning the object with the key in it
but chances are theres no locale key named "Raft!"
oh
no the thing is the calc function cuts off itself
for that gif I used a website to overlay PNG on top of a gif
gif I made by recording in-game jimbo from win screen
and cropping the video
but the above return message works fine
it returns before the context.individual and context.cardarea == G.play is checked
so why doesn't this one work
oh nvm, you wanted it in game
yes it returns one and the other one doesnt calc because you've already returned
ahhhh
I can't read I guess
you can only return once
That'd be easier yeah, but do you know the font so I can make it as close to Balatro as possible?
I'm pretty sure you also need to pass it a loc key instead of a string
it's in the game's files
I want it as a gif, the in game thing is as close as realistic Jimbo as I can
if you unzip balatro.exe with 7zip
I think I can move around the code to account for this 🤔
if it was a functioning eval message it would display "ERROR" instead of the text yeah
I just realized I could do something similar than what bu did, alter the game loss screen, and have him say that
Instead of messing with a gif since that wouldn't have the font and the way the letters show up one by one
if you want to display a message w/o returning use card_eval_status_text()
this is the font
this did not work actually
look it up in the source to see how its used but the function itself is in functions/common_events.lua
oh i didn't give enough arguments
but all these messages (the ones in vanilla) are localised
i need one that doesn't localise don't I
you define your own loc key I think
I think you can just not call the localize functin
ye u can just pass a string instead of localizing
(although localizing is good practice)
so the syntax would just be message = "Raft!"?
ye
localize with a string argument returns a string
so you can just put a string instead of it
what even is self in the calculat context?
the center
this did not work either
ngl I still haven't figured out why some Jokers use 'self' and some use 'card' in their calculate functions that seem to do the same thing
though the only mod I have expereince kinda sorta coding is DeFused which is a 0.98 mod frankensteining together the 3 fusion mods and removing the well... fusing
3 fusion mods?
self (vanilla) = the specific instance of the card during gameplay
self (smods) = prototype object within G.P_CENTERS
card (smods) = the specific instance of the card during gameplay
Fusion Jokers, Jestobiology, and the expansion to Fusion Jokers that only exists as a zip file dropped in the Fusion thread
oh i forgot there was that third one
i hope you don't defuse my fusions but i can't really stop you
try passing a colour in addition to the message ig
I want to respect you, but I also want to use good jokers without needing to fuse them
where does the colour go
next to the message
{message = <string>, colour = <colour>}
colour is like
G.C.RED
they're so easy to fuse ;-;
not when you have 900 jokers in game, lol
any of those reference colours or you can put in a hex
I've seen Splash like twice in the last week
I've seen it quite a few times last night (I was going through the collection to make tags)
the first fusion I made was splish splash which creates a splash each time when blind is selected cmon
i'm gonna make decks that make splash more common and have you start with splash too
and i wanna make a card sleeve where the stacked effect is that all splash are negative
hell yknow what
i'll make a tarot card
I just... don't like the Fusion mechanic, but I also... have no idea how or if I'll port DeFused to 1.0
fuck it i'll make a tarot card that just
spawns splash
so it's moot for now anyway
how's that for fusion accessibility huh
i'll make a combustible splash
that burns your house down
aaanyway
didn't work
i used the colour G.C.CHIPS like hiker's normal message uses
can i see the code again
the return message cuts off the rest of the function
no it doesn't
?
the second part of the code still runs through
it triggers the hiker effect a second time on the extra cards, as it should
the message for the second one isn't showing, but everything else down there is working
which is what's confusing me
then take it up with whoever made luajit and tell them that return isn't cutting off your code like it should
what
is return just stupid
im being rhetorical because your code is definitely being cut off
and any effects you think you're seeing from the second part are not actually there
it says +10 extra chips on the cards
that's just not how returning from functions works...
.
if you remove everything after return in the function, does anything change?
it must be doubling for some other reason
then either the first part of the code is doing that or you are literally performing magic
there's no buts the second half of the code is not running its not logically possible
it might be that context.cardarea has some duplicate condition / isn't unique?
it's literally identical to hiker's effect (without the "am i hiker?" check
why do that when you can just slap print('TESTING TESTING') into the second part
isn't coding just a blast
well I heard horror stories about lua but
where would this output
just into the balatro console?
ugh no
into the console ye
okay
into the code you're trying to see running
the question was where it prints to
not where to put it
oh I just realised I never actually filled in the value displayed on the text
oops
that's a text thing it's not a functionality thing
i haven't stylised the text properly
yet
readability at an all time low (I'm the number 1 misreader here)
Assertion Failed indeed :P
alright so
btw its not because you're missing the fact that hiker's condition is nested within a if context.individual then
- I verified that the double extra chips are showing up and triggering properly they are not fake
- the print statement did not show up
so I'm
very confused
uhh
hold on
it might actually be triggering every card twice
but I think that's because I did the if statement backwards
I checked if the cards were in scoring_hand not if they weren't
what's the uhh
symbol for not equal to again
!= or =!
~=
oh
ok
oh it did not like that
are you sure
it says unexpected symbol
oh wait
it's the ~
yes thats lua's not equal
i was doing -
tilde equal is a weird choice for not equal, not sure why they chose that for lua
it makes me think "roughly equal" because that's what it typical means in math
okay no you guys must've been right actually
the first part of the code is just triggering twice
just swap what youre returning and what youre card_eval_status_text ing
I don't know what's going on with it
oh
that makes sense
You check for the cardarea in context which is called multiple times
because you're not specifying context.individual i think?
It checks for repetitions and individual iirc
real ones know that ~= isnt real
oh
how do I not do that
I feel like I'm the too-manyth cook in the kitchen and well... I can barely use a microwave
Add context.individual to your initial check
okay
me when I avoid ~= by just using not(a==b)
actually and isn't real either, there's always not (not a or not b)
okay so
- it's still triggering twice on every card but this time it seems to be a logical error
- is the "Upgrade!" text supposed to appear below hiker or above the card?
if you just keep removing symbols until you have the minimum to be turing complete... I don't even want to fathom the monstrosity you have created
this is how i defusion-proof my mod
anyway now i just have a logical error to solve
that's the joke
it's automatically translated to that before it's compiled
if you gave an ~= to the compiler it'd tell you there's a syntax error 
the part that triggers the effect again if the card is not found in scoring_hand is triggering on every card
(assumption, maybe this is done in the middle of the compile)
omw to create brainfuck 2.0
which is strange because i thought scoring_hand would be only the non splashed cards
I still don't understand how lua is a "compiled" language, when the binaries seem to contain all the plaintext source
compiled at runtime using luajit
ah fair enough
i Hate you luajit
sincerely cg
(it's not that bad it's just annoying sometimes)
(and also slow)
I guess I should have figured that luajit means "lua just in time"
meh it's not the easiest acronym to figure out if you haven't seen it before
i am very confused by this not working
i thought it'd be that scoring_hand contains every card in the hand but
regardless of if i check if they are or aren't in scoring_hand
every card is triggered by this
okay wait
yeah this is fucking weird
so if i make the second part run if the cards are found in scoring_hand (the inverse of what I want)
It’s just bad logic
the card triggers as expected
You check if the other card is not scoring hand card 1 and if it’s not you do something
no but
that would mean it triggers on only one card if it's inverted
but when it is inverted it works properly except inverted
oh wait np
no
I get what you mean now
how do I make it not do that
I know how
hold on i need to write this down this is confusing me
it doesn't work because i check each individual value of scoring hand
to see if it's not equal to the current scored card
and if it's not then it goes on with the rest of the code
and it shouldn't do that because if the card is in scoring hand
then it will still get triggered because other values in scoring hand are wrong
okay
You need to check it’s not equal to any card in scoring hand
yeah
if i use break to end an if stateemnt
what was my question again
must've been stupid the answer feels obvious
break doesn't break out of an if statement, it breaks out of a loop
i see
can you structure loc_txt like
loc_txt = {
name = "name name :3",
text = {
[[blah blah text
blah blah more text
blah blah blah]]
}
or do you absolutely have to use multiple strings in the table to utilize line breaks
multiple strings
(or out of switch statements actually, which lua doesn't have. One of the few good things about it tbh)
unfortunate
hey what's wrong with switch statements
Switch statements are just if statements in a different wrapper
my solution didn't work
bad design imo, mostly the implicit fall-thru
You want a Boolean that’s set to true that you set to false (or vice versa) when you find a match, and then your if block under that dependant on the Boolean
that is what I did
but I think I defined the boolean inside the loop
so it's resetting on every trigger
my fault lol
i moved it and
it didn't work
wait i think i got it
a switch statement is just a mid pattern match
i didn't get it
I think I did something stupid
but i don't know where the stupid is
okay well i noticed what I did wrong
the return should not be in that else
please work (the coding experience)
did not solve my issue however
i need a fresh pair of brain bro
Where are all your ends 😭
below the screenshot
trust me they are there
Then they’re in the wrong place 😆
what
just because it doesn't crash doesn't mean the code is working like you expect it to
but it is working like i expect it to 2/3 times
both my other jokers did this and they work flawlessly as intended
this one is having logic errors for issues totally unrelated to the ends
(i think)
well either your indentation is wrong or your ends are
what does this joker do again?
splash effect and hiker effect
if card was scored by splash effect, trigger hiker effect again
can you annotate the intended functionality of this code, statement by statement
everything works except the last part
ah oh wait
I know what it is yeah
writing it out made it so obvious
yeah that's how it usually goes
but i'm not sure how to fix it
I think this is what you want?
well now i wanna keep all my ends at the end for the funny
just to clarify, indentation doesn't do anything in lua
what
indentation doesn't do anything, code wise
a lot of ui code in balatro is compressed by putting a lot of things into one line
idk, this aint python
you could compress your joker into a single line if you truly wanted to
i'm still gonna indent for peace of mind
you should
did you use python before this or what
Lua's end is Python's dedent, basically
which is why I added these ends here #💻・modding-dev message
okay
well
damn.
i can't keep all my ends at the end anymore
that's really good to know and yeah that fixed my joker
now there is
one more issue i'm having
which is that the upgrade text appears below hiker and not on top of the scored card
card_eval_status_text(card, 'extra', nil, nil, nil, {message = localize('k_upgrade_ex'), colour = G.C.CHIPS})
i'm guessing i change the "extra" value for this? but what to
no u change card to context.other_card
the first argument is the card that speaks
I'm baffled that you didn't know this yet... how'd that even happen??
it never came up with my other two jokers
¯_(ツ)_/¯
there's no way those didn't need end
🤦♂️
the jokers work as intended though
then end are basically { } from other languages
well it's good to know now
i specifically chose these three jokers to make first though
because they give me all the fundamentals i need to make (almost) every other fusion
code wise that knocks out a lot of writing cause i can copy it over
thank you all for all of your help (and patience with my dumbass)
all good lol
thats what this channel is for
which makes lua really hard to read, at least for me
part of the uh... bracketing being a word just throws me off
It just needs indenting properly to be readable
looking at DeFused would probably give you an aneurysm. Due to its cobbled-together nature and me being lazy, the indenting is al over the place
i feel confident enough in progress that i am going to make a mod thread
but i will not have a github yet because i can't figure out how to make one and dont have enough for a beta release yet methinks
i'm gonna wait until I have at least 10 jokers
then i will make a legendary and a tarot card and a github
making a thread for concepting is great, but I'd definitely recommend a github if you're planning to actually release anything
well i've already concepted almost every fusion
i did that a long time ago on a separate sheet
i will do a github when i do any releases
I probably should push what I have to GitHub and make a thread
So I can be motivated to continue working on it
i finally got balatroAP 0.1.9 to a presentable state so burndi can release that and i can work on magictrick again w/o feeling like im slowing down another mod
on magictrick the big roadblock is still the custom retrigger api (unifying vanilla's playing card retriggers and smods' joker retrigger api into a singular system with depth config) but its less of a theoretical roadblock and more of a "this is very annoying to implement" roadblock
also at this point I'm rewriting so much of evaluate play that at this point it would be easier to override it instead of patching it piece by piece but it'll probably be a nightmare to write it in a way that would keep it compatible with lovely patches
(but then again this mod is a compatibility nightmare at it's core)
Maybe you could help with the Better Calc branch
Which would help with compatibility
First I'd have to learn more about what better calc was (what was the goal, what were the methods), the one thing that I do know is that it's so outdated that any attempts to continue it would have to start from scratch
I feel like working on better calc would be a bit out of my league (because if anything, magictrick is the "worse calc", hacking things together to make different separate systems coexist under the same hood; it allows for more flexibility, but it's far from improving anything)
I had an idea for creating a class to allow extending calculation to more objects but I never did anything with it
the basic principle behind magictrick extending the default calcs to iterate over card lists instead of specific hands and then "translate" different calc types where applicable (i.e. a playing card in the joker space would call a eval_card for being held when asked to joker_main)
That was kind of the idea
The class would have about three properties
A CardArea, a Card set (or maybe a list), and a number
The number orders it before or after the default calculation step and relative to each other
rn magictrick has a cardarea api with order and tags, so for example "context.individual" are iterated over a card list received from all card areas with the tag "playing_cards"
the default order of things rn
G.play -> G.hand -> G.jokers -> G.consumeables
with all of them having their own sets of tags related to things that need to be differentiated
atm the cardarea api grabs tags directly from the cardarea objects but I plan on separating that into a separate function so mods could hook it
Well, rather than using tags, my idea was to have a list of CardAreas to iterate over and what to look for in each of them
Since you don’t need to recreate the list at runtime
magic trick is kinda approaching this point bcos one of the things on the todo list is unify individual G.play and individual G.hand into one phase (although still relying on the tag system to check whether hand/play effects should be calced or not) and merging joker_main into that loop could make sense (esp with the thoughts of complete override)
default response to getting cards from cardarea api is just giving a complete list of G.play -> G.hand -> G.jokers -> G.consumeables because outside of evaluate_play all one needs is just all the cards
that would also simplify the "translation" process bcos then since it's all one phase it'll already react as expected
i am unfortunately swinging back around here again
right after i test a solution i just came up with
it says attempt to index field "extra" and crashes but i returned mult_mod = card.ability.extra.mult * modifier which is correct isn't it
i did define the joker's mult value with config = { extra = { mult = 3 } },
so i think somethijng went wrong there? but i can't tell what
the example mod does it like this and vanilla and modded jokers get this to work
Did you load a save to test?
yeeeah
gonna try on a new save now
yeah this worked
yeah if you update the config you need a new card
now i have a new problem
this joker does not trigger the splash effect
even though I added it to the same table as I used for the other two jokers
and the other two jokers in the table apply the splash effect as they should
Where does one start when wanting to create mods for the game?
this helped me a LOT
ty! I'll have a look at it
Should use SMODS.load_file
just that or?
It won't fix your frash but it will make your filename more readable
completely balanced
totallty
i want to get into developing a balatro mod as a little fun project but everything looks confusing 😭 should i look at example mods source and learn from there?
yes
Of course
i'm trying to edit the vers of 8 ball and it's telling me self and card is nil, dose anyone know why? (putting either card or self is nil)
did you add the extra field
this is what it'd be referring to
yeah
alright i figured out the issue with my joker it is now functional
however it should be applying the splash effect
this is how i patch in the splash effect, and this method works for soaked joker and raft, but not dihydrogen monoxide for some reason? anyone know why?
I like science lol
regardless of its position in the table it will never trigger the splash effect but the other two will
this is confusing
wait i know why
nevermind i don't
Can I see the joker definitions?
this is everything before the ability
the ability works as intended
it's just not finding dihydrogen monoxide when it's in your jokers for some reason
I’d recommend using SMODS.find_card instead of the find joker function
but i am lovely patching it into the base code
will that work with a smods function?
Well, I'm pretty sure that's how mods are loaded in the end, so probably?
are the arguments for this the same as the find joker function or no
yeah ig it's worth a try
It uses keys
Yeah
It returns a table so it checks that there’s something in it
You still need that bit
okay
i set up a key table and changed it to use the smods find card
this did not solve my issue
wait do i need to include the j_ and/or my mod prefix
I'd guess yes to the j_ no to the prefix
also, this is a good type of thing to reference other mods for
ayyy nice
and yeah that makes since i guess
logic error it'll be fine
changed the method and the joker works again
You almost always need the full prefix
that is a fourth fusion joker implemented
is there a way to reset the colour and size of text without making a new line in loc_txt
Also, random question to eremel, did mod prefixes exist in 0.98? Defused seemed to have a conflict with regular fusion until I basically manually gave it one
yes they did
i'm pretty sure
i saw mod prefixes in jestobiology's fusion results
they're all j_f_key
they were named that
oh
guess it was the slug
hey what does setting atlas and soul_pos do
I also have problems with global var
how do I included these
the atlas is what provides textures
in the assets/1x and assets/2x folders under your mod you should have your mod's sprites in there
i did
the atlas refers to the name of the file
soul_pos is for legendaries
you use soul_pos to define the location of the floating front part of the card
makes sense?
when taking ownership, self becomes the center, and card is the actual card
you wanna use card.ability
or self.config
also some part of my code or smt keep saying undefinded global
how do I define them
oh that makes a lot more sense mow, thank you!
ignore that, its just how lua works
oh ok
yeah that's normal with SMODS functions and stuff
because the project doesn't know they exist, but they do
it will say undefined global but it should work fine
just note that if you use a global from another mod
you need to load your mod after that mod
Damn
I’m not sure, I didn’t really do much work in 0.9.8
Is UI supports transparency?
not eremel here but no
I'm sure you can give it a transparent colour yeah, what are youtrying to do?
Smth like CSS opacity
Want to create a small block which will appear and after period of time became transparent with transition
wait, G.C.CLEAR is already a transparent colour
Problem is children, some text will be inside
wait so a gradient?
i think they mean fade in/fade out
the text should be fine
UI color is a table of RGBA normalized to 0..1
{r, g, b, a}
so color[4] is transparency
getting an error "for limit must be a number" on this line, guessing it's because of #context.scoring_hand ?
make sure context.scoring_hand exists
is there something else it should be
so you want opacity go from 0 to 1
And backwards
over time
^
Is it works for children?
if children use the same color table
yes
you can create a copy table of color
and use it for all nodes that need it
I'm not 100% sure about text nodes
I dont know if text opacity can be a ref_value or something
So basically answer is no, only adjust color for each node "individually". Sad but it's okay
yeah, engine is rather limited in that regard
At least i tried
how do I do that
if context.scoring_hand
i did that
can you show more code?
joker should give 1.5x mult per unique suit in played hand
you have too many ends
oh
it is
i indent everything as it would be in python
why dont indents get saved
if i just remove that end it says missing symbol end
oh, put it at the end then
i did that and got the same crash
The ide probably isn't displaying in normal plain text
So formatting gets lost with copy/paste
indented ver
(more ends and closing } offscreen
btw you should specify context too because context.scoring_hand gets passed with many different contexts and if your only condition is context.scoring_hand then the code will fire off much more often than you'd probably want
what should I change that to then
also smods has suits api
okay your for loops need ends
if context.scoring_hand and context.joker_main if you want it to fire off during the main joker scoring phase
i dont need it though
wait actually i might need it for modded suits
you do because you're trying to count unique suits
i mean the method i used here counts unique suits just fine
why do you have the ssame code twice btw?
because flower pot does it that way
now that i think about it, why did thunk do it this way
🍝
I've looked at flower pot before, I recall it being that way yeah
the wildcard should count as every suit
I also think that this will just always give you the number of cards you've played, right?
makes sense
it gives you the number of unique suits played (out of vanilla suits)
oh no I am also blind
i just add together all the suit values at the end
and multiply that number by the card.ability.extra which is 1.5
and return xmult_mod with that so it should give 1.5x mult per unique suit
hey wait won't that make two unique suits give 3x mult
jesus that's strong uhh
i'll make it give + X0.5 mult per unique suit
i can modify it to do that
to get all the suits (vanilla + modded) you should be able to loop over SMODS.Suits and grab their keys
Also keep in mind Fusions are supposed to be strong. It's why even I have them rarities for DeFused most ended up rare
unless im misunderstanding it, been a while since ive messed with apis
well perferably i'd want it to give 1.5 x 1.5 x 1.5 x 1.5 mult when you have 4 unique suits for example
you can just loop through the hand and add the suits present to a table
Which major I should use to be over all playing cards but behind G.OVERLAY_MENU?
but it'll be funky with wild cards
That should be possible
i'lll just have it be vanilla suits
cause otherwise wildcards would be super broken if you had more than 4 suits
Multiplyying nstead of adding
instance_type- sets the layer your element is drawn on
- Options includeNODE,MOVEABLE,UIBOX(with noattention_text),CARDAREA,CARD,UI_BOX(withattention_text = true),ALERT,POPUP.
- Layered from left to right.
Thanks!
but none of this solves my problem
the code still isn't working regardless of its efficiency
NODE, MOVEABLE, UIBOX (with no attention_text), CARDAREA, CARD, UI_BOX (with attention_text = true), ALERT, POPUP.
ahhh, that explains why UIBOX is in there twice actually
this fucking ide make me wanna kms
i put a } down and it goes unexpected symbol
i don't put one down and it goes missing symbol }
opening balatro and letting it fucking crash is more informative than this
all that shit popped up just cause I missed an integer elsewhere in the code
god
You use VSCode?
i wanna create a global variable to store a card like the idol how can i do that
okay
i don't know how it got 5.06x mult
but it worked
okay no it worked as intended
5.06x mult is 1.5 x 1.5 x 1.5 x 1.5
nvm scratch that
you probably put it in the wrong spot?
i figured it out
cool
joker is functional correctly now
how do I refer to only the card currently being scored
i don't know if that will fix this actually
this code is checking every card in scoring_hand every time
i don't want it to do that
i want it to only check the card currently being scored
why are you looping over scoring hand
well yeah i know that's what is wrong with it
how would I make it only check each card once
the loop here doesn't even define the card you're checking so you're checking the card that's being scored and repeating that the same amount of times as the amount of cards in the scored hand
oh
other card = the other card in individual scoring or retrigger check
what are you trying to do
count how many A/2/3/5/8 are in the played hand
then you need to replace other card with v
and put it in context.joker_main
unless I'm misunderstanding the intended effect
fibsequence should be equal to the number of A/2/3/5/8 in the hand
which i then multiply by 3, which is how much +mult each A/2/3/5/8 gives
that is the intended effect
everything works except for counting how many fib numbers are in the played hand
oh ok then you just need to replace other_card within the loop for v
so context.v:get_id() or v:get_id()
v:get_id()
okay
anyone know how to use vars.colours for the background colour on text?
like the red part of xmult
this doesnt work
Use X:mult,C:white
nono i want to use a colour stored in vars.colours
V:1 sets the text colour but i want to set the colour behind the text too
you can't do it that way, you'd have to add your colour to the colours table
are there any resources that I can look into if I wanna get into modding?
also learn lua idk
tyvm
balatro source code and example mods are great options
yeah the source code is super helpful
to know what's going on yeah, not sure as example
trying to get text to color based on the suit picked and this aint working help
is there a way i can check what mod a joker is from
wait ceres does that doesn't it
also other mods
the guys at cryptid are fuckin wizards man
mostly what i got from looking at other mod is that shit is too complex for the effort

lmfao
looking at other mods has helped me a LOT
No, math is fun 
i wouldnt have known how to register fusions if i hadnt looked at the other fusion mods
this can be true btw, some mods can really abstract a process
yeah i noticed that with sdm0's splash evo code
btw, what happens if I give a joker no texture? cuz I can't be asked to do legendary joker background art
¯_(ツ)_/¯
probably just gonna be nothing
if you're making a legendary you can color shift the legendary background to fit your theming
and just change the nameplate
vanilla style legendary backgrounds are easy
ye thats true
one other thing about legendaries
soul_pos refers to the placement of the floating front part of the card
some mods can be really helpful to look at, others not so much
Just addig small popup is such a pain 
balatro UI be like
🙏
would this be #prefix_jokers?
like for my mod #tsun_jokers?
Hell yeah
how can I let a joker retrigger a specific card multiple times?
(for example, ace of spades)
like, code-wise?
code wise
joker_center.mod.id iirc
this is a sleeve center
look at the code for hack
idk this is hard to explain lol
do you know when you have a Card class?
i just want to run an if statement which goes "if joker is from x mod, do this"
how do I do that
yeah i wanna give xmult to jokers from a specific mod like how baseball card does it with a rarity
context.other_joker.config.center.mod.id
so would that come out as the mod prefix
no, that'd be .mod.prefix
oh yeah right there's a mod ID section
this image shows what a .mod all contains
might also need to double check for basegame jokers? idk if steamodded gives them a .mod
does your loc_vars look like return { vars = {something, something, colours = {something} } }?
i didnt realise the first time that colours needs to be part of vars
is there something like context.other_joker.config.center.name i can search?
to get the joker's name
what do you need the name for?
to check if it's splash
that very common thing everyone needs to do
all the time
ofc ofc
I suggest checking it's key instead
that works too
context.other_joker.config.center.key == "j_splash" I think
alright thanks
keys are less prone to changing and being messed up
when you run juice_up(x,y) what do the two arguments do
is it not clear from the definition in the base-game code?
i mean the only instance i've seen so far it just uses (0.5, 0.5)
your editor should have a "search all", use that
i am using that
i don't know what to search for so i'm just looking through instances of juice up and i can't find it
if I wanna check for aces, do I just go if rank == "Ace"?
if rank == 14