#💻・modding-dev

1 messages · Page 657 of 1

red flower
#

ah i didnt read the chance

granite raptor
#

i mean i don't want to wholly ban vanilla jokers on this deck

sturdy compass
#

What you could do is add all of your jokers to a pool and pull a key from that pool on context.create_shop_card when the chance hits

wild patrol
#

Is there a way to prevent a joker from being targeted by something

granite raptor
#

that's what i've done so far, though i'm unsure how to only pull the key, like i know you can do smods.add_card{set = "modprefix_jokers"} but that creates the card

wild patrol
#

Like say the banana command I got can I make it where it can ignore specific jokers

red flower
#

you can just return the set in that context for it to create the card

#

you dont need to grab the key manually for this

wild patrol
#

Kinda yeah

#

Got a command that can replace a joker with a banana

#

But I got a couple ones I wanna make where won't target them

#

So u can use those to battle back against chat messing with your stuff

daring fern
granite raptor
sturdy compass
#

The first one

red flower
#

neither

sturdy compass
#

Wait no

red flower
#

astra can probably type it faster

sturdy compass
#
return {
   shop_create_flags = {
      set = ‘modprefix_jokers’
   }
}```
wild patrol
red flower
#

G.jokers.card is not a thing

wild patrol
sturdy compass
#

I PR’d that system too so I feel silly for forgetting the shop_create_flags key lolol

granite raptor
sturdy compass
#

Set

red flower
sturdy compass
#

The set argument also allows custom pool keys

wild patrol
#

or would using joker.config.center.key

#

be the right way

red flower
#

i dont know what you want to do since i wasnt readying your conversation but the basic logic for that condition is wrong there

wild patrol
#

essentially just trying make the command ignore the f joker

#

when triggered

red flower
#

then you need to check that G.jokers.cards[random] is not that

#

and reroll if it is i guess

#

or you can make a table without the joker in the first place

granite raptor
#

whenever a joker gets replaced i crash with "attempt to concatnate local 'rarity' (a nil value)", and i don't see any of my files in the traceback, did i go wrong somewhere that i can't see?

red flower
#

looping P_CENTERS directly before load wont have modded jokers

granite raptor
#

ah

#

-# i probably would have caught that given the print on 1418 but i just had that there to copypaste into eval

red flower
#

i have code that dynamically adds jokers from my mod to a pool if you need it

granite raptor
#

how would i make sure it runs after load then? and yeah that'd be good to look at sure

red flower
#

i dont really use these so it might not work correctly

#

specifically i just realized it might add things twice after language is changed

#

yep lol

#

i never noticed before

#

but the logic would be similar, you just need to hook another function or add a flag to that one so it doesnt run twice

granite raptor
#

does :inject_card handle rarities as well?

red flower
#

no, you would still need to add that

sour garden
#

why does using this crash the game? how do i index the seal?

wind steppe
idle plaza
lament agate
#

how would i manipulate edition's probabilities

red flower
lament agate
red flower
#

you can use G.GAME.edition_rate but its not guaranteed modded rarities use it
the easier way i think is to hook poll_edition

lament agate
red flower
#

then just use that variable

lament agate
#

so if i wanted to boost negative edition, i just do G.GAME.edition_rate.negative ?

red flower
#

no, it's global

#

if you want one by one you would need to hook the get_weight functions i think

frosty rampart
#

each edition's individual weight includes G.GAME.edition_rate in the formula

lament agate
#

i see

white hull
#

Is there a way to make a return message linger for a bit?

red flower
#

delay

white hull
#

Merci

terse merlin
#

cryptid code is unsightreadable, how do i make a SMODS.Blind function that updates constantly (like every frame or so)

red flower
#

i dont think you can with the api, you would need to hook update

terse merlin
#

well i have a variable in an update hook, but idk how to...

#

i want to update the blind locs every frame

#

i have the variable that gives me the value i want to change them to

#

but i dont know how to force the locs to update with the variable

#

like what, do i just shove G.GAME.blind:set_text() in the hook???

red flower
#

ah that i dont know

#

i know set_text has some problems because i tried just that and it didnt update properly

terse merlin
#

pain

#

i cant read through all of these tables to try figure out how tf cryptid does it

#

it hurts to look at

normal crest
#

Likely the timer variable there is used in a patch to handle the text

#

So I'd look for any references to patience_virtue_timer in toml files

wild escarp
#

Where are the rarities and keys of jokers stored?

red flower
#

G.P_CENTER_POOLS.Joker

wild escarp
#

So, how would I check if an owned joker's rarity is one in particular, or if it is a particular joker?

red flower
#

ah i get what youre saying now
joker:is_rarity(rarity)
joker.config.center.key == "key"

wild escarp
#

Thank you!

orchid bolt
#

prolly stupid question but how can i get the hand size value

red flower
#

G.hand.config.card_limit

orchid bolt
#

i tried that but i got this

daring fern
orchid bolt
#

oh wait the crash only happens if i hover over it in the collection in the main menu

#
    key = "rw_gourmand",                                  --name used by the joker.    
    config = { extra = { xmult = 1, mod_xmult = 0.25 } },    --variables used for abilities and effects.
    pos = { x = 0, y = 0 },                              --pos in spritesheet 0,0 for single sprites or the first sprite in the spritesheet.
    rarity = 3,                                          --rarity 1=common, 2=uncommen, 3=rare, 4=legendary
    cost = 0,                                            --cost to buy the joker in shops.
    blueprint_compat=true,                               --does joker work with blueprint.
    eternal_compat=true,                                 --can joker be eternal.
    unlocked = true,                                     --is joker unlocked by default.
    discovered = true,                                   --is joker discovered by default.    
    effect=nil,                                          --you can specify an effect here eg. 'Mult'
    soul_pos=nil,                                        --pos of a soul sprite.
    atlas = 'rw_gourmand',                                --atlas name, single sprites are deprecated.

    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.extra.mod_xmult, card.ability.extra.xmult + math.max((card.ability.extra.mod_xmult * (G.hand.config.card_limit - 8)), 1)} }
    end,
    calculate = function(self, card, context)
        if context.joker_main and context.cardarea == G.jokers then
            return {
                x_mult = card.ability.extra.xmult + math.max((card.ability.extra.mod_xmult * (G.hand.config.card_limit - 8)), 1)
            }
        end
    end
}```
daring fern
orchid bolt
#

ok thanks

#

well now it seems the localization file decided to misbehave ingame

#

it still gives 3x mult like its supposed to it just isnt displaying it properly

#

wait nvm it just straight up doesnt work with the or 0

wild escarp
#

So, I've got this calculate function, with the intent to give a value of x mult for each of one kind of joker, and a different value for each of a different joker. However, the return ends the loop, so it only happens for the first card. Now, the question being, how do I get around this, so that it triggers on every applicable joker?

calculate = function(self, card, context)
        if context.joker_main then
            for i = 1, #G.jokers.cards do
                if G.jokers.cards[i].config.center.key == "j_willatro_swooned_joker" then
                    return {
                        message_card = G.jokers.cards[i],
                        x_mult = card.ability.extra.small_xmult
                    }
                end
                    
                if G.jokers.cards[i].config.center.key == "j_willatro_black_knife" then
                    return {
                        message_card = G.jokers.cards[i],
                        x_mult = card.ability.extra.big_xmult
                    }
                end
            end
        end
    end
red flower
#

use context.other_joker

#

check baseball card

wild escarp
#

Thank you again, oh wise one!

orchid bolt
random basin
#

for quantum enhancements would a card that has both quantum lucky and regular lucky trigger differently in any way or just treated the exact same as regular lucky

lament agate
lament agate
#

to be fair i don't see any differences 😭

lament agate
dapper sun
#

how do i make a mod description uibox thingy

#

i can't figure out how to SMODS.current_mod.custom_ui

lament agate
#

hold on

dapper sun
#

i said uibox

lament agate
#

what uibox

pastel kernel
#
--how do you copy a joker's ability "again"?
    calculate = function(self, card, context)
        if context.ante_change then
            SMODS.scale_card(card, {
                ref_table = card.ability.extra,
                ref_value = "repetitions",
                scalar_value = "morerepeat",
                colour = G.C.RED
            })
        end
        local other_joker = nil
        for i = 1, #G.jokers.cards do
            if G.jokers.cards[i] == card then other_joker = G.jokers.cards[i + 1] end
        end
        for _ = 1, math.min(card.ability.immutable.max_retriggers, card.ability.extra.repetitions) do
            local ret = SMODS.blueprint_effect(card, other_joker, context)
        if ret then
            ret.colour = G.C.RED
        end
        return ret
        end
    end,```
pliant remnant
#

Heelppp help mee

dapper sun
daring fern
pastel kernel
#

return SMODS.merge_effects?

dapper sun
#

or calculate_effect

#

SMODS.calculate_effect(ret, card)

daring fern
daring fern
dapper sun
#

oh

#

i've had no trouble doing it

slim ferry
#

SMODS.calculate_effect only works for returns that are evaluated via SMODS.calculate_individual_effect

#

Which is just scoring, messages, func and dollars

#

and extra

pastel kernel
#

Everyone is telling me to use merge_effects, ill do this when I come back

daring fern
# pastel kernel Everyone is telling me to use merge_effects, ill do this when I come back
local other_joker
for k, v in pairs(G.jokers.cards) do
    if v == card then other_joker = G.jokers.cards[k+1] end
end
local effects = {}
for i=1, math.min(card.ability.immutable.max_retriggers, card.ability.extra.repetitions) do
    local effect = SMODS.blueprint_effect(card, other_joker, context)
    if effect then
        effect.colour = G.C.RED
        table.insert(effects, effect)
    end
end
return SMODS.merge_effects(effects)
pliant remnant
midnight coyote
#

how do i forcibly discard something

#
SMODS.Joker {
    key = 'repeater',
    faction = 'resonance',
    rarity = 3,
    atlas = AA.G.JokerAtlas.key,
    pos = { x = 0, y = 0 },
    config = { extra = { repetitions = 5 } },
    loc_vars = function(self, info_queue, card)
        return { vars = { card.ability.extra.repetitions, card.ability.extra.repetitions > 1 and 'times' or 'time' } }
    end,
    calculate = function(self, card, context)
        if context.repetition and context.cardarea == G.play then
            if next(context.poker_hands['High Card']) then
                return {
                    repetitions = card.ability.extra.repetitions,
                    message = localize('k_again_ex')
                }
            end
        end
        if context.after and not context.blueprint and not context.retrigger_joker then
            if next(context.poker_hands['High Card']) then
                local held_cards = {}
                for _, v in ipairs(G.hand.cards) do
                    held_cards[#held_cards + 1] = v
                end
                if #held_cards > 0 then
                    -- discard cards here
                end
            end
        end
    end
}

daring fern
midnight coyote
#

i just want to wipe the entire hand in this instance

daring fern
midnight coyote
#

oh i see what ur saying now

#

okok

#

should i attachthis to an event

#

actually

#

if it scores the high card, ill set a config flag

#

then ill check post scoring for that config flag as well as the conext

#

the context sets the flag to false again, then discards

#

its buggy rn

#

wait im tired i already did that

#

yeah ill wrap it in an event

#

and then take the discard out of the loop\

#

thats what was breaking it

wild patrol
#

Eyes are still crusted over

lament agate
#

does it look similar?

wild patrol
#

Little bit lol

#

Still looks good

#

Better than anything I could ever do

lament agate
#

i genuinely cannot tell what i need to do based on your image 😭

wild patrol
#

Like I said it's fine if you couldnt

#

Probably gonna be scraping the bootleg idea and just merge them into the twitch pack

#

Because how little jokers there are

#

Too many default jimbos

lament agate
wild patrol
#

the bootleg idea or the shader

#

really hard to explain the shader other than the few pictures I showed lol

#

guess it's one of those things you had to have experienced first hand to understand the look of it

#

maybe this is a better photo

primal robin
#

Is latest SMODS break assets loading or smth

#

Why this crashes? File 100% exist for 1x and 2x

wild patrol
#

is the png named the same thing

#

and in the assets/x1 and x2 folder?

#

looks like it can't find ur sprite sheet

primal robin
#

It works on stable SMODS but on latest it is not for some reason

wild patrol
#

i'm on the latests dev haven't had that issue

#

redownloaded it and fired it up and looks like it's working fine for me

#

1408c

wild patrol
primal robin
#

I see

dapper sun
#

hi i hate ui anyone know why the text isn't being put on separate columns?

{n = G.UIT.R,
    config = {
        align = "cl",
        padding = 0.2,
        minw = 6
    }, nodes = {
    {n = G.UIT.O, config = { object = ellecard }},
    {n = G.UIT.C, config = {align = "cl"}, nodes = {
        {n = G.UIT.T, config = {text = "A mod by this goober.", scale = .4, colour = G.C.WHITE}},
        {n = G.UIT.T, config = {text = "(and featuring her characters)", scale = .3, colour = G.C.WHITE}}
    }}
}}```
primal robin
#

@keen atlas your utils break atlases loading. You probably delay constructing atlases image and image_data, but while game already started and starting animation appears, atlases is not ready and as result it crashes

keen atlas
#

thanks for more info

primal robin
#

I added prints to see is creating smods atlases work at all and it fixed an issue

#

Looks like small desync or smth

dapper sun
#

rows

#

oh

primal robin
#

You probably mean rows, then just wrap each line on G.UIT.R

#

It will do the trick

dapper sun
#

i may be stupid then

#

lemme try smtn

primal robin
#

Game dont like when you combine different type of UI elements

#

Wrap G.UIT.O in G.UIT.C

dapper sun
#

ok

#

wouldn't it be G.UIT.R?

#

nope

primal robin
#

No, game dont like when you conbine G.UIT.R and G.UIT.C in same parent (it freaks out)

dapper sun
#

ah

#

ty it works now

#

i love balatro uiboxes they're totally not scuffed at all in the slightest

primal robin
#

I really should consider full balala UI course or smth

wild patrol
#

what would be a good condition to be met to spawn a banana

mystic river
#

1 in 6 chance with each played hand?

wild patrol
#

well thing it want to make to work with a this

#

so you don't have a dead joker if u get it and can't find a banana

#

probably gonna remove the banana command

mystic river
wild patrol
#

what about 1/4

#

wheel odds

#

never happens

primal robin
#

curious what it was

keen atlas
#

smods.atlas was called before the hook is initialized

primal robin
#

I see

keen atlas
#

its this two

    SMODS.Atlas {
        key = 'mod_tags',
        path = 'mod_tags.png',
        px = 34,
        py = 34,
    }
    SMODS.Atlas {
        key = 'achievements',
        path = 'default_achievements.png',
        px = 66,
        py = 66,
    }
lament agate
primal robin
keen atlas
#

go to save and delete futil_lovelycache

#

the cache is causing lovely to skip dumping

wild patrol
primal robin
lament agate
wild patrol
#

it's good man

#

no worries

primal robin
#

no time man

#

I have different issue

#

Holy shit I found why deck blinds in deck selection menu and fixed it

#

And you know what? it was caused by quantum enhancements

mystic river
#

quantum enhancements...

primal robin
#

Actually wtf is this patches

#

wait this is so scuffed, who made this

wild patrol
#

you think this would be a fun duo of cards

keen atlas
primal robin
#

cool

#

@wintry solar I found what cause of deck blinking on deck selection. You know what is this? Quantum enhancements Trolge
I need a bit your help with fixing of this thing because it looks so wrong and by itself should cause a LOT more issues

tepid crow
#

regular day in SMODS development land

primal robin
#

This issue is like 4 month old and no one ever tried to check out

#

I'll explain what causes it in smods discord

red flower
#

no one tried because it's a galdur-less issue for galdur-less people : )

#

i think it's not a quantum enhancements thing, it looks like it was the patch to make it so set_ability properly resizes the card

wild patrol
#

how do u add multiple sets of jokers to a booster?

fading rivet
#

any idea why this patch isn't working?

mystic river
#

you can't match mid line like that iirc

fading rivet
#

oh it has to be a full line?

#

ight

wild patrol
#

do u have to use pools for multi sets of jokers?

#
        return {
            set = "ttv_Temu_jokers", 'jokers',
            edition = "e_ttv_bootleg",
            area = G.pack_cards,
            skip_materialize = true,
            soulable = true
        }```
#

or am I capatble of doing it this way in boosters

faint yacht
#

set can be only one string per card.

wild patrol
#

possible to add multiple?

#

also I tried adding joker as a set just crashes the game

faint yacht
#

set = 'Joker'

#

And no, the t.set check only does strings.

#

However, you can use i to determine what card should use regular set or your own, being a number.

wild patrol
#

trying to add the vanilla and custom jokers into it

#

so any joker that comes from it is a bootleg edition

#

I can use pools

#

for the custom jokers

#

but need away to add the vanilla jokers

faint yacht
#

Then just use the set = 'Joker', really.

#

If you want to guarantee the first generated card to be from your own pool, then set = i == 1 and "ttv_Temu_jokers" or "Joker".

wild patrol
#

oh I can use or in the set?

#

I thought it was ,

faint yacht
#

Conditional definition.

#

set can only be a string.

#

But with that, if i == 1, then the string will be "ttv_Temu_jokers", otherwise, "Joker".

wild patrol
#

oh so like when the jokers get low starts using vanilla jokers?

#

just trying fill the pack with jokers so jimbos don't appear

fading rivet
#

where would I have to patch to get purple seals to act as gold and blue seals?
Ive gotten red seals working but not the other 2

wild patrol
faint yacht
#

All, yes.

wild patrol
#

thanks

#

works

#

main issue is i'd still like it to be random

#

not have the temu jokers always in front

#

but this works for now

wild patrol
#

just have to make a random number thing later

long sun
#

how do you change the pos of a Sprite?

sturdy compass
#

sprite:set_sprite_pos({x = num, y = num)}

long sun
#

thanks ^U^

granite jay
#

Is it possible to refresh or reroll booster packs in a shop?

lusty marten
#

in localization , there are j_ for joker ; v_ for voucher ; c_ for consumable , what is poker hand and rarity?

mystic river
#

those don't have class prefixes
(they do still use your mod prefix of course)

faint yacht
mystic river
#

oh right that's a thing
i don't think it's a class prefix per se but idk what it is. it acts like a class prefix except for the part where k doesn't stand for what it is

red flower
#

it's not k_prefix_rarity in-game

#

and the locs also have to be in two places and be lowercase so they have more quirks

faint yacht
#

-# True-

wild patrol
#

oops doesn't increase the odds text

#

might have to nerf or make the monkey joker rarer

rapid stag
#

are you using the probability vars functions for it

wild patrol
#

loc_vars = function(self, info_queue, card)

    local new_numerator, new_denominator = SMODS.get_probability_vars(card, 1, card.ability.extra.odds, 'j_ttv_monkey2') 
    return {vars = {new_numerator, new_denominator}}
end,
#

just oops and the two jokers made it to ante 5

#

you think that's balanced or broken with a 1/4 odds?

#

to basically get a free 2x mult

dapper sun
#

anyone know what the delay_sprites argument in set_ability() is?

primal robin
#

It, well, adjust how sprites behave

#

by default when you set ability visual looks changes immediately

#

But you can pass some values to adjust it

daring fern
primal robin
#

Like when Vampire eats ehnancements they're delayed

mystic river
#

vampire uses it; other cards might not want that

#

depends on when the setting ability happens, really

dapper sun
#

how do i use it to set the card's atlas pos when it's made

mystic river
#

i don't think you can use set ability for that

#

you want a different function

primal robin
#

card.children.center:set_sprite_pos()

#

or other function which sets atlas and pos, cant say which one from my head

red flower
dapper sun
lusty marten
broken rivet
#

updating to lovely 0.9.0 caused this line to break
this previously formed a full path but idk what to use now
now crashes with the error [SMODS Lemniscate "modules/shaders.lua"]:46: Could not open file C:/Users/[redacted]/AppData/Roaming/Balatro/Mods/AlexisFinishers/assets/shaders/raised_spiral.png. Does not exist.

#

@rough furnace fuck it you probably know what happened here

rough furnace
#

I'm not familiar with sandboxed mod path is that a smods thing?

#

Curious your loading a PNG from your shaders folder

broken rivet
#

and sandboxed mod path is a variable my mod stores

#

kind of a misnomer

rough furnace
#

How is it defined?

#

Also is this with the new smods or just new lovely

#

Its more likely I broke something path related in preflight than lovely broke something

#

Actually I think I normalized the path it probably would mess with a path trimmer

#

You probably should be using SMODS.NFS (or the NFS glovla pre preflight) so it works no matter what the mod dir is

#

Just change that to your mod.path and probably don't need the legal check

broken rivet
rough furnace
#

Lovely shouldn't have changed anything but preflight likely dif

broken rivet
#

ah

rough furnace
#

The method your using probably didn't work on Linux with default config, and if someone changed their mod path, and will probably break with zip loading too

broken rivet
#

ah
now i have to rewrite my entire mod's loading code i guess

rough furnace
#

Nativefs is a drop in replacement for love.filesystem

broken rivet
#

ok this would've died on linux anyway

rough furnace
#

But you probably will need to anyways to support zip loading

#

I could probably make a patch if you wanted and I had the code

broken rivet
#

good luck with that tbh

rough furnace
#

I've touched some bad code @gaunt thistle

broken rivet
#

i also have this massive thing that's supposed to load before any other mod

rough furnace
#

Oh your already using NFS

broken rivet
#

yea there at least

rough furnace
#

It would just be the sandbox stuff you worry about

broken rivet
#

also have this lovely patch

[manifest]
version = "1.0.0"
dump_lua = true
priority = -10

# Load multiple library files before other mods can load
## loadMods()
[[patches]]
[patches.pattern]
target = '=[SMODS _ "src/loader.lua"]'
pattern = '''boot_print_stage('Loading Mods')'''
position = "before"
payload = '''
-- Lemniscate: Initial Loading
-- Many items, including added classes and many tables, are forcibly loaded early for mod compatibility purposes
boot_print_stage("Lemniscate: Initial Loading")

-- find mod directory
-- gets replaced later by the path from the SMODS mod object
local info = NFS.getDirectoryItemsInfo(modsDirectory)
Lemniscate.mod_path = ""
for i, v in pairs(info) do
    if v.type == "directory" and NFS.getInfo(modsDirectory .. "/" .. v.name .. "/Lemniscate.json") then
        Lemniscate.mod_path = modsDirectory .. "/" .. v.name
        break
    end
end

-- load init.lua
local lem_init_path = Lemniscate.mod_path .. "/modules/preload/init.lua"
local lem_init, err = NFS.read(lem_init_path)
if not lem_init then error("Error reading file '/modules/preload/init.lua' for mod with ID 'Lemniscate': " .. err) end

local chunk, err = load(lem_init, '=[SMODS Lemniscate "/modules/preload/init.lua"]')
if not chunk then error("Error processing file '/modules/preload/init.lua' for mod with ID 'Lemniscate': " .. err) end

if err then
    sendErrorMessage("Lemniscate :: Failed to load /modules/preload/init.lua with error: " .. err)
else
    chunk()
    sendDebugMessage("Lemniscate :: Loaded library file /modules/preload/init.lua")
end

-- Start actual mod loading
'''
match_indent = true
rough furnace
#

Oh cool I broke that

broken rivet
#

guh

rough furnace
#

New loafer dir

broken rivet
#

oh god

rough furnace
#

Why are you manually figuring out your path?

#

It should exist at that point I think?

broken rivet
#

because i'm dumb and decided to reference talisman's code

rough furnace
#

Do you work without smods?

broken rivet
#

no

#

i'm already realizing doing that was a bad idea

#

since i can just get the path from SMODS.Mods.lemniscate

rough furnace
#

Also I think SMODS.load_file also exists at that point

broken rivet
#

good to know

wintry solar
#

what do you load before other mods?

broken rivet
primal robin
broken rivet
rough furnace
#

It probably would be simplest to just put your code that loads sooner in a alua file, add a lovely module then add a a patch that requires your module

primal robin
#

You basically assuming that folder called Mods

#

Which is not always the case

rough furnace
#

Your also assuming it's in a folder called balatro which isn't even the case in every default case

broken rivet
#

yea

primal robin
#

So what you're trying to do

broken rivet
#

now Lemniscate.mod_path is just defined as SMODS.Mods.Lemniscate.path in the init patch i posted

broken rivet
primal robin
#

nvm I see

#

fyk you can get your sandboxed path properly by removing part returned by require("lovely").mod_dir

#

it returns mods folder

broken rivet
#

ah

rough furnace
#

Its not guaranteed to be correct

#

The mods folder isn't always in the sandbox

primal robin
#

well I hope jonh lovely is smart guy and it works

#

I'm pretty sure he's smart so

broken rivet
#

tbh i wouldn't be unwilling to rewrite the loader code again
the ui code is staying messy though

rough furnace
#

Also if your zip loaded your sandbox path is some weird shit like __SMODS_MOUNT__/mod.zip (possibly with a folder in it)

broken rivet
#

yea

primal robin
#

That's how I load mod at all, very hacky probably

rough furnace
#

If a zip has a folder both smods and lovely habdlr it correctly but it will be a folder deeper in the internal smods mount

#

Smods provides NFS and the mod.path will always work with it. BTW the NFS global isn't Recommended for newer smods you should use SMODS.NFS (local NFS = SMODS.NFS of NFS for compatibility

primal robin
#

I can do that

broken rivet
#

i can just use smods nfs

primal robin
#

I cant afford this luxury

rough furnace
#

Just do a me and don't ever load anything myself

#

Lovely csn do all the hard work

primal robin
#

I was loading all filed via modules before but I decided to enough

red flower
#

debugplus localization when

rough furnace
#

I suspect the next lovely build might provide some sort of fs api, if anything to help mods that are zip loaded

red flower
#

nice

primal robin
#

Well 2.0 release is a good pivot to check out zip mods loading at all

#

cant say I'm super in it but generally a good direction for modding

#

Maybe kinda late but definitely good

rough furnace
#

Unfortunately if you don't have smods you habe to manually find your zip file and then mount it to access the contents

primal robin
#

eh?

granite jay
#

Can you reroll booster packs in shop?

#

Through a joker?

red flower
#

there's no api for it but you can

broken rivet
#

is it even possible to patch into files in preflight

errant arrow
#

hi. im gonna be annoying and ask a question i asked a few days ago... im still confused on it.

how do i detect when a specific joker (ex: jolly joker) is in your possession?

slim ferry
#

next(SMODS.find_card("j_jolly"))

#

or some other card key

granite jay
slim ferry
red flower
granite jay
#

Along with getting the boosters themselves to spawn?
Sorry for all the questions but yeah- oh thanks

errant arrow
#

what's the smods wiki page for ipairs?

slim ferry
#

none

#

thats a lua feature

errant arrow
#

ah.

slim ferry
#

so check the lua docs i guess

primal robin
errant arrow
#

that explains why im struggling so much

red flower
slim ferry
#

it just iterates over every integer index of a table, starting at 1 and ending before the first nil value

red flower
#

lau docs are ass tho

#

lua

rough furnace
tepid crow
red flower
#

i managed to do it in jokerdisplay with negative knowledge of how lovely works

rough furnace
primal robin
#

I already have lovely hack mod dir

granite jay
primal robin
#

Basically a way how I load mod

red flower
#

utils

primal robin
#

I'll take into account this nuances, thanks

broken rivet
#

new smods murdered my mod i guess
unless i want to split it in two just to load the classes separately

#

incredibly annoying honestly

primal robin
#

what's the problem load files in order

#

I do this for all files I needed

broken rivet
primal robin
#

How much early you need

#

Before other mods?

broken rivet
#

yes

primal robin
#

Definitely possible

rough furnace
#

You can still patch the loader its just a new path

broken rivet
#

somehow i haven't been able to patch it but i'll try

primal robin
#

Basically I load my mod before other SMODS ones (sometimes it's a problem), probably that's type of behavious you're looking for right

rough furnace
#

Its something like =[lovely SMODS.preflight.loader "src/preflight/loader.lua"]

broken rivet
#

been using '=[SMODS _ "src/preflight/loader.lua"]'

#

oh

primal robin
#

Or this, whatever

#

what an insane technology we have nowadays that's crazy

rough furnace
#

DebugPlus just patches into the main file to load sooner than other mods

primal robin
#

Makes sense because you intented to load asap

rough furnace
#

Yeah but you could patch the end of it before SMODS core

granite jay
primal robin
#

anyway, I need to implement + test zip loading & make new release

red flower
#

Oops! The game crash

slim ferry
#

this game fault down the stairs

broken rivet
#

the patch did get in though

#

the game just died completely

primal robin
#

I dont like that NFS.mount still relies on love2d implementation which uses relative paths

#

So I need to get relative path

broken rivet
#

guhhhhh

#

aaaaaaaaaaaaaa

rough furnace
#

You did not pass a path to load_file

#

I didn't realize load file was in the loader

broken rivet
#

yea i know

rough furnace
granite jay
broken rivet
red flower
granite jay
#

It's just extra boosters which I'm guessing modifies the limit

rough furnace
#

I hope to fix that in the crags handler rewrite

red flower
granite jay
broken rivet
#

think i fixed my mod

#

it loads fine now

broken rivet
rough furnace
#

Yeaj

broken rivet
#

alrighty

broken rivet
rough furnace
#

Sure

primal robin
#

I hate .mount because there's no way to tell which folder was as input and which as output

#

it doesnt work and I cant say why because literally no info

#

oh yea, I forgot that nativefs ignores what mount does

broken rivet
primal robin
#

Peak files loading

broken rivet
#

is Handy.NFS just SMODS.NFS or NFS

primal robin
#

lovely mod

rough furnace
rapid stag
#

did the steamodded thread stop existing?

rough furnace
#

You might though

broken rivet
rough furnace
#

Yeah discord doesnt allow you to send me a DM if I could respond to ot

broken rivet
#

damn

red flower
broken rivet
#

guh

red flower
broken rivet
#

at mods

red flower
hardy vessel
#

Question aboutSMODS.calculate_effect. Is there a way to make the message appear at the top of a card instead of the bottom?

red flower
wintry solar
#

I think it's actually based on screen position iirc

red flower
primal robin
#

dang, loading from zip a bit trickier than I expect. This mount is stinky

#

without archive my setup with mounting works, with archive dont

#

oh nvm

#

Oh come on

rough furnace
#

it's using the zip dir path

fading rivet
hardy vessel
# red flower

okay I see. i'm working on an effect that can target some cards being drawn before they arrive into your hand, and i wasn't liking the text being at the bottom

probably have to hook the deck as a location with a specific placement, if i'm right about that

primal robin
#

I mean I dont care how SMODS loads own stuff

#

My stuff loaded properly

#

Why SMODS fail

red flower
red flower
primal robin
#

If this such a headache I can load mod icon image manually, no problem

hardy vessel
rough furnace
#

smods isn't using the right path for zip loaidng

primal robin
#

All I do is

#

Oh I see what you're mean. I mounting archive to temp dir where I can load stuff

#

Random bullshit go

rough furnace
#

in that file can your print SMODS.current_mod.path and SMODS.current_mod.load_type

wintry solar
rapid stag
rough furnace
#

I found it by searchng for steamo

#

something in N's discord probaly broke or weird discord issue

red flower
#

just not aure in modding

rough furnace
red flower
#

now i can lol

rough furnace
#

oh minor spelling mistake

red flower
#

ah yeah

primal robin
red flower
#

weird because i clicked on the name but i might have backspaced

little fractal
#

in other mods, (at least in the yahimod) i see the function message = "" (which makes a joker have a custom string under it) but when i use it, it crashes my game, how do they do it?

red flower
#

code?

#

it should work by default

little fractal
# red flower code?
calculate = function(self, card, context)
        if context.joker_main then
            ...
            message = "AHHHHHHH"
fading rivet
#

oh

red flower
#
calculate = function(self, card, context)
        if context.joker_main then
            ...
            return { message = "AHHHHHHH" }
fading rivet
#
return {
    card = card,
    message = "AHHHHHHHH"
}
end
red flower
#

you dont need card

little fractal
#

ohhh

fading rivet
red flower
#

if you want to change the card use message_card instead

fading rivet
#

do you only need card if it modifies a scoring value?

red flower
#

you never need it

primal robin
#

That's wild. When it loaded from zip it doesnt appear in mods list anymore but still works

#

And crash logs are scuffed

#

I guess I need leave zip shenanigans for next day, too much stuff is happening here

fading rivet
red flower
#

it's used internally, i think it used to be set manually but now smods does it automatically

fading rivet
#

ah

mystic river
#

i think it might have been needed as a result of thunk's "put everything in one big calculate" methodology

primal robin
#

@rough furnace now game starts and mod fully works etc etcm but SMODS doesnt know about existence of my mod anymore

#

All I did is mounted archive content to other folder, that's it

rough furnace
#

can i see logs?

primal robin
#

I'm checking on latest release

rough furnace
#

zip mods don't work on latest rleease

primal robin
#

hm, I'll check latest then

red flower
primal robin
#

I dont liek the fact that I need specific smods version for this to work

rough furnace
#

smods needed changes and there hasn't been a release since they were made

hardy vessel
red flower
primal robin
#

On latest SMODS again filed cannot load, I guess they're extracted to somewhere else or executed from different place right

rough furnace
#

yeah the zip is mounted and then theres a special hack to nfs to allow it to be used like a normal dir

primal robin
#

oh my god that's such a headache

#

I need more time and pation to make it work probably

#

Not today for sure

rough furnace
#

I can take a look later if you want

#

if you were relying on a patch to loader that would have broke

primal robin
#

I cant say for sure what is wrong anymore

rough furnace
#

sned crash

#

I wrote smod's zip loader so I know how it should work

hardy vessel
little fractal
#

how do I get a joker to play a sound at the same time a message occurs instead of when the hand is played?

#

SORRY FOR ASKING SO MUCH

sturdy compass
#

You beat me

red flower
sturdy compass
dapper sun
#

yea u just put a sound in the return table

#

this channel is for asking questions

umbral zodiac
sturdy compass
#

The more questions you ask, the more you learn, the better you are at making mods

little fractal
#

thank you guys 🥹

sturdy compass
primal robin
rough furnace
#

maybe it's useful to me but explanation probably helps too

little fractal
primal robin
#

That's case for folder, all works as intented, mod and SMODS is happy

primal robin
#

In case of folder all files is found and all fine. In case of .zip it cannot find files so crash

rough furnace
#

you're method can't find files or smods can't?

little fractal
# red flower may i see the code
calculate = function(self, card, context)
        if context.joker_main then
            return {
                play_sound("moneyprinter_scream"),
                message = "scream.mp3", 
}

swapping did nothing, obviously its not ACTUALLY an mp3 just no one knows what an OGG is

primal robin
red flower
primal robin
#

i.e. love.filesystem.read("/Mods/HandyBalatro_39874283/src/...") is retuning nil

#

While same thing as folder return file as intented

dapper sun
#

how do i get whether a given mod's over a certain version?

rough furnace
#

print love.filesystem.getDirectoryItems("Mods/HandyBalatro_XXXX"

dapper sun
#

in my mod i'm using love.graphics.newImage( love.image.newImageData(NFS.newFileData( SMODS.current_mod.path .. "assets/palettes/"..v.path) ) )

little fractal
rough furnace
#

when does your code run?

primal robin
rough furnace
#

so that would be after smods loads mods then?

primal robin
#

yes

#

Or rather SMODS itself will be

#

But mods dont

primal robin
dapper sun
#

?

primal robin
#
V("2.0.0") > V("1.5.1")
dapper sun
#

i see

#

ty

primal robin
#

np

rough furnace
#

it looks like it only wants to mount it once

#

not sure why

primal robin
#

So this means SMODS already mounter this archive and second mount just does nothing

rough furnace
#

seems like it

primal robin
#

Interesting

#

Is place where first mount is placed determined?

#

If so I can use it

rough furnace
#

It will be at __SMODS_MOUNTS__/File.zip (possibly nested)

#

you can also just use SMODS.NFS on the mod.path

#

so you cna SMODS.NFS.getDirectoryItems(SMODS.Mods.Handy.path) (or whatever you id is)

#

even while zip loaded

#

I'll see if the only mount once is a nativefs thing and if so, if I can fix it

primal robin
#

I'll try

#

sorry for wasting time

rough furnace
#

Not something in my control

#

good to know though

primal robin
#

If I unmount it SMODS will explode right

rough furnace
#

only if it needs to access your files

#

probably

#

I could probably expose the path on the mod object

primal robin
#

okay other question, is check local use_native_fs = (SMODS and SMODS.NFS) or not SMODS and true or false valid

rough furnace
#

I think so

#

remeber the path that works with smods is not the one lovely provides

#

I probably would just check if the mod object exists in smods and if not smods doesn't supoort zip loading

#

but if smods is present you should be able to use (SMODS.NFS or NFS) to access your files using mod.path

primal robin
#

That's not enough because I need check is current version of SMODS supports it in a firt place

rough furnace
#

if it doesn't support it there won't be a mod object for your mod

primal robin
#

In this case game will crash trying to log my mod

rough furnace
#

it should jsut fallback to the vanilla case shouldn't it?

#

like DebugPlus

primal robin
#

One minute

rough furnace
#

I guess it depends how you handle it

primal robin
#

In case of release SMODS this happens

#

it tries to call SMODS.log_crash_info and it tried to index my mod as SMODS oe, but it doent exist and explode

rough furnace
#

oh you're using the SMODS api someow?

primal robin
#

no

#

one sec

#

It explodes here

fading rivet
#

Is there a generator for legendary joker back textures?

rough furnace
#

the assert helper should't crash not sure who made that i'll see what I can do later

primal robin
#

you can see that source = SMODS

#

but mod is not loaded into smods at all

#

It is not present in list

rough furnace
#

that should be handled better because anyone can set those to any arbitry string

primal robin
#

I'll give up for now. I spend 2+ hours messing aroud with it

#

At least it was fun

#

I can make separate branch so you can test it on my mod

gaunt thistle
primal robin
#

We trying to implement loading from archive without smods

rough furnace
primal robin
#

mount function sucks so much so far

rough furnace
#

ethan you should invent a new filesystem for balatro modding

red flower
#

you should invent a new os for balatro modding

primal robin
#

just invent, doent matter what exactly

frosty rampart
primal robin
#

All this is optional so if you dont want that's okay, I can live with folders for a while

#

Thanks

fading rivet
#

Where is the code for calculating glass cards at?

red flower
fading rivet
#

thx

red flower
#

you should take ownership for this one

fading rivet
#

patching time

fading rivet
red flower
#

you will see an example there because thats what smods does

fading rivet
#

amazing

#

oh okay looking at this i just need to change a number into a table lookup

#

would it be better to patch it for that?

lament agate
#

how do i detect player losses

fading rivet
grizzled tide
#

is there a way to change the sprite of the current joker

frosty rampart
#

card.children.center:set_sprite_pos({ x = #, y = # }) will change the sprite position of card to whatever you want (on the atlas that it was initialized on)

daring fern
#

rapid stag
#

is there a function that's called on the joker when it's created in the shop?

frosty rampart
rapid stag
#

so i think context.create_shop_card would be best

frosty rampart
#

nope

fading rivet
#

I had the same issue

frosty rampart
#

for that, you should actually handle it with the set_sprites function in the joker

fading rivet
#

with melt ice cream

rapid stag
red flower
#

set sprites is just a function thats called when the sprites are set

fading rivet
#
set_sprites = function(self, card, front)
        if card.ability and card.ability.immutable and  card.ability.immutable.atlas_index <= 3 then
            card.children.center.atlas = G.ASSET_ATLAS["foo_FooJokers" .. card.ability.immutable.atlas_order[card.ability.immutable.atlas_index][card.ability.immutable.atlas_type or 1]]
            card.children.center:set_sprite_pos({x = 0, y = 0})
        end
    end
#

ignore the atlas assignment I was doing a stupid

terse merlin
#

chat how do i recalc_debuff in mod.calculate?

daring fern
terse merlin
#

ive been informed i should use SMODS.current_mod.set_debuff instead

granite apex
#

errr I'm trying to understand how shortcut works so I can make a similar hook, but all I'm finding digging through the code is the hook itself which returns true and calls it a day. Where should I be looking to find what I'm looking for, here?

red flower
granite apex
#

ok so I should probably create a hook on get_straight and change my function there

#

that tracks

red flower
#

idk what youre trying to do so i cant confirm

granite apex
#

Trying to allow a single gap in straights indicated by a king, so like, 1-2-K-6-7 that's a straight

#

Its definitely a straight check

red flower
#

then yeah probably

granite jay
#

I removed a patch done from a .toml file but it still shows up here, anyone know what's up?

red flower
#

im assuming you closed the file and ran the game again

granite jay
#

It updated when I booted up the game again

#

meaning that something's putting the patch in still

#

I tried removing that patch in the dump but it didn't work

red flower
#

yeah that wont do anything

granite jay
#

Where do I go to get rid of the patch?

red flower
#

the toml file

granite jay
#

I already got rid of it from my mod

red flower
#

then you either didnt save or there's a second copy or something

granite jay
#

Uhhhh nvm it works now

#

god dammit tickini...

#

Anyone know a better way to implement this?

dapper sun
#

how do i run the round win check?

#

wait i think i found it

#

nvmd

#

bc i'm testing something that increases the score outside of the scoring loop

#

nvmd i found it i think

#

fr ithis time lol

#

(i just do the comparison myself and then end_round())

#

needed to do a bit more but i just referenced the dp code

jagged compass
#

was trying to follow the steammodded guide and got this warning on the cmd line

wintry solar
#

Oh god we should remove that from the guide

jagged compass
#

wait what?

jagged compass
wintry solar
#

Download the latest release

#

Or if you are desperate to use git you need to target the stable branch

jagged compass
#

i dont really want to use git

#

it just confuses me more

wild patrol
#

download zip

#

the put smod-main folder in %appdata%/roaming/balatro/mods

jagged compass
primal robin
#

2 smods

dapper sun
#

delete the old smods

jagged compass
#

ok

#

it had come with the polterworx modpack

#

so when i create a new mod should i keep it in the balatro mods folder from the start?

sturdy compass
#

Yes

jagged compass
sturdy compass
#

Most undefined variables you can ignore

jagged compass
#

what about duplicate fields? this type also appears abunch

sturdy compass
#

You can also ignore that

#

Honestly not too sure why you’re digging thru Cartomancer either but go off

jagged compass
#

oh i just picked a random mod since all of them were giving out warnings

#

cartomance was just the one i opened first

sturdy compass
#

Yeah you don’t really need to check for that lol

#

Shouldn’t in reality

jagged compass
#

it just kinda did it automatically

#

after i installed the Lua extension. if there's a way to disable it i'll do it

sturdy compass
#

I mean yes it will show you the errors but it won’t do anything. Just ignore anything that’s not in your own project folder

jagged compass
#

noooo, the tutorial is telling me to learn git

#

i hate git

hushed field
#

If you just want to use git for purposes of managing a mod, rather than get into the deeper features, github desktop is a great tool. For the baseline features, it's a lot more accessible

jagged compass
#

i actually installed that to try and use it with some school project, but it never worked so i gave up on trying to use it

#

so github seems to hate me just as much

sturdy compass
jagged compass
#

ok, commiting directly from vscode seems to work, and the repository appears on my github account

#

but im still really confused on what github desktop is supposed to do

#

im just seem to be stuck on a repository that a friend made for an old project. but i never personally controlled that repository so i dont know what to do

red flower
#

if vscode works i would just stick to that i think it's easy enough

jagged compass
#

yeah it reminds me of how intelij works. only other time i managed to work with github was following a minecraft modding tutorial

next timber
#

yeah i use the github vscode stuff for my repo management mostly

jagged compass
#

wasnt there an unlock everyhting option somewhere? would be useful for testing

red flower
#

yes, the profile menu

jagged compass
#

i thought so too but i dont see any relevant option

red flower
jagged compass
#

i mean, i've added more mods since i've used it so maybe that's why

red flower
#

yeah if you used it once then it doesnt reset, thats why that mod exists

jagged compass
#

does anywhere on the vanilaremade wiki explain these format strings?
"{V:1}#1#{} difficulty"

red flower
#

it's in the smods wiki

jagged compass
#

where can i find the vanilla atlas definitions? i think theyre somewhere in the lovely folder but idk which file

red flower
#

theyre not defined like smods

#

theyre in function Game:set_render_settings() in game.lua

jagged compass
#

well then nvm. i kinda got what i was looking for by just looking at the textures directly

#

i guess i wanted an example of the same mod having its own atlas definition and using it

red flower
white hull
#

Besties why isn't my achievement getting achieved

EDIT: because i was on an unlocked profile and didn't add bypass_all_unlocked = true to the achievement defintion

#

The check_for_unlock is getting reached if I put a debug print there

jagged compass
#

so i changed some visual things, but something broke the mult functionality of the example. besides the mult value, i didnt touch the calculate function. i even compared it to the example from the wiki again. Am i missing something?

red flower
#

you wrote multmmm

#

im guessing you tried to restart the game

jagged compass
#

oops

#

so for loc_vars is the name between the ## an index for that variable?

red flower
#

yes

fading rivet
jagged compass
#

how do you do new lines?

#

\n didnt work

fading rivet
#

text = {line one, line two, line three}

jagged compass
#

oh i see

#

i was looking at the vanilla remade examples and noticed different joker triggering conditions were given differnt ability variable names. suit jokers were s_mult and hand jokers were t_mult. is this important or is it just for better readibility?

red flower
#

i just copied vanilla names, theyre not important

dapper sun
#

if they're joker specific then the names matter however much you want them to

#

(which usually isn't at all)

grizzled tide
#

hi! am i misunderstanding juice_card_until or is that not how you pass extra variables

#

(the issue is it does not juice even though flaming is true

grizzled tide
#

i

#

i am so dumb man

#

thank you 😭

sturdy compass
#

We all have those moments lmao

red flower
#

i mean it does say until when it's while

tepid crow
white hull
#

Alright how can I get if an achievement is earned?

#

Okay, why don't earned achievements reset when the profile is reset?

#

Grrrr

mystic river
#

that's also vanilla behavior i believe
achievements are stored in the device

white hull
#

So how do I debug them........

white hull
#

Okay it's in settings.jkr...

mystic river
white hull
#

Good to know, thanks

grizzled tide
#

for some reason, i get an error that extra is a nil value (extra.flaming exists)

frosty rampart
#
  1. you should be doing this in set_sprites
  2. the same issue will happen in set_sprites, you need to put it in an event because the function runs before the ability table is set up on the card
grizzled tide
#

ah gotcha

#

thanks

#

where should i put this then

winter flower
quick scarab
#

I have a problem where for some reason I can't modify my card to score with an specify seal if you have a joker

#

everytime it crashes

#
SMODS.Joker {
    key = 'r_wolf',
    atlas = 'Joker',
    pos = { x = 5, y = 4 },
    rarity = 3,
    cost = 5,
    blueprint_compat = false,
    eternal_compat = true,
    config = { extra = { seal = 'fnaf_vip' } },
    loc_vars = function(self, info_queue, card)
        info_queue[#"Info"_queue + 1] = {key = "fnaf_sprite_WIP", set = "Other"}
        info_queue[#"Info"_queue + 1] = {key = "fnaf_code_WIP", set = "Other"}
        info_queue[#"Info"_queue + 1] = G.P_SEALS[card.ability.extra.seal]
    end,
    calculate = function(self, card, context)
        if context.modify_scoring_hand and context.other_card.seal == card.ability.extra.seal then
            return {
                add_to_hand = true
            }
        end
    end
}```
#
SMODS.Seal {
    key = 'vip',
    atlas = 'Enhancers',
    pos = { x = 5, y = 0 },
    badge_colour = G.C.GREEN,
    always_scores = false,
    loc_vars = function(self, info_queue, card)
        info_queue[#info_queue + 1] = {key = "fnaf_sprite_WIP", set = "Other"}
    end,
}
daring fern
quick scarab
dapper sun
#

does anyone know why my hook makes enhancements retrigger?

local get_enchs_hook = SMODS.get_enhancements
function SMODS.get_enhancements(card)
    local list = get_enchs_hook(card)
    if #SMODS.find_card("j_elle_drago")>0 then list.m_wild = nil end
    return list
end```
#

even if i make it function SMODS.get_enhancements(card) return get_enchs_hook(card) end it still does it twice

#

but if i comment the hook out then it's fixed

mystic river
#

did you accidentally do the hook twice?

dapper sun
#

ohhh

#

can you only have 1 of each hook?

#

it's also worth mentioning

#

the retrigger that happens has extra_enhancement = true in the context table

daring fern
dapper sun
#

ahhh

#

ty

dapper sun
mystic river
#

but forgetting a parameter would definitely do that :p

dusk sonnet
#

do i put my code in main.lua?

#

im dumb and idk how to do this

daring fern
dusk sonnet
#

ok!

#

thanks

#

i did the coding but it isn't in the game, did i miss smth?

red flower
#

how does it look like

dusk sonnet
#

im prolly missing smth

#

like probably a lot

red flower
#

what about the json

dusk sonnet
#

-# FUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU-

#

would you believe me if i said i forgot the json

red flower
#

yes

dusk sonnet
#

ok good because i did

#

what do i do with the json

#

how do i make a json and what do i do with it

dusk sonnet
#

thank

#

do i code the json file in visual studio as well?

thick drift
#

guys, I might have messed up big time. I wanted to refactor G.jokers into G.consumables inside a single function and it somehow propagated into every single mention of G.jokers across all files, including the lovely and SMODS. I hope I don't have to redownload everything

red flower
dusk sonnet
#

oh ok

red flower
dusk sonnet
#

is this right..?

#

for my json file

#

im trying

tepid crow
#

You can't have quotes within quotes

dusk sonnet
#

oh

#

anything else?

#

cause it didn't even load

#

wait

#

can i do these 'blablabla'

#

instead of "blablabla">

tepid crow
#

I don't think you can use single quotes for a JSON string(?), but you can escape them \ or use single quotes within in the string (so "text 'quote' more")

dusk sonnet
#

ok

#

eh i dont need the quotes anyways

#

anyway

#

anything else i messed up?

tepid crow
#

idk, nothing else that stood out as much as those quotes did

dusk sonnet
#

ok

#

round 2!

#

ok it's in the game!!!

#

but it can't find the file

#

i think i should change the name from "main.lua" 😭

#

should i change it to "phighting.lua" or smth?

frosty rampart
#

the main_file in the json specifies which file it will load
just make sure it matches with the actual filename of where your code is

little fractal
#

how do i grab a random list of like 1-3 (or just any amount) of jokers the player has and remove them?

little fractal
#

thanks

dusk sonnet
#

what have i done wrong now

#

it says "Failed to collect file data for Atlas phight_joker"

slim ferry
#

the file path not correct

little fractal
dusk sonnet
#

im buns at this dude

#

im eyeballing and praying

#

i have 0 experience

slim ferry
#

it will look for assets/1x/sword

dusk sonnet
#

which it is under

slim ferry
#

file extension

little fractal
#

do you have a 2x as well?

slim ferry
#

png, probably

dusk sonnet
slim ferry
#

sword.png

dusk sonnet
#

the file is literally called "sword"

slim ferry
#

show

dusk sonnet
stoic void
#

No

#

You need the file type

slim ferry
#

in file explorer

#

click display or whatever its called

dusk sonnet
#

oh ok

slim ferry
#

turn on whatever this is called in english file explorer

little fractal
dusk sonnet
#

it's a png file

slim ferry
#

and itll show the full name

little fractal
stoic void
dusk sonnet
#

i changed it

stoic void
#

It should work

dusk sonnet
#

nope.

#

it did not in fact work

little fractal
#

oh wait

#

you already did

dusk sonnet
#

it is

#

yeah

#

do i change the file name to sword.png too?

#

like the file on my pc

stoic void
#

It needs a position

#

I think it does

little fractal
#

sorry im not much help i literally started modding like 2 days ago 😭

dusk sonnet
#

i've never done this before so it's fine lol

dusk sonnet
slim ferry
stoic void
#

Ah

slim ferry
#

plus pos has a default value

stoic void
dusk sonnet
#

yep.

stoic void
#

Hmmm

dusk sonnet
#

ignore the last one

#

that was a misclick

#

i sent the same image twice

slim ferry
#

turn on file extensions............

#

please,,,,

dusk sonnet
#

ok

#

how

#

im stupid

dusk sonnet
#

ok

#

found it

#

it's on

slim ferry
#

the files do say sword.png right

dusk sonnet
#

hold on i may have fixed it

dusk sonnet
#

LET'S PHREAKING GOOOOOOOOOO