#mittens jokers
1 messages · Page 1 of 1 (latest)
oh this is going to be much nicer ok
im here too
yay!
oh
you don't technically need to but it would be nice for you to have access to the decompiled source
ok so
the game is effectively a zip file, so if you open it in 7zip or something you can extract the source to a file
im at the balatro files i think
*folder
the one with the liscense n all that
are you on windows?
yes
if so you should just be able to search in the search bar
if not you'll probably want to download it
i think i dont have it
so
will download
I have it now
is in a separate folder tho
ok cool
just run the application
and navigate to balatro.exe
it should be in the steam folder
with the license
destination is balatro?
for me it's in C:\Program Files (x86)\Steam\steamapps\common\Balatro
Ok got it
the destination to extract to can be anywhere
but like pick somewhere easily accessible
it doesnt matter where?
ok got it
kk
i have to go soon but generally you'll need to add an init function to the lua file, and put the stuff from the making your own joker thread into it
i can follow up tomorrow if need be
i can help
^
i have absolutely nothing going on right now
okay so what code does your mod have rn?
@fallow geyser
uh
none sadly
but
i have a checklist
in the mods folder i need to add a folder and a [mod name].lua file
--- STEAMODDED HEADER
--- MOD_NAME: [mod name]
--- MOD_ID: [mod id]
--- MOD_AUTHOR: [your name]
--- MOD_DESCRIPTION: [mod description]
i just copy n pasted those
hit windows+r and then type %appdata%/balatro/mods and run it
omg thank you
good, now put a lua file in it
just new .lua thing?
yep
if you dont know how to do that then instead you can just copy a lua file from another mod and paste it in, then clear it
did you do it?
okay now paste in this
--- STEAMODDED HEADER
--- MOD_NAME: [mod name]
--- MOD_ID: [mod id]
--- MOD_AUTHOR: [your name]
--- MOD_DESCRIPTION: [mod description]
replace "[mod name]" and "[mod id]" with the name of your mod
replace "your name" with your username
ok will do
replace "[mod description]" with a description of your mod
make sure your name is the only one that keeps its square brackets
holdup i just got working space
k
ok done
like this? (its 99% placeholder txt i guess)
i aint very creative but i have ideas ig :>
yep thats fine
ok cool
now, after that, put this:
------------MOD CODE -------------------------
------------MOD CODE END----------------------
your code will go inbetween these two barriers
alr
this is the init function:
function SMODS.INIT.Equality()
end
sorry i have to go :/
awww ok
i can send you my joker though
i also have no idea what this means in this case
that would help as i think i can change the values
function SMODS.INIT.Equality()
init_localization()
local j_equality = SMODS.Joker:new('Equality', 'equality', {extra = {mult = 1}}, {x = 0, y = 0}, {name = 'Equality', text = {'{C:red}+1{} Mult, x1.5 if level of played poker hand','is equal to your amount of {C:yellow}money{}'}}, 3, 9, true, true, true, true, '', 'Equality')
local ModPathThing = SMODS.findModByID("Equality")
local spritedefinition = SMODS.Sprite:new("Equality", ModPathThing.path, "equality.png", 71, 95, "asset_atli"):register();
j_equality:register()
function SMODS.Jokers.j_equality.loc_def(card)
return {card.ability.extra.mult}
end
SMODS.Jokers.j_equality.calculate = function(self, context)
if SMODS.end_calculate_context(context) then
if G.GAME.dollars == G.GAME.hands[G.FUNCS.get_poker_hand_info(context.full_hand)].level then
self.ability.extra.mult = self.ability.extra.mult * 1.5
end
return {
message = localize{type='variable',key='a_mult',vars={self.ability.extra.mult}},
mult_mod = self.ability.extra.mult
}
end
end
end
replace "equality" with your mod
i assume you mean the id?
yeah and replace equality elsewhere with the name of your joker
Got it
you can use https://github.com/Steamopollys/Steamodded/wiki/Creating-new-game-objects to figure out some of the api stuff, like that long list of properties at the top
ok i need to go now, bye, good luck, sorry :(
ok bye thank you for all the help!
yw cya
so theoretically this works right?
function SMODS.INIT.BalatroBonanza()
init_localization()
local j_balatrobonanza = SMODS.Joker:new('CubicJoker', 'cubicjoker', {extra = {mult = 1}}, {x = 0, y = 0}, {name = 'CubicJoker', text = {'Mult x 4,if sum of chips of played poker hand','is evenly divisible by 4}}, 3, 8, true, true, true, true, '', 'BalatroBonanza')
local ModPathThing = SMODS.findModByID("BalatroBonanza")
local spritedefinition = SMODS.Sprite:new("BalatroBonanza", ModPathThing.path, "cubicjoker.png", 71, 95, "asset_atli"):register();
j_cubicjoker:register()
function SMODS.Jokers.j_cubicjoker.loc_def(card)
return {card.ability.extra.mult}
end
SMODS.Jokers.j_cubicjoker.calculate = function(self, context)
if SMODS.end_calculate_context(context) then
if ( G.GAME.chips % 4 ) == 0 then
self.ability.extra.mult = self.ability.extra.mult * 4
end
return {
message = localize{type='variable',key='a_mult',vars={self.ability.extra.mult}},
mult_mod = self.ability.extra.mult
}
end
end
end
it looks right to me but then again this is the first time ive coded this so :p
ok, this is a template i made for you so its easier to make jokers, there was just a if function you were missing btw @fallow geyser
it adds multible usefull fuctions as well
you might want to edit some code though because if you just discard a card while a zero chips
its considered a multiable of 4
does a discard count as a hand?
like played
oh wait i see what you mean
a lil bit
it does not, but your code didn't specify if on played.
you start at 0
since it doesnt score
it doesnt take effect until hand played does it?
or until the jokers start activating
doesn't matter I apparently fixed the problem.
yea i just had to add this if fuction if context.joker_main and context.cardarea == G.jokers then
ok i put that where?
just use this, its a template i made for you, that includes that joker
and multiable other useful functions for future jokers
it also more readable
i just finished it too
here
:>
i think it sgood, might need to scale up a bit tho idk
does that one go in the folder or the original
in 2x
or does it matter
so make it big if i dont want it to look like wee joker
i think it'll apper in the corner of the card if you put the small one in 2x
and you'll only see the top left corner if you put the big one in the 1x
Wait so I need both and they need to be in separate spots
yea, 2x is for pixel smoothing, 1x is wihout, which is an option to inable in game
if you try to turn it on or off without both the game will crash
Jeez ok
So where would I put those
(Note; I won’t be doing that now as it’s starting to get late and if I don’t get sleep I won’t be able to function tommorow)
Ok so I need to make an assets folder and have em separated there
Got it
Thank you for all your help very kind person :D
Also goodnight (To everyone really)
no problem, gn
gn!
ok ima add the assets n such then try it out :>
i forgot what rarity i set it to lol
i think rare $8
OH SHIT
it dint work holdup
i had em named wrong lol
its 2x not x2
all i see is its added!
time to find it >:3
i think im gonna go yellow deck because money
ill let yall know if i find it
you can use the debug mode mod to get it
im not suprised it exists but i am suprised i didnt know abt that sooner
oh god
OH GOD
it might need a rework
uh
it doesnt do x4 mult to the current
it does + x4 mult to itself
no wait
xx4 mult to itself???
idk it went from +4 to +16 to +64
and it keeps going up
by playing a single 3
so
(an ace high card also works in this instance )
ante 3 one ace casually gives thousands of mult
back into the code i go ;-;
ok so as of yet it goes 4^x where x is how many times you have played a valid hand
ok so
this just crashes my game and idk why
wait what
damnit i dont have nitro UHHHH
SMODS.Jokers.j_even_joker.calculate = function(self, context)
if context.joker_main and context.cardarea == G.jokers then
if G.GAME.chips %2 != 0 then
evrnd = pseudorandom('mewhenimeven'..G.GAME.round_resets.ante, 1, 2)
if evrnd == 1 then
current_chip = -1
else
current_chip = 1
end
return {
i think thats the main problem
but how do i fix ir :<
if config.EvenJoker then
-- Create EvenJoker Joker
local evjo = {
loc = {
name = "Even Joker",
text = {
'Round the {C:green}sum{} of {C:blue}chips{} of played poker hand to the nearest {C:mult}even{} number ({C:green}1/2{} chance to round {C:green}up {C:attention}or {C:mult}down{})',
'{C:inactive}(ex. before, chips = 9, after, chips = 10 {C:attention} OR {C:inactive} 8{}'
}
},
ability_name = "evenjoker",
slug = "even_joker",
ability = {
extra = {chip_mod = 1, current_chip = 1 }
},
rarity = 2,
cost = 6,
unlocked = true,
discovered = true,
blueprint_compat = true,
eternal_compat = true
}