#💻・modding-dev

1 messages · Page 68 of 1

shell timber
#

that's not a good idea tbh

stiff locust
#

i always have bad ideas this is nothing new

shell timber
#

if you're learning as you go, you'll make bad decisions for e.g. the structure of the code

#

which will be hard to fix if you're new

stiff locust
#

that doesn't sound too hard
i do already know python

#

so fundamentally i feel like im okay

shell timber
#

well good luck then

stiff locust
#

yeah it looks like i fixed almost everything

#

it's just this part that is red now

shell timber
#

have you defined mod_obj?

#

other than that that's probably normal(?)

stiff locust
#

uhh

#

no

languid mirage
#

SMODS will always be like that

stiff locust
#

i see so that's normal

shell timber
#

(as will fusion jokers)

languid mirage
#

because it's not a part of your project

stiff locust
#

makes sense

#

i made sure the priority is higher than fusionjokers so this mod loads after fusionjokers

#

balatro gave me the same error though

stiff locust
#

oh okay

#

so I need to write

SMODS.atlas {
key = "Tsunami",
path = "TsunamiJokers.png",
px = 71,
py = 95,
}
#

did i get that right

languid mirage
#

ye

stiff locust
#

and I do that at the top of the code

languid mirage
#

uppercase Atlas

stiff locust
#

okay

languid mirage
#

it doesn't matter

stiff locust
#

👍

#

I am still getting the same [ expected near local error

#

the rest of the code looks like it'll work

shell timber
#

i'm having a weird issue with steamodded's consumeable api

#

i have my consumeables and they're working normally

#

but the use function's card doesn't refer to the actual card

#

for whatever reason

frosty dock
shell timber
#

it is

#

the issue is that the values in ability are always the values of the default center

frosty dock
#

any other mods?

shell timber
#

cryptid, talisman, debugplus

frosty dock
#

i remember cryptid causing similar issues at one point?? though they really should be resolved

shell timber
#

hm

#

i'll try disabling cryptid

#

okay yeah i turned cryptid and talisman off and it works now

crisp elbow
#

🤔 that's interesting

hardy viper
shell timber
#

i have the release version of cryptid

hardy viper
#

that would explain it

crisp elbow
#

yeah use git

shell timber
#

since that's what most people will be using

#

i know how to use git

crisp elbow
#

Never said you didn't it's just that dev versions of cryptid usually include those fixes

shell timber
#

true

hardy viper
#

latest is generally the most stable (ironically), release version has a lot of bugs that are patched

crisp elbow
hardy viper
#

the only exception to that is lovely beta7

crisp elbow
#

What is even going on with lovely beta7 atm kekw

hardy viper
#

idk

#

i mean

crisp elbow
#

i haven't even updated out of fear cause of the crashes

hardy viper
#

all i know is that the priority is limited to an int32 for some reason

#

and even then that's just because i heard someone say that jen said to lower priority to within that range

#

it's a mystery

#

all i know is that lovely beta6 works just fine

#

and beta7 doesn't

shell timber
#

okay, latest cryptid still has the issue

crisp elbow
#

huh that's wack

#

I would say something in their discord or in the mod thread abt it as well to see if it can get checked out or fixed

#

🤔

hardy viper
#

ya if you post relevant mod code and stuff in the cryptid bug report channel it should get fixed relatively quickly

#

or look through the cryptid code and figure out what's wrong yourself but that's only if you think you'd find it fun

shell timber
#

i found it already

#

this is probably the issue

frosty dock
#

that's still there?

shell timber
#

it's to fix vanilla stuff i think

frosty dock
#

vanilla stuff is fixed in steamodded last i checked

#

try just removing the patch

shell timber
#

nah i just fixed it

frosty dock
#

hm?

shell timber
#

i just added self.ability.set ~= "Colour"

frosty dock
#

still i don't think removing the patch should cause any issues

shell timber
#

okay yeah removing it works fine?

#

i've submitted a PR to cryptid that removes the patch

#

anyways, colour cards are in again

crisp elbow
#

real

shell timber
#

morefluff 1.0.0 will also have jokerdisplay support

gaunt thistle
#

can one of y'all Ctrl+f balatro source for if not OmegaMeta for me?

hardy viper
hardy viper
#

yeah it looks like theres a patch in game.lua for that

gaunt thistle
#

gotcha. thats the code that's causing lovely's UTF-8 crash

#

it's odd because it's being passed as the chunk name

mellow sable
#

:jimball:

hardy viper
#

renew that nitro

#

or dont discord doesnt deserve money gladeline

mellow sable
#

I never bought nitro lol

narrow pollen
#

just a question, as i'm getting back into the swing of things for balatro modding:
if i don't set a sprite for an existing joker, will it retain its default sprite after i take ownership of it?

lament flame
#

Guys whats the height and width of the jokers, vouchers and consumables?

#

Also for atlas's you do draw the jokers as individual sprites then import them into one big one?

brisk rose
shell timber
#

it's uncommon now

spiral orbit
#

making a texture pack that replaces face cards with just more queens

gray magnet
#

oops all queens

spiral orbit
#

your never gonna guess what i called the mod

opal spade
#

my favorite cards
Queen, Kueen and Jueen

shell timber
#

is there a way to include a literal # in a card's name?

shell timber
#

i thought that was a suggestion for a method for a moment

wild gyro
#

yeah that works too

shell timber
#

first bit of New Content for the morefluff 1.0.0 port: Cryptid colour cards!
in order:

  • Purple: Epic Tag (4 rounds)
  • Moonstone: Jolly Joker (2 rounds)
  • Gold: Negative Gateway (9 rounds)
  • 00FF00: Negative Code Card (4 rounds)
shell timber
#

another bit, there's now a T3 voucher for Colour Cards

lament flame
#

hey guys, how do you all add joker text on your joker sprites?

brisk rose
lament flame
#

moab jonkler

#

(my first attempt at making a joker)

tepid sky
spiral orbit
#

ty :D

shell timber
#

morefluff 1.0.0 will also be compatible with cardsleeves

brisk rose
#

(it really does look like an i at a distance to me)

limpid flint
#

What

brisk rose
#

Says "this is not a deck" in french, the e looks kinda like an i

limpid flint
#

That doesn't look like an I to me...

brisk rose
#

I may be slightly blind

#

lmao

#

for reference, this is kinda what I see when it's all zoomed out

hearty mesa
#

how can i get the edition of a joker?

languid mirage
#

if you're using steamodded then card.edition.key

#

@hearty mesa

#

otherwise its wonky
you need to check like card.edition.negative card.edition.polychrome etc.

#

also make sure to check that card.edition exists

stiff locust
shell timber
#

it's uncommon now

stiff locust
#

ohh okay

#

makes sense then

shell timber
#

wanted to test if a card worked while another language was on, picked italian at random, and then got jumpscared

hearty mesa
stiff locust
#
SMODS.Atlas {
    key = "Tsunami",
    path = "TsunamiJokers.png",
    px = 71,
    py = 95,
    }

local splishsplash = {
    loc = {
        name = "Splish Splash",
        text = {
            "Creates 1",
            "{X:red,C:white} Splash",
            " at end of round"
        },
        rarity = 5,
        cost = 8,
        unlocked = true,
        discovered = true,
        blueprint_compat = true,
        eternal_compat = true,
        atlas = "Tsunami",
        pos = { x = 0, y = 0 },
    },
    ability_name = "Splish Splash",
    slug = "j_splish_splash",
    calculate = function(self_card,context)
        if
        context.end_of_round
        then
            local card = self_card("Joker", G.jokers, nil, nil, nil, nil, "j_splash")
            card:add_to_deck()
            G.jokers:emplace(card)
        end
    end
    }

    FusionJokers.fusions:add_fusion("j_riff_raff", nil, false, "j_splash", nil, false, "j_splish_splash", 8)

still getting that unexpected [ near local error, it says it happens near local splishsplash = { and near apparently means within one line?

#

this error happened before i cleaned up the atlas too so I know it's not the atlas

shell timber
#

you're probably missing a comma?

stiff locust
#

i excluded the steamodded header and footer from the code here, rest assured they are in my actual lua file

shell timber
#

somewhere

stiff locust
#

the lua extension for vscode doesn't say i'm missing one

#

¯_(ツ)_/¯

shell timber
#

uh, that's very odd

brisk rose
shell timber
#

you're allowed to do that

brisk rose
#

ah ok

wintry solar
#

you miss a } in your loc

shell timber
#

makes appending easier

brisk rose
#

I was guessing

stiff locust
#

or wait

shell timber
#

that one's the end of the object

stiff locust
#

this one is the one for the loc {

#

above ability name

shell timber
#

can you screenshot the code? it should show the pairs of brackets

wintry solar
#

should be here

stiff locust
stiff locust
wintry solar
#

no, another one

stiff locust
#

i need two??

wintry solar
#

the one there closes the text

#

you need to close the loc too

#

then delete the one under pos

stiff locust
#

so like this

wintry solar
#

👍

stiff locust
#

okay i'll try it now

#

also it's

#

supposed to be when blind is selected

#

what's the state name for blind select

maiden phoenix
#

context.setting_blind

stiff locust
wintry solar
#

can I see where you try and create the joker object?

stiff locust
#

is that not what I'm doing

wintry solar
#

no

stiff locust
#

oh

#

i

haven't done that yet

wintry solar
#

when does it crash?

stiff locust
#

on boot

#

of balatro

#

and it still says unexpected [ near local

#

and it's on the line local splishsplash = {

wintry solar
#

can you send the crash screen?

stiff locust
#

it's here
the only difference between this crash and the one I just got is that the crash in the new one happens on line 18 because the code got moved down when i added the atlas

#

i made sure my mod loads after fusionjokers because i'm trying to register a fusion

tepid sky
#

oh god fusions, i've never been able to get that working personally lol

brisk rose
#

I... have expereince in shoddily making fusions... not fusions, lol

stiff locust
#

i haven't gotten past booting up the game yet so

#

¯_(ツ)_/¯

#

once i get past this error

#

the next error will show up

brisk rose
#

as is the nature of coding

stiff locust
#

it also just occurred to me that i forgot to add the line of text that lists the fusion material

#

added that now

tepid sky
#

nice

stiff locust
brisk rose
#

I wonder if you're gonna run into problems with Fusion being 0.98 when your mod is native 1.0 code

stiff locust
#

at first i did it the 0.9.8 way but they told me to not do that

#

it didn't work before or after i did that though

shell timber
stiff locust
#

he just fixed the uhh

brisk rose
stiff locust
#

end round cash bug

#

i don't think he rewrote the entire thing

brisk rose
#

or me

#

but dim added it

stiff locust
#

it's been fixed by multiple people

wintry solar
#

can you drop your main file in here for me to look at?

brisk rose
# brisk rose or me

(yes I deadass forgot for a second I was the first one to fix that bug, lol)

wintry solar
#

that's not what you sent before?

stiff locust
#

yes that's exactly the same thing

#

but with the header and footer

#

this is all the code I have so far

wintry solar
#

theres no atlas in this

stiff locust
#

oh huh

#

where did it go

wintry solar
#

are you editing a different file

stiff locust
#

oh my god i'm editing a different file

#

I MOVED A COPY OF THE MOD OUT OF THE MODS FOLDER SO I COULD PLAY BALATRO WHILE I WAS WORKING ON IT

#

hold on let me

#

if this works it's gonna be really funny

wintry solar
#

I mean it still won't work

#

but it shouldn't crash

frosty dock
#

oops didn't realize i was scrolled up, don't mind me

stiff locust
#

okay it shows up in the mod browser

#

and doesn't crash on startup

#

so now I need to create the joker object

#

that's with smods.joker right

wintry solar
#

yeah, though I don't see why you'd create this table to then take the values of it and put them in the function, just put them striaght in instead

stiff locust
#

"put them straight in"?

#

so by values of it you mean like

#

the ability and the text and the name of the joker and stuff

#

right

wintry solar
#

yes

stiff locust
#

okay

#

i will do that now

#

oh i forgot the key

stiff locust
#

i can't find it in the collection but the number of jokers went up so

brisk rose
stiff locust
#

it's definitely there

#

okay but what's the default value

wintry solar
#

if you go via the mods menu you'll find it easily

stiff locust
#

oh ok

#

.

#

something went wrong

brisk rose
stiff locust
#

it also occurred to me I made the mod badge green instead of blue

#

oops.

#

fixed that

#

okay the picture of the joker showed up

#

but the text has not

brisk rose
stiff locust
#

i think i fixed the format

#

let me try

#

okay i formatted it wrong but IT WORKS

#

also i need to update the text to say when blind is selected

#

oops

#

what's the formatting for a joker name

shell timber
#

{C:attention}whatever{}

#

usually(?)

nimble sequoia
# stiff locust

did you fix your calculate function parameters? it should be self,card,context and not self_card,context

stiff locust
#

oh i'll do that now

nimble sequoia
#

👍

stiff locust
#

and what's the formatting for the (must have room) text

shell timber
#

{C:inactive}(must have room){}

stiff locust
#

thanks

shell timber
#

you can open the base game's code by opening the exe with winrar

#

and then the default localisation string are under localization/en_us.lua

stiff locust
#

that's not supposed to happen is it

nimble sequoia
#

i think self_card should be card and your local card variable should be something different

stiff locust
#

does it matter what i name the local card variable

nimble sequoia
#

nah

stiff locust
#

okay

brisk rose
#

(Keeping in mind this is 0.98 code) Does anyone know whey this joker doesn't work?

#

It just... does nothing, at least when you try it with a lucky card. I don't think the specific enhancement would make a difference though

#

Joker is originally from Jestobiology and the code is identical. I don't know if it works there, but I'm unsure why it would

maiden phoenix
nimble sequoia
nimble sequoia
#

ah

stiff locust
#

fusionjokers is 0.9.8 i don't know if coding for 1.0.0 will have implications yet

#

if it causes problems with the first joker it won't be too hard to go back

#

i am gonna try it with 1.0.0 coding until something breaks

nimble sequoia
# stiff locust

i thought the code was 0.9.8 because there is SMODS.Sprite in it

maiden phoenix
stiff locust
stiff locust
maiden phoenix
#

idk any function called self_card lol

stiff locust
#

according to 0.9.8 that's how you'd create cards

maiden phoenix
stiff locust
#

idk i saw a 0.9.8 joker do it

#

and i just copied that over

#

brb

maiden phoenix
#

Ooh I get it

maiden phoenix
brisk rose
#

thanks

stiff locust
#

when i assign x and y positions for a joker

#

do i need to do anything special to make it work with 2x sprites

#

or does it just do that

maiden phoenix
#

It automatically loads both x1 and x2 with the same pos

stiff locust
#

with the
same pos?

#

won't that break it

maiden phoenix
#

?

stiff locust
#

or does it 2x the position values

maiden phoenix
#

You need 2 different spritesheet

stiff locust
#

well yeah

maiden phoenix
#

one for x1 one for x2

stiff locust
#

i know

#

but

maiden phoenix
#

And that's it

stiff locust
#

o kay

#

alright so

#

after setting the position values

#

(since i'm fusing every joker i just decided to copy over the vanilla joker sheets and slowly replace each joker on the sheet with its splash fusion)

#

i set it to 71 1140 which should be for riff raff, right?

#

but the sprite is invisible on 2x

#

olay so it's also invisible on 1x

brisk rose
stiff locust
#

oh I know what I did wrong i think

#

these should be the size of the entire sheet right

brisk rose
#

unless it was changed for 1.0

stiff locust
#

okay in that case it would beee

#

x 2 y 13

brisk rose
#

keep in mind it's 0 indexed

#

so the top left is 0,0

stiff locust
#

oh right

#

so it's x 1 y 12

stiff locust
#

there we go

#

now it's showing up as riff raff

#

final step is to check if the ability works

#

uh

#

okay so when I fused them

#

I got a cryptid crash?

#

i will now check the joker itself but the fusion is not working

#

i'm guessing it's one of these nil values that should have something in them

maiden phoenix
#

This should be create_card not just card

stiff locust
#

okay

#

it says undefined global when i do that

#

is that normal

maiden phoenix
#

What

#

Send a screenshot

stiff locust
maiden phoenix
#

Ah ignore it

stiff locust
#

okay

brisk rose
#

Yeah you're using a library that the IDE doesn't know anything about

#

(at least I think that's what's going on)

stiff locust
#

what about the cryptid crash

#

uhhh

#

LMAO

#

it made splash but splash did not get put in the joker slots

maiden phoenix
#

Does your thing have the emplace line?

stiff locust
#

uhh

maiden phoenix
#

This should have the name of your local variable

stiff locust
#

ohhhh

#

okay

#

fixed

#

that means the ability works now

#

but the actual fusion does not work right now

stiff locust
#

is this because of the second line here

maiden phoenix
#

Yea this card should be splishcard too

stiff locust
#

okay

#

do you know anything about that cryptid crash

#

dude i just got a seed that drew the hand K Q J 10 9 8 7 6

#

while testing the ability

#

everything is working ability side now :D

shell timber
#

should it check to see if there's room available?

stiff locust
#

it does not check right now

#

honestly, might just change it to "don't need room" as a buff

#

yeah i'll do that

stiff locust
shell timber
#

i don't know about that

stiff locust
#

🤔

wintry solar
#

What does your fusion line look like?

stiff locust
nocturne garnet
#

does anyone know how to give something a sell button if its in a specifc cardarea?

#

i have no idea how ui stuff works

stiff locust
#

check betmma's spells/abilities

#

they do that

stiff locust
#

because fusionjokers lets you carry values like sellvalue of the original jokers

#

and splish splash should not carry any values

stiff locust
wintry solar
#

It’ll need to be j_modprefix_jokerkey

#

For the last argument

stiff locust
wintry solar
#

If that’s what you set your prefix and key as, yes

stiff locust
#

okay

#

this did not fix the crash

stiff locust
wintry solar
#

You don’t need a slug

stiff locust
#

oh

#

what does it do

wintry solar
#

It’s old 0.9.8 jank

stiff locust
#

oh okay

#

so i can just remove that

wintry solar
#

Yeah

stiff locust
#

alright

wintry solar
#

Your joker should have a key value

stiff locust
#

it does have a key value

#

which is splish_splash right now

wintry solar
stiff locust
#

okay

stiff locust
#

this crash still happens if cryptid isn't there

wintry solar
#

Did you set your mod prefix?

stiff locust
#

no

#

where do I do that

wintry solar
#

In the header, or just use the first four characters of your mod id instead

wintry solar
#

I think it’s just prefix iirc

stiff locust
#

did not fix the crash

wintry solar
#

It might be case sensitive

stiff locust
stiff locust
#

it is the last roadblock to my splash fusion journey

stiff locust
#

i need a lua wizard to save me

tepid sky
#

settings is killing me

wintry solar
edgy reef
#

Hasn’t this error happened before?

#

Cryptid’s create_card getting a nil center?

#

Something like that.

#

Oh nah it’s just missing the mod prefix

tepid sky
#

nah right?

edgy reef
#

No, the UI error is something else

#

That’s just incorrect depth.

edgy reef
tepid sky
#

ah okays

stiff locust
#

put the prefix in

#

on the steamodded header

#

is it supposed to go somewhere else

wintry solar
#

show your code

stiff locust
#
--- STEAMODDED HEADER
--- MOD_NAME: Tsunami
--- MOD_ID: Tsunami
--- MOD_AUTHOR: [Maratby]
--- MOD_DESCRIPTION: FUSES EVERY JOKER WITH SPLASH!!!! Eventually. Except for the ones on the front page.
--- BADGE_COLOUR: 0000FF
--- PRIORITY: -9999
--- PREFIX: tsun
----------------------------------------------
------------MOD CODE -------------------------

SMODS.Atlas {
    key = "Tsunami",
    path = "TsunamiJokers.png",
    px = 71,
    py = 95,
    }

    SMODS.Joker {
        loc_txt = {
            name = "Splish Splash",
            text = {
                "When blind is selected, creates {C:attention}Splash{}",
                "{C:inactive}(don't need room){}",
                "{s:0.7}(Riff Raff + Splash){}",
            }},
            rarity = 5,
            cost = 8,
            unlocked = true,
            discovered = true,
            blueprint_compat = true,
            eternal_compat = true,
            perishable_compat = true,
            key = "j_tsun_splish_splash",
            atlas = "Tsunami",
            pos = { x = 1, y = 12 },
        ability_name = "Splish Splash",
        calculate = function(self,card,context)
            if
            context.setting_blind
            then
                local splishcard = create_card("Joker", G.jokers, nil, nil, nil, nil, "j_splash")
                splishcard:add_to_deck()
                G.jokers:emplace(splishcard)
            end
        end
        }

    FusionJokers.fusions:add_fusion("j_riff_raff", nil, false, "j_splash", nil, false, "j_tsun_splish_splash", 6)
----------------------------------------------
------------MOD CODE END----------------------
wintry solar
#

change your key to just splish_splash

#

you don't need to add j_tsun, smods does it for you

#

your actual key right now is j_tsun_j_tsun_splish_splash

tepid crow
#

also, please fix that indentation 😬

stiff locust
#

will that solve the crash

wintry solar
#

it should do yeah

stiff locust
#

i will check soon i am on overwatch

tepid crow
#

what role?

stiff locust
tepid crow
#

W teammate

primal robin
#

It will add if it's not present only, so it has some checks

wintry solar
#

are you sure?

primal robin
#

Yes. In my mod I register blinds with key = "twbl_test" (where twbl is my mod prefix) and they added to a game like bl_twbl_test instead of bl_twbl_twbl_test

orchid thunder
#

how does one make a new button

wintry solar
#

sounds more like the prefix isn't defined properly, I'm not aware of any objects checking whether the prefix is present or not

tepid crow
#

seems like he's right

            if string.sub(obj[key], 1, #prefix + 1) == prefix..'_' then
                -- this happens within steamodded itself and I don't want to spam the logs with warnings, leaving this disabled for now
                -- sendWarnMessage(("Attempted to prefix field %s=%s on object %s, already prefixed"):format(key, obj[key], obj.key), obj.set)
                return
            end
edgy reef
#

How would this behavior be exclusive to blinds?

tepid crow
#

it's not

wintry solar
#

huh, I guess you can add your mod prefix to your keys if you want to

tepid crow
#

and as usual, you really shouldn't 🙃

tepid crow
wintry solar
#

it'll also not recognise your prefixes if you put the objects prefix there too, so again, don't prefix your keys

tepid crow
#

yeah, won't work if you do [obj-prefix]_[mod-prefix]_[obj-key]

stiff locust
#

IT WORKED

#

okay so how do I create a github

tepid crow
#

you probably start with a github account

stiff locust
#

yeah i'm doing that

hardy viper
#

how it feels to spend like 30 minutes figuring out how to make a custom rarity because there is no steamodded api for it

stiff locust
#

how do I upload a file to my github

wintry solar
#

I think rarity api was merged yesterday

#

oh maybe not

#

maybe the PR was updated

stiff locust
#

also which license do i use

mellow sable
wintry solar
#

yeah, I misread my emails

stiff locust
#

also it is occurring to me that a fuck ton of these fusion effects require being able to count how many unscored cards were played

#

is it possible to apply splash's effect while also counting cards that would be unscored normally, to count how many extra cards were scored by splash?

#

this would be a major help

hardy viper
maiden phoenix
#

When I made splash evo

stiff locust
#

okay

#

is there a way i can detect which cards are not part of the poker hand size

#

some of these effects apply things to those specifically

maiden phoenix
#

I made a table with that info, with the poker hand as a key and the size of the poker hand at its value

#

Taking four fingers into account too

stiff locust
#

half joker is called j_half_joker internally right

#

i assume every joker is internally named like that, but after registering a fusion between half joker and splash just like last time, the fusion did not show up

tepid crow
#

thunk might've named it differently

#

you should double check in game.lua

#

(showman for example is j_ring_master or something)

stiff locust
#

also i'm pretty sure i got the calculation right for how much mult my joker should give

#

but it's not actually giving the mult

stiff locust
#

how do I make the joker output mult

tepid crow
#

yeah that sounds logical

#

the example mods should give you something

stiff locust
#

okay

loud citrus
#

big thanks to frich for helping me understand how take ownership works

#

i have 4 more joker changes i wanna do egg

stiff locust
#

why did it become rental when i fused them

#

i am on white stake???

loud citrus
#

this is concerning

stiff locust
#

it seems to have been a fluke?? i'll test again

stiff locust
tepid crow
#

not sure, I've never actually made a joker 😅

loud citrus
#

can someone tell me why ability is a nil value? i'm taking ownership of square joker so it should use all of it's other code

zealous glen
#

I haven’t modded in a while but I think Steamodded reserves the first argument here to the prototype objects the game builds, while the actual Joker during the game is the second argument, card

loud citrus
#

it also says card is a nil value

#

this is raising more questions than answers

#

out of everything card shouldn't be nil lol

zealous glen
#

Try checking a mod that takes ownership of existing Jokers then

loud citrus
#

bunco is the only one ive seen and they just implement entirely new effects, what i'm trying to do is add abilities that rely on the existing card's code

zealous glen
#

Aren’t you copy-pasting the existing code?

loud citrus
#

no, i'm adding onto it, here's a screen shot of my working code for credit card, i gave it the ability to wipe debt

for square joker i'm adding a new context where if you discard exactly 4 cards it also adds chips, i'm using what should be an existing ability to make this happen

zealous glen
#

Credit Card probably doesn’t break because it doesn’t use calculate

#

Credit Card probably works when added or removed from the deck, which have their own functions

wintry solar
#

yeah it will overwrite the default behaviour

loud citrus
#

oh! that helps because in testing i recreated the card as a new joker, shouldn't be too much work

zealous glen
#

I wonder if a setting to keep the original behaviour would be good

#

It would avoid mods copy-pasting code

loud citrus
wintry solar
#

oh hang on actually

#

if it doesn't return anything it'll hit the default tower

zealous glen
#

Ohh

#

The spaghetti

loud citrus
#

i'm scared :(

#

working with spaghetti when i already make my own

tepid crow
loud citrus
#

i think it's funny how many if statements you can find in the code

wintry solar
#

I mean you don't need to touch the base code at all

zealous glen
#

localthunk’s if-else-if Tower of Babel

zealous glen
tepid crow
loud citrus
#

anyways how do i fix the ability nil problem i have, because when i made new joker through SMODS it seems to take care of that problem for me?

tepid crow
#

try returning something?

loud citrus
#

when i remade square joker this is it! that's why i'm confused

tepid crow
#

I'm sorry what is that

wintry solar
#

the function should be (self, card, context) and then replace self.ability with card.ability

loud citrus
tepid crow
#

isn't :register 0.9.8 stuff

loud citrus
#

tank you!

#

thank

#

my old code is working again

zealous glen
loud citrus
#

i thought you said to replace ability, i'm so silly

#

i'm sorry

zealous glen
#

It’s fine

loud citrus
#

it's funny because i have local card = self at the top

wintry solar
#

in other news, I have loc_txt working with my texture pack stuff 🎉

loud citrus
#

🥳

wintry solar
#

now to build the actual selection UI 😭

zealous glen
#

What does watermelon mean

hardy viper
#

thats a fruit\

zealous glen
#

So is gros_michel

loud citrus
loud citrus
#

well not to diffrent this time around

orchid thunder
tepid crow
orchid thunder
#

Do you know where I find that

tepid crow
#

your editor really should have a "search through all files"

#

does it not?

orchid thunder
#

I use notepad ++

tepid crow
#

cool, that one has search all

#

ctrl+shift+f

orchid thunder
#

But don't I have to open all the files with it

tepid crow
#

no

#

just select the directory of the unzipped game

orchid thunder
#

Oh

tepid crow
#

like this :)

orchid thunder
#

Holy shoot

#

Ok you learn something new every day

tepid crow
normal timber
#

Mods won't load for me 😦 I've followed the steps, and tried several different mods, but when I launch the game, it just runs the base version of Balatro. Am I missing something?

crisp elbow
#

no version.dll

#

also mods is in the wrong folder I think

#

the folder they're supposed to be in is c:/users/user/appdata/roaming/balatro

#

just copy and paste the mod folder into the balatro folder

normal timber
#

Thanks for the help. Moving the files there has made no difference. What's the version.dll? I can't see any reference to that file in the Steamodded installation guide

brisk rose
#

It's Lovely. You need it for Steamodded

normal timber
#

ah, ty

orchid thunder
#

im about to cry i cant figure out how to make a button

stiff locust
#

okay seriously how do i make my joker give mult

#

the example mods did not help

#

i just can't understand why theirs gives mult and mine doesn't

brisk rose
#

here's another example, it's a bit conveluted due to its dual nature, but it's what I found on short notice

#

it looks like it's almost done by default

stiff locust
#

so it's the

if context.joker_main
  return {
    mult = card.ability.extra.mult,
    card = card
  }

right?

brisk rose
#

What exactly does your calculate function look like?

#

the whole thing

brisk rose
#

also I haven't seen context.joker_main anywhere

stiff locust
# brisk rose What exactly does your calculate function look like?

this joker should give +5 mult per unscored card
and i'm using the same method as sdm0's splash evolution to determine the number of unscored cards, which is checking how many scored cards there should be and checking how many cards were in the played hand and then subtracting them and multiplying the difference by 5 to get the number of mult it gives

even when i just tried setting the mult to a static value (was 5 for testing) though, it never gives out mult anyway

#

most of this code is unchanged from sdm0's, except with me changing the mult mod to 5, because the effects of the splash evolution and the soaked joker fusion are really similar

#

everything else about the joker works except for the ability

#

I need to get this working because this function is the backbone to a LOT of splash fusions

lament flame
#

where are the joker abilities stored in balatro? i was looking in the source code and it only has the description and stuff i think its loc text stuff

brisk rose
#

keeping in mind to set that extra value in the definition

brisk rose
#

the same way he has it

#

just looked at the code you copied

stiff locust
#

okay

#

but if this works won't it give +5 mult if there's at least one unscored card instead

#

i guess i'll find out

brisk rose
#

this looks important

#

did you add it too?

stiff locust
#

i will try that

brisk rose
#

Also sorry if I'm wasting your time, by coding at all you're well ahead of me at this

stiff locust
#

nah it's cool

stiff locust
brisk rose
#

did you set the extra=5 in the joker definition?

stiff locust
#

wait I think I know why it's not working

#

nevermind I don't know

brisk rose
#

What I'd do is just copy the whole thing again completely verbatim, and change stuff while keeping it working

stiff locust
#

yeah thats what im doing right now

stiff locust
#

didn't

work

#

i copied everything except the function that calculates the evo condition

#

it does nothing

brisk rose
#

seems like there's some problem with variables or something

#

like... he uses a variable that he set up himself somewhere else

stiff locust
#

if that were the case it would tell me

#

the lua extension for vscode doesn't flag anything

#

gotta go check if the splash evo even works itself

brisk rose
#

good idea. Most of the problems I've run into with DeFused were problems with the original jokers

stiff locust
#

it

doesn't work

#

this
makes a lot of sense

brisk rose
#

speaking of, still trying to figure out why Collectable Chaos Card isn't working

brisk rose
stiff locust
#

yeah lol

stiff locust
#

I broke splash.

#

like the vanilla joker

#

is not working

brisk rose
#

lmfao, so there's something in your mod probably not letting any of the splash related stuff work

#

does SDM's splash evolution work without your mod loaded?

stiff locust
#

i will check that

stiff locust
#

i don't have it discovered and i can't discover it because splash does not work

#

even without my mod loaded

#

splash is not working

brisk rose
#

oh what

#

that... makes no sense

stiff locust
#

exactly

#

i think it has to be the evolution

brisk rose
#

well... does splash work without evo loaded?

stiff locust
#

if it doesn't i'm gonna be

#

a little annoyed

#

slightly pissed

#

yknow just

#

a tiny bit

stiff locust
brisk rose
#

so... another mod must be breaking it

stiff locust
#

wahtwhat the fuck

#

no other mods do anything to splash

brisk rose
#

unless it was broken in the newest update and no one noticed

#

lmfao

stiff locust
#

i turned the speed to 4x and turned off fast forward and the issue is still there

#

guess it's time to figure out which mod broke splash

#

when i find the bastard that broke splash

edgy reef
#

This is basically 100% of splash's logic

brisk rose
stiff locust
#

i have

#

narrowed down the number of mods it can be

#

to 8

brisk rose
#

I just realized that the "#" in front of the variable doesn't seem to be done anywhere else that I can see. Is it that simple?

loud citrus
#

ahhh, i don't know why it's not working, i feel silly, could i get some help?

brisk rose
#

should have expectd something like that

nocturne garnet
brisk rose
wintry solar
#

Does it do anything right now?

lament flame
#

do i need the "mod" configs if its not scaling?

#

like if i want flat chips nothing else would it be like

config = {chips = 300},

stiff locust
wintry solar
# stiff locust no

Have you tried throwing some debug messages around your function to check where it’s getting to?

stiff locust
#

and that is fucking up sdm0's evolved splash
and thus also fucking up my fusion since they are very similar

brisk rose
#

did you figure out what mod it was?

stiff locust
#

almost

#

i have it down to 8

#

i have it down to four

#

ceres, nopeus, SDM_0's stuff and more joker packs

#

it's ceres or more joker packs

#

it's ceres

loud citrus
stiff locust
#

yeah 100% ceres is causing it

#

now that i've gotten to the bottom of that

#

i will test my joker again with ceres disabled

#

you know what I think I figured out why my joker isn't working

#

it doesn't apply the splash effect

#

yep that was the issue

#

if splash is in play, my joker works properly

#

now how do I add the splash effect to my joker

brisk rose
#

well it seems to be basically a single line of code from what was said before

stiff locust
#

okay

stiff locust
#

(i am putting splash effect on my joker)

brisk rose
#

again, you're using outside libraries, so that sort of IDE warning is irrelevent

wintry solar
#

You can probably just check the size of G.play and compare to scoring hand if you don’t need to actually score the other cards

brisk rose
wintry solar
#

You just need to open the folder where you pull the files out of the game into your project

#

Or open your entire mods folder and the lovely dumps will probably have most of it

wintry solar
brisk rose
#

My coding experience is one quarter each of beginner Python and c++ at a community college 5 years ago that I haven't used since... and it shows

stiff locust
stiff locust
#

soooo

brisk rose
#

Yeah, in this case it was. As Eremel said, if you have your whole mods folder in your project those warnings will be more consistently relevent

stiff locust
#

still says this

wintry solar
#

Does the joker need to score the extra cards that aren’t in the hand?

stiff locust
#

in future i will need to know how to do this though

wintry solar
#

You’ll probably need to patch the part that checks you have splash then

stiff locust
#

like replace the code?

nocturne garnet
#

not sure tho

nimble sequoia
#

ye, it's context.scoring_hand

wintry solar
#

progress!

opal spade
#

wait

#

are the texture packs going to be represente by cards???

#

:0

wintry solar
#

that's the plan

languid mirage
#

would there be a simpler menu option? this seems rather overwhelming
I think most people would just want to have a texture pack management like in minecraft, with priorities per pack

individual cards might be good for edge cases tho

#

unless I am misunderstanding how this would work

wintry solar
#

Select the object type from the left, the texture displays zone will display all the textures you have installed and then you can reorder the oens you want to use at the top respecting priority

nocturne garnet
#

is this awesome

nocturne garnet
#

i completely forgot to make it give Xmult 💀

#

also cost is weird

#

nvm fixed it lmfao

regal wolf
wintry solar
#

eh, I can work on simplifying it down, the issues arise when you want to combine texture packs, and having a blanket apply button wouldn't work nicely with that

zealous glen
wintry solar
#

set the textures per object

zealous glen
zealous glen
#

I expect most texture packs to either change everything or one specific set, so the only conflict is when two different texture packs change everything.

#

Otherwise, you could beg the question of more granularity: why not set texture packs by suit, like the Friends of Jimbo?

#

I think a global object setting is simpler to use and sufficient for 99% of use cases

loud citrus
#

when using take_ownership, how do i completely overwrite a joker?

rough furnace
#

I think you just redefine every thing about it

loud citrus
#

like the slug?

#

and name?

rough furnace
#

what are you trying to do?

loud citrus
#

make it so 8 ball gives the last used tarot instead of a random one

#

i'm guessing that will need a rewrite of the card

rough furnace
#

you should be able to take ownership and just replace it's calculate function

loud citrus
#

what would that look like? if you don't mind me asking

rough furnace
#

imma be honest I've never used take_ownership

loud citrus
#

lol, that's fine

rough furnace
#

yeah probably something like that

#

I can pull up the 8ball code

loud citrus
#

for this i never touched the hand context so i'm asuming when i do that i'll replace it?

#

working with this game spaghetti before won't it just try and do both?

agile rain
#

for some reason my planet cards are not localizing anymore, but tarots and some spectrals are. Both Tarots.png files in assets have the correct sprites so I'm clueless what's going wrong.

SMODS.Atlas { key = "Booster", path = { ['it'] = 'boosters.png', }, px = 71, py = 95, prefix_config = { key = false } }
        SMODS.Atlas { key = "Tarot", path = { ['it'] = 'Tarots.png', }, px = 71, py = 95, prefix_config = { key = false } }
        SMODS.Atlas { key = "Voucher", path = { ['it'] = 'Vouchers.png', }, px = 71, py = 95, prefix_config = { key = false } }
        SMODS.Atlas { key = "icons", path = { ['it'] = 'icons.png', }, px = 66, py = 66, prefix_config = { key = false } }
        SMODS.Atlas { key = "Joker", path = { ['it'] = 'Jokers.png', }, px = 71, py = 95, prefix_config = { key = false } }
        SMODS.Atlas { key = "blind_chips", path = { ['it'] = "BlindChips.png", }, px = 34, py = 34, prefix_config = { key = false }, atlas_table = 'ANIMATION_ATLAS', frames = 21 }
        SMODS.Atlas { key = "shop_sign", path = { ['it'] = "ShopSignAnimation.png", }, px = 113, py = 57, prefix_config = { key = false }, atlas_table = 'ANIMATION_ATLAS', frames = 4 }```
rough furnace
loud citrus
#

okay ill try it out

wintry solar
zealous glen
loud citrus
#

☝️ this person (me)
goldfish memory

agile rain
frosty dock
#

i do recall seeing something about localized atlases being jank though

loud citrus
#

i don't understand what it's asking of me

#

everything should close right

tepid crow
#

so apparently thunk never actually uses set_deck_usage meaning every deck's count is just 1 lmao

loud citrus
#

lol

tepid crow
#

that looks like it came from an event, but I don't see one

loud citrus
#

i'm mashing 8 ball code with the fool

tepid crow
#

oh oops there actually is an event I'm blind

loud citrus
#

lol thats fine

tepid crow
#

you really need to fix that indentation though

#

actually, fixing the indentation will probably even show you what the issue is

#

do you know what I mean when I say "fix the indentation"?

loud citrus
#

no

#

if it's not to much for you, could you do a small expiation?

tepid crow
#

sure

#

do you know what indentation is?

loud citrus
#

nope

#

i may have a rough idea but i don't know the terms

tepid crow
#

indentation in coding usually is however many spaces (or tabs) you have before a line of code

#

so this code is not indented at all:

local x = 1

and this code has a lot of indentation:

                            local y = "hi"
loud citrus
#

so this is used to space stuff out like my code here?

tepid crow
#

yeah!

#

its used for visual grouping and organization

#

compare no indentation (or imagine nonsense indentation)

if (self.methods.init) then
if (tostring(arg[1]) ~= "___CREATE_ONLY___") then
obj.init = self.methods.init
if obj.init then
obj:init(unpack(arg))
end
end
end

versus "proper" indentation

if (self.methods.init) then
    if (tostring(arg[1]) ~= "___CREATE_ONLY___") then
        obj.init = self.methods.init
        if obj.init then
            obj:init(unpack(arg))
        end
    end
end
loud citrus
#

this is better

tepid crow
#

Yeah 🥳

loud citrus
tepid crow
#

funny you chose the word "grammar" haha

#

most languages don't force you to indent, and you can do whatever you want

#

but there are languages that use indentation as actual program control flow

#

so indenting less/more means it does/doesn't get executed

loud citrus
#

that is cool! fool

tepid crow
loud citrus
#

not yet, but it might been seen in time :)

tepid crow
#

try matching the "beginning statements" (such as if ... then, function ...() or for ... do) with their end

loud citrus
#

this seems right so far, good thing it can show me the starts and ends :)

tepid crow
#

ooh, be careful with that

#

notepad++ makes some small assumptions about beginning and ends

#

in this case, something went wrong, but notepad++ just ignores it

loud citrus
#

oh i see, probably has to do with , then

tepid crow
#

could you quickly paste your code here?

loud citrus
#
    calculate = function(self, card, context)
        if context.individual then
            if #G.consumeables.cards + G.GAME.consumeable_buffer < G.consumeables.config.card_limit then
                if (context.other_card:get_id() == 8) and (pseudorandom('8ball') < G.GAME.probabilities.normal/self.ability.extra) then
                    G.GAME.consumeable_buffer = G.GAME.consumeable_buffer + 1
                    G.E_MANAGER:add_event(Event({trigger = 'after', delay = 0.4, func = function()
                        if G.consumeables.config.card_limit > #G.consumeables.cards then
                            play_sound('timpani')
                            local self = create_card('Tarot_Planet', G.consumeables, nil, nil, nil, nil, G.GAME.last_tarot_planet, 'fool')
                            self:add_to_deck()
                            G.consumeables:emplace(self)
                            used_tarot:juice_up(0.3, 0.5)
                        end
                    end
                return true end }))
            delay(0.6)
            colour = G.C.SECONDARY_SET.Tarot,
            card = self
            end
        end
    end
    })```
#

uhhh

tepid crow
#

use ``` for multiline blocks haha

loud citrus
#

that's better

#

i have a hand full of jokers in the works so the one you're looking for is 8 ball

tepid crow
#

I'm gonna turn your code into a very abstract tree of ifs and (){}s, one sec

loud citrus
#

yeah, spaghetti code

tepid crow
#
calculate = function(self, card, context)
    if then
        if then
            if then
                (({function()
                    if then
                    end
                end
            return true end }))
        end
    end
end

alright I think this is only the ifs and brackets

loud citrus
#

that's a good visual

tepid crow
#

what you see there makes sense?

#

as in how its just your code without any actual variables?

loud citrus
#

this is what i'm thinking

tepid crow
#

yeah, exactly

#

but there is an issue with the code

#

because not only the ifs and ends have to match up, the ()s and {}s also need to match up

#

and they really can't cross lines

#
if then
    (
end
)

can't really do this, right?

loud citrus
#

is this what's happening?

#

the ends included are messing this up, so i need to restructure

tepid crow
#

this end is messing up yeah

wintry solar
tepid crow
wintry solar
#

no, the return true needs to be inside the event function

tepid crow
#

there it is

wintry solar
#

103 is ending it early

tepid crow
#

does Eremel's comment make sense with the explanation I just gave Rose?

loud citrus
#

here's there working code! i fixed a few other things by the game telling me and now i can counite troubleshooting the rest of the code :)

#

thanks for explanation how the ends were interacting with the code

tepid crow
#

would it be possible to see the full code just to double check?

loud citrus
#

yeah

tepid crow
#

perfect, code looks good

#

might wanna indent this part though

#

since its still within the if

loud citrus
#

👍

#

i'll make sure you get credit in my mod for teaching me about this :)

tepid crow
#

haha you don't have to, I don't mind 🙃

tepid sky
loud citrus
stiff locust
#

last time i was around i dont remember if i got an answer

#

how do I add splash's effect to a custom joker

maiden phoenix
#

Its just a joker check in G.FUNCS.evaluate_play

stiff locust
maiden phoenix
#

Look for the function G.FUNCS.evaluate_play (using ctrl+shift+f) and you'll see it calls next(find_joker("Splash"))

stiff locust
#

in which lua

maiden phoenix
#

ctrl+shift+f lets you find it in every file it exists

stiff locust
#

what

maiden phoenix
#

You use VSCode no?

stiff locust
#

yeah

maiden phoenix
#

Well you can use this nifty shortcut

stiff locust
#

it searches every file that exists??

#

(on my computer)

maiden phoenix
#

It search every occurence of the word in every file that's in your VSCode workspace

#

it's like ctrl+f but better

stiff locust
#

ahhh

#

okay this makes sense

stiff locust
#

oh wait

#

i found it

maiden phoenix
#

Did you drop your unzipped balatro folder inside VSCode?

stiff locust
#

okay

maiden phoenix
#

Ok nvm

stiff locust
#

so how do I add a custom joker to that

maiden phoenix
#

Either hook or lovely inject the joker you wanna check in

stiff locust
#

which one of those is easier

#

actually i should do the first one

#

because your evolution might have a lovely patch collision with my fusions

#

am i understanding this right

maiden phoenix
#

Lemme check cuz I'm not sure

stiff locust
#

okay

maiden phoenix
#

Nah I don't override it, I write after it

stiff locust
#

ahh okay

#

so that'd be the best way to avoid a collision?

maiden phoenix
#
# "Ripple" joker scoring

[[patches]]
[patches.pattern]
target = "functions/state_events.lua"
pattern = "scoring_hand[i] = G.play.cards[i]"
position = "after"
payload = """
        elseif next(find_joker('Ripple')) then
            scoring_hand[i] = G.play.cards[i]
"""
match_indent = false
stiff locust
#

oh that's really easy actually

#

how would I add multiple jokers to the list

#

patching again for every joker seems inefficient

maiden phoenix
#

elseif next(find_joker('x')) or next(find_joker('y'))...

#

How many jokers there is?

stiff locust
#

almost all of my fusions will require this

maiden phoenix
#

Maybe make a global table with all your fusions and add a check in the lovely inject see if it exists

stiff locust
#

a table is {} right

maiden phoenix
#

Yea, to make it global you just don't write local behind the table variable

stiff locust
#

would I have to do something like

for x in splashtable
if next(find_joker(x)) then
scoring_hand[i] = G.play.cards[i]

or does it just work if i do elseif next(find_joker(splashtable)) then on that line

maiden phoenix
#

I think theres an easier way, you could add a "is_splash: true" to your joker object's ability, then during the function you iterate over your jokers and check if any jokers you got has the attribute (and isnt debuffed)

stiff locust
#

and how would I check that value

stiff locust
#

if i'm gonna iterate over every joker anyway then what difference does it make

maiden phoenix
#

Whatever suits you

hardy viper
stiff locust
#

when i try to do this

maiden phoenix
stiff locust
#

oh does it have to be in its own file

maiden phoenix
#

Also I found a better way to do your splash check

#

Yea inside lovely.toml

stiff locust
#

ahhhhh

maiden phoenix
#

or lovely/your_file.toml

#

It requires an header too

stiff locust
#

okay

maiden phoenix
#
[manifest]
version = "1.0.0"
dump_lua = true
priority = 0
stiff locust
#

should i change the priority

maiden phoenix
#

Idk if it matters really

stiff locust
#

okay

maiden phoenix
#

^This one is from JokerEvo so

stiff locust
#

well i'd want it to happen after my mod loads right

maiden phoenix
#

Doesn't really matter

stiff locust
#

okay

maiden phoenix
#

And when it's removed you set it to false

#

Actually it might cause issue if one joker gets debuffed and you got another splash so nvm

stiff locust
#

yeah

#

Oops! The game crashed:
Syntax error: functions/state_events.lua:804: 'then' expected near ')'

maiden phoenix
#

?

stiff locust
#

¯_(ツ)_/¯

maiden phoenix
#

Show the content of your toml file

stiff locust
#
[manifest]
version = "1.0.0"
dump_lua = true
priority = 0

[[patches]]
[patches.pattern]
target = "functions/state_events.lua"
pattern = "scoring_hand[i] = G.play.cards[i]"
position = "after"
payload = """
        elseif next(find_joker(Splashtable))) then
            scoring_hand[i] = G.play.cards[i]
"""
match_indent = false

trying it with just putting the name of the table in and if that doesn't work i'll do the for loop

#

oh there's an extra bracket

#

oh i see

maiden phoenix
#

Wait are you sending the whole table to find_joker?

stiff locust
#

well i'm gonna see if that works yeah

maiden phoenix
#

I don't think it will

stiff locust
#

we will see

#

i forgot to remove it from my regular lua file

#

lol

stiff locust
stiff locust
#

i did put the table at the top of my lua file

do i need to put it elsewhere for the game to recognise it

maiden phoenix
#

Check if the table exists before looping over it

stiff locust
#

but then it'll just return false and move on won't it

maiden phoenix
#

Was the crash "table is nil"?

stiff locust
#

the crash was "attempt to call a table value"

maiden phoenix
#

Show what your table looks like

stiff locust
#
Splashtable = {
    "Soaked Joker",
    "Splish Splash",
}

splish splash isn't supposed to be here, but I wanted to add it to the list just to make sure it works with multiple entries

maiden phoenix
#

And whats your loop iteration like?

stiff locust
#
payload = """
        for x in Splashtable do
            if next(find_joker(x)) then
                scoring_hand[i] = G.play.cards[i]
                break
            end
        end
"""
#

oh i

#

left another extra bracket

#

but that was not the issue

maiden phoenix
#

Not only that, but you need to specify pairs or ipairs for the table

stiff locust
#

huh

maiden phoenix
#

Check the vanilla code there's plenty of example

stiff locust
#

i think i get it

#

well it didn't crash this time

#

but the splash effect is also not triggering

#

which makes me think something is up with the table entries

#

do i need to put the joker key in there

stiff locust
maiden phoenix
#

Show your changed loop

stiff locust
#

i think i know why it's not working

#

actually no i don't

#

but i did move the pattern up by one line because I couldn't figure out how to write elseif for x in... in a way that made the code actually function on that line (it was just being skipped most of the time)
but i think i moved it to the wrong place and I should actually put it lower inside the else part below
this was wrong

maiden phoenix
#

If you want to iterate over a keyless table you do for k, v in ipairs(table)

stiff locust
#

i suspect that's what it is? but the code is still clearly being run because of the call table crash