#mittens jokers

1 messages · Page 1 of 1 (latest)

scarlet star
#

thread!

fallow geyser
#

oh this is going to be much nicer ok

spring ferry
#

im here too

scarlet star
#

yay!

#

oh

#

you don't technically need to but it would be nice for you to have access to the decompiled source

fallow geyser
#

ok so

scarlet star
#

the game is effectively a zip file, so if you open it in 7zip or something you can extract the source to a file

fallow geyser
#

im at the balatro files i think

scarlet star
#

*folder

fallow geyser
#

the one with the liscense n all that

scarlet star
#

do you have 7zip?

#

if not it's a fast download

fallow geyser
#

uhhh maybe

#

where do i find it so i can double check

scarlet star
#

are you on windows?

fallow geyser
#

yes

scarlet star
#

if so you should just be able to search in the search bar

#

if not you'll probably want to download it

fallow geyser
#

i think i dont have it

#

so

#

will download

#

I have it now

#

is in a separate folder tho

scarlet star
#

ummm

#

that should be fine

fallow geyser
#

ok cool

scarlet star
#

just run the application

#

and navigate to balatro.exe

#

it should be in the steam folder

#

with the license

fallow geyser
#

destination is balatro?

scarlet star
#

for me it's in C:\Program Files (x86)\Steam\steamapps\common\Balatro

fallow geyser
#

Ok got it

scarlet star
#

the destination to extract to can be anywhere

#

but like pick somewhere easily accessible

fallow geyser
#

it doesnt matter where?

scarlet star
#

that's just where you can look at the source

#

so wherever you want that to be

fallow geyser
#

ok got it

scarlet star
#

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

spring ferry
#

i can help

scarlet star
#

^

spring ferry
#

i have absolutely nothing going on right now

#

okay so what code does your mod have rn?

#

@fallow geyser

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

spring ferry
#

hit windows+r and then type %appdata%/balatro/mods and run it

fallow geyser
#

omg thank you

spring ferry
#

yw

#

and the next time you press windows+r it will keep that info

fallow geyser
#

perfect

#

folder made

spring ferry
#

good, now put a lua file in it

fallow geyser
#

just new .lua thing?

spring ferry
#

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?

fallow geyser
#

ye

#

cleared :>

spring ferry
#

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

fallow geyser
#

ok will do

spring ferry
#

replace "[mod description]" with a description of your mod

#

make sure your name is the only one that keeps its square brackets

fallow geyser
#

holdup i just got working space

spring ferry
#

k

fallow geyser
#

ok done

#

like this? (its 99% placeholder txt i guess)

#

i aint very creative but i have ideas ig :>

spring ferry
#

yep thats fine

fallow geyser
#

ok cool

spring ferry
#

now, after that, put this:

------------MOD CODE -------------------------


------------MOD CODE END----------------------

#

your code will go inbetween these two barriers

fallow geyser
#

got it 👍

#

i did the thing

spring ferry
#

alr

#

this is the init function:

function SMODS.INIT.Equality()

end
#

sorry i have to go :/

fallow geyser
#

awww ok

spring ferry
#

i can send you my joker though

fallow geyser
fallow geyser
spring ferry
#
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

fallow geyser
#

i assume you mean the id?

spring ferry
#

yeah and replace equality elsewhere with the name of your joker

fallow geyser
#

Got it

spring ferry
#

ok i need to go now, bye, good luck, sorry :(

fallow geyser
#

ok bye thank you for all the help!

spring ferry
#

yw cya

fallow geyser
#

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

calm tide
#

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

fallow geyser
#

oop o one sec

#

am drawing the cubic joker rn :>

calm tide
#

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

fallow geyser
#

does a discard count as a hand?

#

like played

#

oh wait i see what you mean

#

a lil bit

calm tide
#

it does not, but your code didn't specify if on played.

fallow geyser
#

wait does 0 % 4 = 0?

#

(remainder of 0/4)

calm tide
#

yes

fallow geyser
#

wait but there arent any 0 point hands

#

and a discard wouldnt count for it

calm tide
#

you start at 0

fallow geyser
#

since it doesnt score

fallow geyser
#

or until the jokers start activating

calm tide
fallow geyser
#

oh cool

#

WAIT HOLDUP THE CODE WORKS???

#

absolute shock rn

calm tide
#

yea i just had to add this if fuction if context.joker_main and context.cardarea == G.jokers then

fallow geyser
#

ok i put that where?

calm tide
#

and multiable other useful functions for future jokers

#

it also more readable

fallow geyser
#

omg thank you

#

absolute god of a person

calm tide
#

no problem

#

btw you might wanna change the name of your Png to j_cubic_joker

fallow geyser
#

i just finished it too

#

here

#

:>

#

i think it sgood, might need to scale up a bit tho idk

calm tide
#

yea, its easy tho

#

scaled

fallow geyser
#

does that one go in the folder or the original

calm tide
#

in 2x

fallow geyser
#

or does it matter

calm tide
#

2x

#

small in 1x, big in 2x

fallow geyser
#

so make it big if i dont want it to look like wee joker

calm tide
#

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

fallow geyser
#

Wait so I need both and they need to be in separate spots

calm tide
#

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

fallow geyser
#

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)

calm tide
fallow geyser
#

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)

calm tide
#

no problem, gn

spring ferry
#

gn!

fallow geyser
#

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

spring ferry
#

you can use the debug mode mod to get it

fallow geyser
#

im not suprised it exists but i am suprised i didnt know abt that sooner

fallow geyser
#

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

fallow geyser
#

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
        }