#đŸ’»ăƒ»modding-dev

1 messages · Page 18 of 1

worldly sapphire
#

ngl the art is good

#

i will try to create a joker like this one

wooden nexus
#

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"

worldly sapphire
wooden nexus
#

oh

worldly sapphire
#

i can replace images

wooden nexus
#

Right, forgot that's a problem lol

worldly sapphire
#

atleast we can have a view of how the joker will look like

zealous glen
worldly sapphire
#

idk, i don't know what i need to do

#

:(

zealous glen
worldly sapphire
#

i tried yesterday

#

and i still don't know how to do it

zealous glen
#

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

worldly sapphire
#

so i need to create another mod?

zealous glen
#

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

worldly sapphire
#

well

#

it worked first try

#

idk why

zealous glen
worldly sapphire
#

goofy ahh roblox joker

#

let me test

zealous glen
#

It’s easy with Debug Mode mod

worldly sapphire
#

does it work with deck creator?

#

like can i add it?

zealous glen
#

Idk I haven’t used deck creator

worldly sapphire
#

well it works

#

just added the joker

zealous glen
#

Now get some Lucky Clubs

worldly sapphire
#

i got a magician card

#

from a deck i made using chatgpt

#

lol

zealous glen
#

I suggest slowing down the game speed so it’s easier to see if it works

wooden nexus
#

There we are, you can now (kinda) see all the removed spots for jokers that didn't appear in versions

worldly sapphire
#

let me record

wooden nexus
#

at least i categorized them by that

wintry solar
wooden nexus
zealous glen
#

Barcode

wooden nexus
#

Anything in Black is a joker not appearing in a category of the game

worldly sapphire
zealous glen
#

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

worldly sapphire
#

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

zealous glen
tranquil panther
worldly sapphire
#

how do i add another joker in the same file?

zealous glen
worldly sapphire
#

so how do i do it?

zealous glen
worldly sapphire
#

i mess with json

#

does it count?

zealous glen
#

Uhhh

worldly sapphire
#

and a bit of js (i'm not a genius)

zealous glen
#

I’m not familiar enough to compare to any of them

wintry solar
#

Anyone know if there are any mods with consumables that have an effect on jokers I could take a look at?

zealous glen
#

{} are arrays delimiters in Lua; you can see that localization and jokers in my code are arrays of arrays

wintry solar
#

any effect that needs to check that jokers are present or available to receive an effect

worldly sapphire
#

uhh

#

where is my screenshot?

zealous glen
worldly sapphire
zealous glen
#

Yes

wintry solar
worldly sapphire
#

then what do i do next?

worldly sapphire
zealous glen
#

There’s a list of them in the Steamodded wiki

#

Also I have some comments I copied from elsewhere

zealous glen
# zealous glen 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

worldly sapphire
#

i'm using the other joker as base

#

can it work?

zealous glen
#

Can what work?

wintry solar
#

this is my code and this is the error I get when I click on my consumable

worldly sapphire
wintry solar
#

so it's not able to reference editionless jokers

#

and I don't know why not

zealous glen
worldly sapphire
#

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

wintry solar
#

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

zealous glen
worldly sapphire
zealous glen
zealous glen
worldly sapphire
#

let me send a screenshot

#

like this?

wintry solar
zealous glen
zealous glen
wintry solar
#

sweet

wintry solar
#

I can use the card!

#

it throws another error!

worldly sapphire
#

it needs to be named after the joker?

wintry solar
#

😄

worldly sapphire
#

mb

zealous glen
wintry solar
#

where's the pseudorandom stuff defined?

zealous glen
#

At the time I didn’t know but Steamodded doesn’t need to check for the Joker’s name inside calculate

worldly sapphire
#

now it works

#

both jokers work

zealous glen
worldly sapphire
#

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

maiden phoenix
worldly sapphire
#

how do i make the diamonds get retriggered by the joker 2 times?

maiden phoenix
#

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

zealous glen
worldly sapphire
#

i tried many things and it did not work

zealous glen
#

Changing that value increments the number of repetitions, as the calculation for repetitions is already done by the game

worldly sapphire
#

how do i change it?

zealous glen
#

Type another value

worldly sapphire
#

like another repetitions?

zealous glen
#

What do you mean by another?

worldly sapphire
#

idk what i need to put

#

like the another value

#

idk where

zealous glen
worldly sapphire
#

let me see

#

oh it worked

night pagoda
#

how do I replace vars in the collection?

zealous glen
night pagoda
#

I don't see if it does anything specific, already checked

zealous glen
night pagoda
night pagoda
#

and the second value I created also has default value

zealous glen
#

Again maybe it's hardcoded elsewhere

night pagoda
#

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

odd dock
#

about to play a high card with the chips and mult of a straight flush

night pagoda
#

true

#

it has that ability, making your bad hand play good hand's score

#

but it really really depends

wooden nexus
#

okay gonna ask AGAIN

#

because I need to finish this like now

#

How do I make the game start with a joker

night pagoda
#

idk try injecting into Game.start_run maybe?

#

I never tried to but that'd be the first thing I'd try

edgy reef
#

Lemme check rq

wooden nexus
#

I thought it'd be easy since there's start with consumable and start with Voucher

edgy reef
#

You could append Back.apply_to_run with code that's very similar to how consumables are loaded

wooden nexus
#

I have to find how the consumables are loaded then

edgy reef
wooden nexus
#

Wait, what if I used the old random joker effect from Archived?

edgy reef
#

That could work

wooden nexus
#

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

wooden nexus
wintry solar
#

using smod 0.9.8 can I also inject ito a certain place using lovely?

zealous glen
wintry solar
#

oh right, I can inject to certain lines what I need then just append my main stuff at the bottom of the file?

wintry solar
#

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

frosty dock
#

sounds like a job for lovely

wintry solar
#

now to figure out how to get the tooltips working properly

zealous glen
#

I tried earlier and it didn’t work

random sleet
#

i think you might need to use lovely to inject a check for your edition but im not 100%

mellow crag
#

i need to learn how to use lovely XD

worldly sapphire
#

this guy really works

#

and i love it

#

i need to thank @zealous glen for helping me with this

#

tysm man

random sleet
narrow pollen
#

what file is the Not allowed! code detection in again...?

random sleet
#

blind.lua iirc

#

Blind:debuff_hand i think

narrow pollen
#

ooh, perfect! i can hook right into it

worldly sapphire
#

how do i make a joker give me chips?

zealous glen
#

It works when I switch to the negative consumable tooltip

zealous glen
#

at least if you don't need to do regex

zealous glen
worldly sapphire
#

i mean, when i play a specific hand

#

sorry for not specifiying

zealous glen
worldly sapphire
#

yeah

zealous glen
#

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

mellow crag
frosty dock
worldly sapphire
#

every time

#

:(

zealous glen
worldly sapphire
zealous glen
frosty dock
zealous glen
worldly sapphire
#

it was the localization 0_0

#

i forgot to change

#

lol

golden lake
#

morning balatroheads

zealous glen
#

That was my next guess lol

#

Morning akai

worldly sapphire
#

how do i make the chips message appear?

frosty dock
#

or well, create loc entries for the corresponding label and add the badge color to get_badge_colour

zealous glen
zealous glen
#

Because the game does the displaying for you

#

(you can do it manually too)

worldly sapphire
#

also i'm getting an error everytime i start a round with the joker

zealous glen
#

What does the calculate function look like?

frosty dock
#

well that's all that negative consumables do, idk how differently playing card UI gets generated?

zealous glen
zealous glen
worldly sapphire
frosty dock
#

yeah that looks severely wrong

#

context.Played does not exist

worldly sapphire
#

i don't even know if its working

zealous glen
# worldly sapphire

You don't need the self.ability.name. It's probably missing some relevant context or lack of context

frosty dock
#

so it definitely doesn't have a function hand_name

zealous glen
#

Also what loading
[^^^^__] said

worldly sapphire
#

idk what is the hand name check

zealous glen
worldly sapphire
#

i did that in the jokers section

zealous glen
#

Keep doing it

frosty dock
worldly sapphire
#

he actually does this

#

but idk if it works

zealous glen
frosty dock
zealous glen
#

The calculate does the actual jokering

zealous glen
worldly sapphire
#

so how do i do it?

frosty dock
zealous glen
worldly sapphire
#

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

random sleet
#

thats SMODS.end_calculate_context(context) i think

zealous glen
zealous glen
maiden phoenix
#

Yes it is

zealous glen
# zealous glen Well, I have made this, maybe its code will help
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
zealous glen
#

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?

random sleet
#

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

zealous glen
#

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

worldly sapphire
#

how do i disable the debug mode lines?

random sleet
#

were you also packaging an existing joker context?

zealous glen
#

What do you mean?

golden lake
zealous glen
random sleet
zealous glen
#

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

random sleet
#

thats a steamodded issue

zealous glen
narrow pollen
#

wait, i can't hook into this?

random sleet
zealous glen
random sleet
#

i forget precisely

zealous glen
#

That's strange because it does display sticker tooltips

zealous glen
random sleet
#

sticker tooltips might be added separately

worldly sapphire
#

i'm just confused.

random sleet
#

(for winning joker stickers)

zealous glen
#

See if that works

narrow pollen
#

maybe? idk

golden lake
#

1.0 has a different way of doing stuff

zealous glen
#

I just overload the tooltip if the name is "Credits" but a smarter way to do it would be to name it "Credits_ModName"

golden lake
#

so it wouldnt be joker.tooltip

zealous glen
#

Because I hooked into a vanilla function and added directly to the localization dictionary

zealous glen
worldly sapphire
#

about the effect

#

its just frustration, everytime i test it

zealous glen
#

Welcome to the club

zealous glen
random sleet
golden lake
worldly sapphire
frosty dock
golden lake
#

oh?

frosty dock
#

it's just not done the janky way

worldly sapphire
golden lake
worldly sapphire
#

i need an explanation

worldly sapphire
zealous glen
# worldly sapphire i still can't understand

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

zealous glen
golden lake
#

are you on 0.9.8 or 1.0

#

also where are you registering the joker

worldly sapphire
golden lake
#

ok so first of you're not registering the joker

#

where are you registering the joker

zealous glen
# zealous glen ```lua local joker = { slug = "the_one", name = "The One",--name used by...

@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 the scoring_hand. When the Joker finds a card that is both an Ace and Spades, it returns an array that tells the game to create the message a_xmult with value extra.Xmult, a G.C.RED color, and to apply the modifier extra.Xmult as Xmult_mod
worldly sapphire
#

oh man

#

i just need a little example on how do i make the joker work by giving me chips

zealous glen
#

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

worldly sapphire
#

its t_chips

zealous glen
#

You can name your variable whatever, but the game will want specific_variable_name = whatever at some point

worldly sapphire
#

i'm just confused

#

idk what i am doing

frosty dock
#

you don't need the name check...

worldly sapphire
#

uhhhhh

frosty dock
#

also you're uh

#

putting loc vars in the calculate function

worldly sapphire
#

I'M CONFUSED

#

idk what i am doing

#

:(

narrow pollen
#

you're also missing an if on the second line

worldly sapphire
#

AHHHH, i'm losing my mind

narrow pollen
#

should be if self.ability.name == 'Roblox Joker' then

#

no?

frosty dock
#

that check still doesn't need to be there

#

but yeah

narrow pollen
#

i mean, i'm not saying it needs to be

#

but that's still probably why it's crashing

#

in other news

#

no hardcoding~

worldly sapphire
#

it loaded

#

but the effect its not working

#

because i can't Lua

narrow pollen
#

okay so rookie

#

try removing the if entirely

#

when aure says you don't need it

#

good to assume you don't need it

worldly sapphire
#

with the if removed

random sleet
#

you dont need the whole == statement or the then part either

#

or the matching "end" at the end

narrow pollen
#

yeah, i meant the whole if statement

#

the entire second line

worldly sapphire
#

i'm actually losing my mind

#

i can't make it work

narrow pollen
#

take that entire second line

worldly sapphire
#

i'm getting crazy

narrow pollen
#

and throw it on the ground

zealous glen
slow ocean
#

you're trying to write an if statement but you didnt write if

#

to be specific

narrow pollen
#

yeah, we figured that part out

narrow pollen
#

but aure said that it was entirely unneeded anyway

worldly sapphire
narrow pollen
#

YES

worldly sapphire
#

ALRIGHT

narrow pollen
#

THAT IS WHAT THE CREATOR OF STEAMODDED WAS TRYING TO TELL YOU

worldly sapphire
#

SORRY

zealous glen
#

also me

narrow pollen
#

and then make sure to get rid of the "end" line after it

zealous glen
#

I said that earlier

wintry solar
#

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

narrow pollen
#

it's redundant

#

also, shouldn't loc_vars be defined in the joker's loc_def() function anyway?

zealous glen
worldly sapphire
#

the lonely joker effect

#

does nothing

#

yay

zealous glen
#

the name can be whatever

zealous glen
worldly sapphire
#

only the SMODS line is there now

narrow pollen
zealous glen
worldly sapphire
#

yeah

#

its blank

#

there is only the SMODS line

wintry solar
#

show us the entire block

zealous glen
#

Alright, it should look something like

calculate
    (
)
end
worldly sapphire
#

its this

wintry solar
#

no

#

where's your end

worldly sapphire
#

there is no end fool

#

now there is one

narrow pollen
#

i think that's correct?

zealous glen
# narrow pollen

I mean it's almost syntactically correct except for the missing end

#

but it doesn't help with the goal of doing something specific

narrow pollen
#

i'm implying they remove the associated end as well

zealous glen
#

I meant the end associated with calculate

#

or rather function

zealous glen
worldly sapphire
#

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

zealous glen
#

again Idk what keys you want in the array but you can look for other jokers to find the appropriate keys

worldly sapphire
#

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

zealous glen
#

so you need to put the same checks Crafty needs inside calculate

#

Which should be the same I use

narrow pollen
#

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

frosty dock
#

there's also context.scoring_name

zealous glen
#

which is like 500 lines or more

narrow pollen
zealous glen
#

well, all relevant context

worldly sapphire
#

i actually hate myself

#

its not working

zealous glen
#

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(
)

worldly sapphire
#

still not working, i think i give up for today

golden lake
#

i LOVE making pack art

narrow pollen
#

ohhhhhhhhhhhhhhhhhhhhhhhh

worldly sapphire
narrow pollen
#

an unscored hand doesn't even call calculate_joker! good to know

worldly sapphire
#

did i just help with something?

wild gyro
random sleet
#

i cant read

narrow pollen
#

@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

worldly sapphire
#

like this?

narrow pollen
#

well you don't need it twice

#

but yeah

worldly sapphire
#

just one is fine?

narrow pollen
#

yes

#

just make sure you remove one of the ends underneath

#

to balance

#

you need to make sure your ifs and ends are...

worldly sapphire
#

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

golden lake
#

that's not how you do poker hand evaluation

#

the correct form if next(context.poker_hands['High Card'])

narrow pollen
#

well, the problem is

#

that's automatically true, isn't it?

golden lake
#

no lol

narrow pollen
#

oh, i see!

golden lake
#

also it's not context scoring hand

narrow pollen
#

that's what i thought i heard

#

mb

golden lake
#

if context.joker_main and next(context.poker_hands['High Card']) is correct form factor LOL

#

anyways peep this

narrow pollen
narrow pollen
golden lake
#

it also says "Horoscope" in Alternian alphabet

#

and the Pack text is a reference to the Trollian chat client in Homestuck

maiden phoenix
golden lake
#

that as well

#

but also the form factor is wrong

maiden phoenix
#

Yea it triggers whenever there's a context.scoring_hand, might trigger 4 times or something

golden lake
#

tep

#

yep

maiden phoenix
worldly sapphire
#

going to test it in a bit

golden lake
#

it would help you massively to literally just unpack Balatro.exe and read the contents of it

#

read the actual code

worldly sapphire
#

like, i'm not a good person with lua

#

and i extracted the Balatro.exe

golden lake
#

lua is easy what

worldly sapphire
#

it works

#

btw

#

but i get 0 chips

#

lol

maiden phoenix
worldly sapphire
golden lake
worldly sapphire
#

and a bit of js

golden lake
#

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

worldly sapphire
#

i am sorry if i made the chat filled with questions

golden lake
#

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

worldly sapphire
#

and, its giving me chips when i play a flush

#

probably i need to change something

golden lake
#

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

worldly sapphire
#

Crafty joker

golden lake
#

Bad example, Crafty Joker is one of the automated jokers

#

its entire logic is fully abstracted away

narrow pollen
#

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

golden lake
#

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
zealous glen
narrow pollen
#

wait dude

#

@golden lake you do realize that all hand codes are grabbed individually

zealous glen
narrow pollen
#

and the results table has data for every single hand type that a played hand contains, right?

worldly sapphire
#

i played a flush, and still got chips

narrow pollen
#

the reason i coded it that specific way, rookie

worldly sapphire
#

it did not checked for a High card

narrow pollen
#

is because all played hands contain high card

worldly sapphire
#

oh

#

lol

narrow pollen
#

by vanilla game logic

worldly sapphire
#

mb sorry

maiden phoenix
zealous glen
maiden phoenix
#

Unless its even way before

zealous glen
#

@golden lake did you get credits working?

golden lake
#

not yet no

#

im working on art

worldly sapphire
#

I FIXED

#

ITS WORKINGH

#

AHHHHHHH

#

it actually works

golden lake
#

@zealous glen

zealous glen
#

I like the silhouette

golden lake
#

you know what this is referencing right

worldly sapphire
#

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

zealous glen
narrow pollen
golden lake
zealous glen
#

The floating path reminded me of them

golden lake
#

that path is blue

#

that's that one shot from Flip

worldly sapphire
#

even if i gave trouble

#

đŸ«Ą

zealous glen
#

I thought the path was different depending on the memory, but that specific one might’ve looked different

unkempt thicket
#

how do you soul_pos

wooden nexus
#

There's a specific part on the joker creation

gilded narwhal
#

Hey where is the thing that makes hands not score

#

As in like

fading blaze
#

Oops-- I put that message in the wrong chat.

Guess I'll repost here.

gilded narwhal
#

What the mouth or the eye does

fading blaze
# fading blaze Oops-- I put that message in the wrong chat. Guess I'll repost here.

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?
peak jolt
#

where would the suit names be located?

stray warren
#

What file are the functions for the vanilla Joker cards stored? For example, where can I view Gros Michel's calculate function?

stray warren
#

Thanks!

subtle palm
#

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.

unkempt thicket
#

Cool Egg

golden lake
#

thoughts?

wild gyro
#

i feel like the background could have a little more shading but thats it really

#

looks good

stray warren
#

Is there a way to guarantee my custom joker will show up in the shop so I can test it?

worldly sapphire
stray warren
#

I'll try that. Thanks

nimble sequoia
#

I think

narrow pollen
#

wait

#

does context.individual calculation not get called on debuffed cards?

#

IT DOES NOT

wild gyro
#

yeah that seems pretty good

narrow pollen
#

nice!

random sleet
#

haha, women

golden lake
#

the oven is piping hot

random sleet
#

oh sick tag api

peak jolt
peak jolt
narrow pollen
# golden lake

this means that 2 and 3 are going to tecnically be out of order and that's going to be so annoying to me

#

đŸ€Ł

golden lake
stray warren
#
        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.

random sleet
#

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

stray warren
#

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

edgy reef
#

Also doesn't exclude context.repetition

random sleet
#

gros michel's code uses self.ability.name == "Gros Michel" and "Gros Michel" or "Cavendish" iirc

edgy reef
#

Yea

golden lake
#

its a ternary

#

it says "if the name is gros michel this is "Gros Michel", else "Cavendish""

random sleet
#

it's the same as self.ability.name == "Gros Michel" ? "Gros Michel" : "Cavendish" in programming languages that use real symbols

golden lake
#

REAL SYMBOLS

#

autumn throwing shade at lua

random sleet
#

fr wtf is ~=

edgy reef
#

Real languages use != TRUE

golden lake
#

its crossed out = iirc

#

like =/=

#

because this is crossout

narrow pollen
#

double

stray warren
#

Wait, what exactly is repetition context? I've seen it but not sure what it refers to

narrow pollen
#

there ya go

random sleet
#

repetition is for anything that retriggers

narrow pollen
#

@stray warren yeah, retriggers

golden lake
#

yep

random sleet
#

it can cause issues if anything runs in it that isn't a retrigger effect

edgy reef
#

It has a different return than other contexts so you have to exclude it else you'll run into errors

random sleet
#

so you need to be careful to exclude it for a lot of situations

narrow pollen
#

i'm just so upset that there's no way to trigger effects when a debuffed card is played

golden lake
#

same with context.individual, because context individual iterates over a set of individual playing cards

#

make sure to exclude it too

stray warren
#

so just add and not context.repetition to the end_of_round if statement? as well as individual?

golden lake
#

otherwise you'll get an error saying that the for loop can't terminate

narrow pollen
#

because context.individual skips debuffed cards

surreal marsh
golden lake
#

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

random sleet
#

keep in mind this function exists in SMODS

mellow crag
#

goooooooooooooooooooood morning

golden lake
#

morning federation

random sleet
#

good 11:35pm feder

golden lake
stray warren
#

Makes sense. Thanks!

random sleet
#

it exists in 0.9.8 too

edgy reef
#

We love elif chains ❀

mellow crag
#

what are you guys doing?

golden lake
random sleet
#

ms. balatro Stuck smarty Pants

golden lake
#

bites you

mellow crag
#

oh these look good

random sleet
#

lewd

golden lake
#

yes

golden lake
random sleet
#

feder whats the status on 1.0ifying for your mods superplead

mellow crag
#

working on 1.0ifying codex

random sleet
#

🎉

#

cuz i wanna add emojiokers for alchemical stuff....

stray warren
random sleet
#

yeah, don't put "true" in

#

give it a string or call pseudoseed(string) yourself

golden lake
random sleet
#

the string will be your unique seed for that pseudorandom call

stray warren
#

Ok. I'll try that.

mellow crag
#

but it includes rewriting some stuff as well

random sleet
#

are you moving away from registering everything individually superplead

random sleet
#

😭

golden lake
#

she looks so goddamn cool

#

also Yokcos made this card and its so sick

crisp coral
#

the word mult itself isn't highlighted

golden lake
#

i'll fix it

#

also this Joker

#

this one I made

random sleet
#

THIS IS JOKER

random sleet
#

been there

#

every day of my life

mellow crag
#

that's it

#

im done with porting to 1.0

#

who needs more than 4 alchemicals right?

ionic isle
#

real

golden lake
#

feder if you need help with manual labor i can help

#

i'm efficient at it

mellow crag
#

i might write a script for that

edgy reef
#

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)

golden lake
#

damn everyones porting to 1.0

random sleet
#

i should hope so

golden lake
#

now JellyMod is double incompatible lmao

random sleet
#

at least people will have more direct issues with trying to load it rather than getting ingame and having things not work

mellow crag
#

@frosty dock does 1.0 support locked stuff?

wild gyro
golden lake
#

do we think the colors look ok ingame

random sleet
#

i dont think there's a specific framework for unlocks, no

#

colors are colors and colors superplead

#

i think having them darker than standard cards works well for the ✹ vibe ✹

stray warren
#

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

edgy reef
#

Misspelled repetition

stray warren
#

oop, good catch

royal ridge
#

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

crisp coral
#

yeah idk what's up with the atlas

edgy reef
#

Odd, I haven't had any issues

#

Is the atlas set to "ASSET_ATLAS" or something else?

royal ridge
#

should be

queen scroll
#

isn’t there a sprite method in vanilla?

random sleet
mellow crag
#

1.0 port?

random sleet
#

nah i just loaded 0.9.8 up with custom font /s

wild gyro
#

and removed the oddities

stray warren
#

So, will my custom jokers show up in the shop automatically, or do I have to implement that myself?

golden lake
#

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

random sleet
#

local programmer discovers object-oriented programming

edgy reef
#

OOP has it's issues sometimes but when they're not present it's so good.

golden lake
crisp coral
golden lake
#

btw moving the rank number to upper left was such a good chocie

royal ridge
royal ridge
#

😌

golden lake
#

remove the ()

#

lmao

royal ridge
#

wh

crisp coral
#

no that works

royal ether
#

isnt ({}) and {} the same

golden lake
#
SMODS.Sprite{
  key = "HomestuckJokers", 
  path = "hsjokers.png", 
  px = 71, 
  py = 95, 
  atlas = "ASSET_ATLAS"
}:register()
crisp coral
#

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()
royal ether
#

yea i was thinking its probably a capitalization thing

golden lake
royal ether
#

but idk anything about smod frfr

random sleet
#

the string gets :upper()'d so

royal ether
#

oh

random sleet
#

idk why that wouldnt work

royal ether
#

maybe the path is wrong?

random sleet
#

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

royal ridge
random sleet
#

what's the atlas called in your header

#

oh sorry nvm

royal ridge
#

again, i'm pretty sure it's an installation issue?

royal ether
#

have you reinstalled?

#

im like, pretty sure its not an installation issue unless your download got corrupted or something halfway through

golden lake
#

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

narrow pollen
#

i found the problem

#

two of them

golden lake
#

@royal ridge

royal ether
#

also is cryptid even on 1.0

golden lake
crisp coral
golden lake
royal ether
#

yea that would explain why cryptid doesnt work either

narrow pollen
#

oops, pinged the wrong person, mb

#

sorry, just a little excited bc i wanna show something off

narrow pollen
#

but it seems like someone's having a problem when i have something to share

golden lake
#

where's your lovely.toml

royal ether
#

^

crisp coral
#

lovely files are in \lovely

#

not outside anymore

royal ether
#

oh

random sleet
#

👀

golden lake
#

Oddity Tag??

narrow pollen
#

i mean

ionic isle
#

!

crisp coral
#

what an odd tag

narrow pollen
#

i guess i'll just show off what i did

royal ridge
random sleet
golden lake
#

what is the "debug" mod

random sleet
#

also the mod icon

golden lake
narrow pollen
royal ridge
golden lake
#

does it not occur when you like

#

remove your icon

royal ridge
#

it happens when clicking the "mod" tab on main menu, fyi

royal ridge
golden lake
#

very quirky

golden lake
random sleet
#

oh shit yeah same issue here

golden lake
#

i dont have that issue

#

my guess is

#

a recent commit aure made

#

broke the icons

narrow pollen
#

aaaaaanyway

golden lake
#

no no

royal ether
#

smh my head

golden lake
#

no anyway

#

we're solving this

royal ridge
#

i'll try downpatching smod until it works

golden lake
#

this is the commit im on

#

fyi

#

i dont get the icon issue

#

you should kill aure over this though

random sleet
#

bites you

wild gyro
royal ridge
#

this commit works

crisp coral
wild gyro
#

oh

golden lake
#

@frosty dock breaking icons on Loader improvements

royal ridge
#

or changed it or something

golden lake
#

please investigate

royal ridge
#

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?

golden lake
#

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

random sleet
#

yeah i can't observe emojiokers either huh

golden lake
#

should_prefix_atlas

#

its an atlas prefix issue

random sleet
#

ok adding the prefix on the atlas worked on emojiokers but not odditytag.... hum

golden lake
#

whats the prefix for oddity

random sleet
#

odd

#

so the atlas was odd_OddityTag

mellow crag
random sleet
#

with the sprite registering as OddityTag

golden lake
#

what if you removed the odd_ from odditytag

random sleet
#

same issue as above

golden lake
#

sprites skip prefixing

#

wait

#

what if you prefix the

#

this will sound stupid but

#

prefix your icon's name

#

with your mod's prefix

random sleet
#

thats what i was doing

random sleet
golden lake
#

wtf

random sleet
#

i havent actually made the Oddity Tag itself

#

this is just modicon

#

(which will be the same sprite)

golden lake
#

@frosty dock i will ping you 20 times until you wake up and explani this

#

how are you registering the sprite

random sleet
#

(the image file exists at both 1x and 2x)

crisp coral
#

dependencies died

random sleet
#

loader "improvements"

golden lake
#

petition to kill aure with firearms

random sleet
#

noooooo

#

aure works very hard

#

;~;

unkempt thicket
#

launching the egg

golden lake
#

works very hard or is hardly working

random sleet
#

are you gonna develop steamodded

crisp coral
#

one hour in the gbj for aure

golden lake
#

im gonna develop autumnmooded

crisp coral
#

i'm too lazy to revert the commits so i'll be coding without testing

random sleet
#

oh no

golden lake
#

aure: "ive made loader improvements clueless "
balatrogamers:

#

(this is all jokingly)

#

(accidental breaking changes happen)

#

(that said aure will have to spend an hour in the gbj)

narrow pollen
#

okay, so did we solve it?

royal ridge
#

apparently yes

edgy reef
narrow pollen
#

oh that's fun!

random sleet
narrow pollen
#

sorry, i'm just really excited

random sleet
#

which means no tag api yet

narrow pollen
#

because i managed to accomplish this!

random sleet
#

unless you splice together commits but that sounds annoying

unkempt thicket
#

ima have to recode my code soon đŸ« 

narrow pollen
golden lake
#

please space out your description better

#

its too wide

narrow pollen
#

i will, sorry

golden lake
#

in the middle

narrow pollen
#

a lot of my descriptions are like that right now, because it's kind of WIP

random sleet
#

by OddimnMood

narrow pollen
#

but yeah

#

i made an entirely new calculate_joker context

#

two, actually

random sleet
#

congratulations on learning how to use lovely i think

golden lake
#

release it as an api

#

so i can use it

unkempt thicket
#

^^

random sleet
#

oh no

golden lake
random sleet
#

yeah just downgraded

#

im not gigabrain enough to fix it lol

narrow pollen
#
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`
golden lake
#

doesnt just

#

checking if a card is debuffed in individual

#

do the same thing

random sleet
#

no

#

calculate_joker doesn't get called at all

golden lake
#

ok thats useful then

#

i will be stealing this

random sleet
#

better off doing it with lovely...

#

inb4 Flowwey has already added that context to their mod

edgy reef
#

Should I drop my extended joker contexts helper mod now? hmm


golden lake
#

do it

#

give it

random sleet
#

you can always just keep updating it

narrow pollen
golden lake
#

also chat if i punch myself and it hurts am i weak or am i strong

edgy reef
random sleet
#

you are weak if you survive to think about whether it hurts

narrow pollen
#

epic

golden lake
#

ok if my leg gets blown off when i punch it am i weak or am i strong

random sleet
#

is this a better ?

crisp coral
#

yea

random sleet
golden lake
#

oddity more like sus-ity

#

also how did you get it to be undiscovered

random sleet
#

i just

golden lake
#

that doesnt work on my end..

random sleet
#

did?

golden lake
#

for reasons unknown

random sleet
unkempt thicket
#

i feel like the only good way to implement this is as a fusion between stuntman and egg

random sleet
#

that actually would be based

narrow pollen
#

oh btw, i also did this

#

the UI timings weren't 100% at the time, but

golden lake
#

thats messed up

narrow pollen
#

yeah, i think it has almost perfect compatibility with every single boss now

golden lake
#

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

crisp coral
#

set_blind

random sleet
#

chat is this real

narrow pollen
#

myst is correct

#

needle and water will give you $4 on setting blind

golden lake
#

i dont like that

narrow pollen
#

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

crisp coral
#

old matador would give $8 each hand lol

narrow pollen
#

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...

golden lake
#

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

narrow pollen
#

yeah, fair!

golden lake
#

because it doesn't even do anything

narrow pollen
#

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.)

crisp coral
#

every card is broken with 🔂