#💻・modding-dev

1 messages · Page 82 of 1

crisp coral
#

so i haven't been keeping up with smods changes, were there any that makes created cards not use Card:set_sprites?

#
function Card.set_sprites(self, _center, _front)
    set_spritesref(self, _center, _front)

    if next(SMODS.find_card("j_lobc_youre_bald")) and (self.ability and not self.ability.lobc_censored) then
        if _center then print("has center") end
    end
end

the center print line isn't being called when a card is created

opal spade
#

set sprites is a part of set ability and it happens before any of set ability unless it's a playing card

opal spade
crisp coral
#

thing is, this worked before

#

exact same code

opal spade
#

the way i bypass this issue is by calling set sprites within my set ability so the sprite is set correctly even on creation

#

but idk if that'd work for this

crisp coral
#

oh wait-

#

fuck that was the issue

#

before it was just if next(SMODS.find_card("j_lobc_youre_bald")) then

#

okay thank you!!!

royal seal
#

Yeah I think that should work?

brisk rose
#

yeah, I downloaded mono, and figured out the parent .cs was Program.cs, but got this error:
```"Program.cs(5,22): error CS0234: The type or namespace name Forms' does not exist in the namespace System.Windows'. Are you missing `System.Windows.Forms' assembly reference?"

Seems to be a thing that can't be directly fixed on linux. Ofc Wine being Wine. I'm sure there's still a way, just not savvy enough personally
tepid crow
#

iirc there are other tools for generating code for steamodded api jokers btw

brisk rose
tepid crow
#

those were the 2 I could find quickly at least

brisk rose
#

yeah the second one seems to be more at parity with Steak's

#

wonder why there doesn't seem to be a thread here?

tepid crow
#

there is

brisk rose
#

ah must've missed it

#

my b

wintry solar
#

it also encourages localization files which gets a big 👍 from me

brisk rose
#

not because it's better but because I'm lazy and like the aesthetics, lol

royal seal
#

Nice, that balaui one looks sick

#

Still not a waste though, because I like having a personal tool for my own use

brisk rose
# brisk rose loc_txt ride til I die :P

seriously though, not even having an option for loc_txt (that I can see) on balaui blows. It's not that I don't want my mod to be translatable, I just... really really prefer the object to just... have everything

#

Especially because I'll be making jokers that are identical for multiple suits, flounders-mod style

#

(suits will have their uncommons/rares (snow's mods style coins and fusion-jokers style 'heros') made for them, but also ported to every other suit)

crisp coral
#

it's not too difficult to add loc_txt tbf

brisk rose
#

wait, why isn't en-us on the locale list?

#

I guess it's just 'default'

brisk rose
#

and just edit that object for the duplicate jokers

frosty dock
frosty dock
#

you may want the english version to be one thing, but another thing to be filled in for unsupported languages

brisk rose
frosty dock
#

though I'd say that's rarely the case

brisk rose
#

wait nvm

#

gladur vers

#

still applies kinda

#

non-existing major versions shouldn't be listed as incompat

tepid crow
#

unless that's indicating invalid json? 🤔

frosty dock
#

json doesn't always support comments ig

frosty dock
#

also i might include a minimal example for copying

tepid crow
crisp coral
#

To use more advanced typesetting, specify your description as a localization entry at G.localization.descriptions.Mod[id]
so does this support {C:color} and line breaks

crisp coral
#

sweet

frosty dock
tepid crow
#

oh yeah that does help a lot

#

thanks

crisp coral
#

crashes when hovering a joker with the new system

#
{
    "id": "LobotomyCorp",
    "name": "Lobotomy Corporation",
    "author": ["Mysthaps"],
    "description": "",
    "prefix": "lobc",
    "main_file": "LobotomyCorp.lua",
    "badge_colour": "FC3A3A",
    "display_name": "L Corp.",
    "version": "0.9.0-pre2",
    "dependencies": [
        {
            "id": "Steamodded",
            "min_version": "1.0.0~ALPHA-0909a"
        }
    ],
    "carmen_says": "You should distort yourself... NOW!"
}
#

is it fucking up because of my custom generate_ui.....

frosty dock
#

i don't see how that's related?

crisp coral
#

shrug

frosty dock
#

I think I see why will fix later

tepid crow
opal spade
frosty dock
frosty dock
tepid crow
#

yeah that'll also work

#

probably more readable with markup too

rough furnace
#

So I can use config.lua

#

Provided should also have a version in it (and I should be able to provide multiple versions of a provided package)

#

(Specicizklly I would like to be able to provide DebugPlus api things people can depend on and I could support multiple versions but one version is never guaranteed to be compatible with another)

#

Although this would need some kind of optimal dependency thing to be greatly utilized

#

Also the metadata for mod icon so it may be show for disabled mods

#

Also what happens when a mod has both a header and metadata file

#

Also what happens when multiple json files in a folder

#

Also does nested still work (and how so kf it does)

edgy reef
#

About nested, json metadata is checked for the same say as legacy header

#

At least from when I last looked

rough furnace
#

TBH I think I would prefer a constant name for the json file and also not spport nesting/multiple mods per folder but I know this will break some mods that already exist

#

Specifically for the mod index having multiple mods in a downlaod would make it way more complicated

#

Also since we're discussing changing metadata stuff can we please define I'd restructions

#

Sepcifixlalt I want to make it possible to have internal smods IDs able to not be used by eztenrla mods (such as the mods used to represent lovely mods)

tepid crow
# rough furnace Also what happens when a mod has both a header and metadata file

Page says

Using the legacy file header system is still supported, though switching to metadata files is encouraged. ... If you are transitioning away from using this method, make sure to remove the header to prevent Steamodded from trying to load your mod twice.

A possible hacky solution would be creating a second file with only the steamodded headers and a conflict header for steamodded version < current? 🤔

#

though it'd be better if steamodded just... didn't load the mod twice

tepid crow
rough furnace
tepid crow
#

OH

#

my bad

#

disregard then

rough furnace
#

Like this grey icon doesn't do much

#

and sometimes finding a mod by icon is easier

tepid crow
#

yeah I getcha

#

(though a gray filter on the mod icon might still be nice? 🤔)

rough furnace
tepid crow
#

oh it's an absolutely horrendous approach

rough furnace
edgy reef
# crisp coral

I'm getting the feeling that not everything being loaded by json is parsed.

#

Got the same error from D6 Jokers when adding display_text into the json metadata

tepid crow
edgy reef
#

Trying to debug this resulted in a print error that's saying that self.config.colour is a string.

#

Just so happens that legacy converts string to HEX and json doesn't.

#

ok the string error thing is unrelated lmfao

#

damnit

frosty dock
edgy reef
#

oh it got found?

#

Nice

frosty dock
edgy reef
#

Ok the engine/ui crash is definitely related to json loading

#

Specifically with mod badges

#

So for now omit display_name

rough furnace
#

thank you

#

(also can it support no default config as an option)

frosty dock
frosty dock
rough furnace
#

ok good enough for me

#

That means I can remove this soon

edgy reef
#

It is basically the same SMODS.Atlas code for all mods anyways, the only "new" thing is the path to the icon

tepid crow
#

the resolution differs sometimes, no?

rough furnace
#

Does it actually check

#

I think I mseed up the specified resolution one time but I had the real resolution and I don't think it actually effected it

tepid crow
#

oh, seriously?

rough furnace
#

It was off by one pixel so I might have just not noticed it

#

or maybe 2

#

oh also metadata mod icon means the index can get the mod icon

#

BTW steamodded does not do this

tepid crow
rough furnace
#

our system is more like debian versioning lite

tepid crow
frosty dock
rough furnace
#

I'm not sure how balatro's atlas thing works but it moght be worth seeing if we can just look at the image resolution as most are just one sprite anyways (the only one I've seen with multiple is the Steamodded one)

frosty dock
#

it's not semver

rough furnace
#

I could document the versioning protocal

#

I'll have to go through and make sure I understand everything

frosty dock
#

<major>.<minor>.<patch><rest> is pretty much all. it's considered less than <major>.<minor>.<patch> when rest starts with ~

#

and patch is optional

rough furnace
#

I think it technically supports just like a version like 1

#

I'd have to double check

frosty dock
#

it doesn't, at least with the current pattern

#

that being this lua pattern ^(%d-)%.(%d+)%.?(%d*)(.*)$

rough furnace
#

oh we have a pattern

#

good to know

frosty dock
#

i guess technically we could make the minor version number optional

rough furnace
#

It could be nice in some cases

frosty dock
#

I'm not sure i see the use of that

rough furnace
#

I would use it

#

for the debugplus api

#

as it's a simpler api

#

also for dependancies I can then just depend on Steamodded>=1

tepid sky
#

how do i check for if a card is a jack?

#

nvm

frosty dock
#

Steamodded>=1~ actually

rough furnace
#

get_id() or smth

tepid sky
#

found it :D

#

ya

rough furnace
#

but yes

tepid sky
#

get_id() == 11

#

cuz jack is 11 in rank

frosty dock
#

non-beta versions do not yet exist

rough furnace
#

well technically, there are versions that would match >=1 but yes true

#

also can we dpeend (or mostly conflict) any version?

frosty dock
rough furnace
#

like can I specifcy no version to match all versions

frosty dock
#

yes

#

neither min nor max version are required

rough furnace
#

okay

#

also can we specify complex api things?

#

like (steamodded < versiona AND somedep >= 1 ) or steamodded >= versiona

rough furnace
rough furnace
#

oh also on the topic of breaking everything do we want to change the default prefix to the full mod id?

frosty dock
#

the default prefix for the json format is none

#

you have to specify one

rough furnace
#

it's required now?

frosty dock
#

not in headers, of course. I'm not crazy

#

but for the new format, it's required

rough furnace
#

ok sounds good

#

whats the fail behaviour?

#

does it show up as a mod failed to load or just a log in the console and not sane

frosty dock
#

not sane

rough furnace
#

maybe we should add some dev mode where all not sane things are put somewhere, and then we can add other stuff (like keep track of any warnings found and present them)

frosty dock
rough furnace
#

also I just checked the commits and we're at version f already today

rough furnace
frosty dock
rough furnace
#

Yeah we might need to specify something

#

Debian juse does a string for versions

tepid crow
#

if you want to go the route of complex requirement specification a requirement text file would probably be better

rough furnace
#

just support the debian control format

frosty dock
#

or you can specify a preload file that is run to check for any unsupported requirements

brisk rose
frosty dock
#

this just seems overkill 95% of the time

rough furnace
rough furnace
brisk rose
#

ah I see. It's just a complete and thought out versioning system

tepid crow
#

just looked at it and there is genuinely some cool stuff in there, though extremely overkill lol

rough furnace
tepid sky
#

how would i reverse this one?

#

i know how to have lowe than or higher than

brisk rose
#

lmfao

tepid crow
tepid sky
#

i'll try

rough furnace
#

Debians spec for relationships btw

#

wait wrong thing copiesd

brisk rose
tepid crow
frosty dock
rough furnace
#

I think that many operators is overkill

tepid crow
#

don't you only need and and or?

rough furnace
#

the debian one just has a , (for and) and | for or

frosty dock
#

yeah and+or is complete

rough furnace
#

xor seems like just have a conflict

brisk rose
#

Wilson's version is much more intuitive to me ngl

frosty dock
#

nested objects are also annoying ig

rough furnace
#

is nested nessicary?

#

I don't think debian has it

rough furnace
frosty dock
#

if you have to write out something like (a|b),(c|d)|e,f as basically an AST

rough furnace
#

well if you need steamodded anyways you can do steamodded >= versiona and steamodded >= versionb or somedep >= 1

rough furnace
frosty dock
#

fair enough

tepid crow
#

yeah I think you should stay away from ASTs and stuff

rough furnace
#

Debian doesn't do it so I trust them to figure out it worked

#

oh also make sure you treat provides properly

#

liek if I provide a package I conflict with don't disable myself

frosty dock
#

DNFs are logically complete so there's no issue here

tepid sky
#

next question, +-35? ._.

frosty dock
#

so deps and conflicts are just strings again

tepid crow
#

doesn't almost all software use strings for dependencies/conflicts/etc?

rough furnace
#

JS package.json doesn't but it doesn't support more complex dependency stuff like this (becuase we can have multiple versions of the same package to keep everybody happy and there's no conflicting)

frosty dock
#

so we have

  • config file name
  • provides versioning
  • edit version pattern to allow major(+rev) only
  • mod icon metadata
  • fix display name error
  • rework deps/conflict parsing
#

I'm not dealing with multi-versioning

#

anything I've missed?

rough furnace
#

We need to discuss the nesting and multiple mods thing a bit more

#

If we have a fixed conifg name we can't have multiple mods per folder anymore

#

(Without nesting)

frosty dock
#

we've established the config file goes unfixed

brisk rose
tepid crow
rough furnace
#

I think not having a fixed name is a bad idea though ( we could parse a json file for something as a mod config) and Its easier to not scan everything

rough furnace
#

But particularly its result can effect how the config file is defined

#

And we don't want to be changing things manorly when it's been around for a while and everyone has adopted ot

brisk rose
rough furnace
#

I think if we do desicded to allow multiple mods in a folder, then the config file should specify what all the mods are and where (ar at the least just specify the paths for the individual mod json files)

tepid crow
brisk rose
tepid crow
rough furnace
#

sorry yes the metadata

brisk rose
#

Maybe if it is fixed, Betmma will finally have to turn their abomination into one actual mod

#

lol

rough furnace
#

or just have a few seperate mods installed seperatly

tepid crow
#

I mean at the end of the day it'll be

pros: people stop making weirdly confusing nested mods (real world issue: increased load time?)
vs
cons: it will be harder to install mods (mostly for first-timers and modpack makers)
right?

brisk rose
rough furnace
#

oh also I noticed a werid behaviour with betmma's where adding a lovely ignore to the top level mod will disbale the lovely patch won't disable the mods in it's sub directory

rough furnace
#

also modpacks are are just a collection of files you put in the right spot

brisk rose
#

it'd require external scripts which I certainly don't wanna mess with, instead of just git

rough furnace
brisk rose
rough furnace
#

like you may want a couple of the mods in there like the score improvements, metal pipe crashing noise and maybe rumble but theres some actively you don't want ones like crashing, negateInvis, negateEverything nobackground

#

Also those multi mod packs are just bound to not work well with the mod index

tepid crow
#

the way those are done currently by modpacks is by copy-pasting the files and manually updating them if the mod does iirc

rough furnace
#

Honestly any kind of modpack pretty much needs some manual work anyways

#

Like ever made a minectaft modpack?

tepid crow
#

never have and I thank god every day

rough furnace
#

I made one for my friends and it's annoying

#

with the mod index, you can probably make a script to just have the mods by id and then make a mods folder from it

tepid crow
brisk rose
#

I just tend to prefer people give mod's their own repo

#

(why are apostorophe and return so close together?)

tepid crow
#

I have it with\

#

(above the enter key for me)

tepid sky
#

can someone tell me what i am doing wrong?

rough furnace
#

Yeah but I don't want an additional 12 repos for mods I'm never going to touch again

tepid sky
#

i feel like i did it ok

tepid crow
#

what's the issue?

rough furnace
#

I mean making the same check twice seems odd

brisk rose
tepid sky
#

looks like nothing gets added

brisk rose
tepid sky
rough furnace
#

I think honestly just make a script™️

tepid crow
frosty dock
#

oh btw

rough furnace
#

like for mine it would be clone the repo somewhere and rm -rf Mods/Rumble ; cp -r ClonedRepo/Steamodded/Rumble Mods/Rumble 👍

frosty dock
#

dependencies in DNF makes intuitive sense, but that's not so much the case for conflicts

tepid sky
tepid crow
#

In boolean logic, a disjunctive normal form (DNF) is a canonical normal form of a logical formula consisting of a disjunction of conjunctions; it can also be described as an OR of ANDs, a sum of products, or — in philosophical logic — a cluster concept. As a normal form, it is useful in automated theorem proving.

#

(I'm assuming)

frosty dock
#

yeah

rough furnace
#

oh symbolic logic

tepid sky
#

._.

rough furnace
#

or wait?

frosty dock
#

for conflicts, it seems the top-level operation should be OR

wintry solar
#

iirc context.before doesn't ahve any return values

rough furnace
#

or and and's?

rough furnace
brisk rose
frosty dock
#

i might be trippin

tepid sky
#

L1?

frosty dock
#

say I'm conflicting with three mods

#

that's just a|b|c

brisk rose
rough furnace
tepid sky
frosty dock
#

that's not my condition though

tepid sky
#

But i don't wanna untill it works

frosty dock
#

the condition is, one or more of these mods is present

rough furnace
#

oh I see

wintry solar
tepid crow
frosty dock
#

but say I wanted (a and b) or c or d

rough furnace
#

See I see it as this is a list of mods I conflict with

frosty dock
#

that's fine if it's in CNF

wintry solar
#

oh this is also a major problem

frosty dock
#

but in DNF that's a or c or d and b or c or d

rough furnace
#

A - I conflict with a
A AND B - I conflict with a and b

frosty dock
#

I see this as follows. In order to load, I need <dependency condition> AND NOT <conflict condition> to be met

rough furnace
#

I guess I would think or conflicts as a I anti-depend on these

#

so
A AND B - would actually be NOT A AND NOT B

frosty dock
#

except the logical equivalent is NOT A OR NOT B

rough furnace
#

Well if NOT A AND NOT B then I can load

frosty dock
#

that's A OR B

#

which is exactly my point

#

I can easily parse as CNF (reverse roles of AND and OR) and thus have no operator precedence whatsoever and confuse the hell out of everyone

rough furnace
frosty dock
#

but we're absorbing that NOT

rough furnace
#

I would just have it behave the exact same as depeandacies, but each low level check is negated instead of the whole thing

tepid sky
#

Eh, I'll look tmr

#

Gn

rough furnace
#

So A OR B AND C is treated as NOT A OR NOT B AND NOT C

tepid crow
#

do we really need DNF for the deps though

rough furnace
#

I mean it's just conceptually

#

the syntax doesn't need to be using the logic one

frosty dock
#

unless we support bracketing (which I won't), it's always either a representation of DNF or CNF

rough furnace
#

do you understand what I'm saying?

tepid crow
#

not sure if you're asking me or aure

rough furnace
#

aure

frosty dock
#

uh

#

i think so

rough furnace
#

does it make sense?

#

or did I mess up my logic?

frosty dock
#

wait lemme rethink

#

don't I actually want CNF for dependencies?

tepid crow
#

sort of depends on the operators you will use in both dependencies and conflicts?

rough furnace
#

I think we just want and and or

#

but internally when doing conlficts any "literal" (like A or A > 5.0.0) just gets inverted

tepid crow
#

is either intuitive enough for
conflicts: A and B
conflicts: A or B
?

frosty dock
#

yeah I just confused myself

#

a,b|c,d should parse (a) and (b or c) and (d)

#

for dependencies

tepid crow
#

yes

frosty dock
#

which has AND being weak, which is not how that works normally

rough furnace
#

uhhh

#

let me see how debian does it

tepid crow
#

huh, probably why dependency resolvers usually format it that way

#

neat

frosty dock
#

for dependencies, it's intuitively clear why that's better

#

now for conflicts

rough furnace
#

Yes I guess it does

frosty dock
#

if (a) and (b or c) and (d) is a stand-in for (not a) and (not b or not c) and (not d) and that's just another condition for loading (not one for not loading)

#

that means in order to NOT load, I have the condition
(a) or (b and c) or (d)

brisk rose
#

so shouldn't the focus be on making the json format intuitve to uh... non-CS majors, and then converting it into logic from there?

#

which to be fair seems like what you're doing

frosty dock
#

it makes enough sense for dependencies

rough furnace
#

Well we need to figure out how to program it before we specify how to define it

tepid crow
rough furnace
#

ok so wait how should A <=1.2, A >=1.0 be treated?

#

as a conflict

brisk rose
tepid crow
#

lmao love that term

rough furnace
frosty dock
rough furnace
#

okay

frosty dock
#

okay what if

#

we don't have two separate fields

#

but a negation operator

tepid crow
#

no

rough furnace
#

idk about that

frosty dock
#

except idk what symbol to use

#

i can't ban either one of ~ or - in version strings

rough furnace
#

especially if we want to do stuff like optional depeandies (which would just mostly be load me later)

rough furnace
tepid crow
#

negation just makes reading it a pain in the ass

rough furnace
#

So i guess if we were just to simplify it, , would just be seperating seperate elements and | would be conditions that support multiple

#

I wonder if someone made a version resolving thing we can just steal

frosty dock
#

including negation extends it logically to having conflicts and dependencies interact

#

Steamodded>=1.0, !Talisman>=1<=2, !SomethingElse|CompatLayer

rough furnace
#

See the issue is that gets harder to parse (as a human)

#

Like is !SomethingElse|CompatLayer ~(A|B) or (~A)|B

#

and then also if we want the other now we need backets

frosty dock
#

I'd say negation would have to be strong

#

so (~A)|B

rough furnace
#

so then how do I represent ~(A|B)

frosty dock
#

besides ~(A|B) is ~A,~B

tepid crow
rough furnace
#

Well you could have 2 things that provide similar apis and have the logic to choose between one or the other,

frosty dock
#

I could normally conflict with something unless something else is present

#

I'm not sure how provides helps there

tepid crow
#

ah

rough furnace
#

provides would be so somethingelse could provide compatlayer at the specific version

brisk rose
#

I'm not sure I understand the purpose of a negation oprerator when the field is already for anti-depends?

frosty dock
#

my point is to get rid of anti-depends as a field

rough furnace
frosty dock
#

there's one dependency field for both depends and anti-depends

rough furnace
#

I like the idea of an anti-depends/conflicts field

brisk rose
rough furnace
#

yeah I agree

frosty dock
#

feels like there's no intuitive way to do this though

rough furnace
#

tbh could this discussion use a thread?

frosty dock
#

probably yea

rough furnace
#

I feel like it's a longer discussion and not getting it buired in modding dev may be nice

brisk rose
#

this channel really could use its own dedicated threads counterpart

rough furnace
#

Depedancy Discussion

brisk rose
rough furnace
#

I think just threads in their channel is fine

brisk rose
brisk rose
# rough furnace

It's also possible I just have some sort of allergy to understanding Discord's interface, lol

rough furnace
#

they are very much persistant and browseable

#

they even do the same thing under the channel for with messages

brisk rose
#

Indeed I just... never knew what that button was before

brisk rose
#

Just didn't know about the list of all of them

rough furnace
#

Threads in channels don't make a lot of sense except in more active channels

#

cause most of the itme you're not going to exceed two convos at a time

#

and often they don't need to be followed up

#

so a new convo is fine

brisk rose
#

I still think it'd make sense to have an additional forum channel for more modding-chat style memes and like "what's your favorite mod atm" type threads. Leaving #1209506514763522108 to its defacto use case of mostly project threads

orchid thunder
#

how would one use a joker to change what a seal does

#

for example i want to make a joker that changes blue seal to have a 1/2 chance to give a blackhole

brisk rose
orchid thunder
#

oh ok

brisk rose
orchid thunder
#

?

brisk rose
orchid thunder
#

oh hmm

brisk rose
#

Mika's is abandoned so this is the canonical version

orchid thunder
#

what is harp seal

#

i keep seeing it

brisk rose
orchid thunder
#

Oh hmm

#

this is for a joker in cryptid so il have to make it compatable with this somehow right

brisk rose
#

Tbh I don't know how sensible this stuff In mika's is coded, so take it witb a grain of salt

orchid thunder
#

?

brisk rose
#

Make what compatible with what?

orchid thunder
#

i mean im doing this for a joker in cryptid should i worry about this or no

brisk rose
#

The stuff in mika's will probably take care of itself Idk

orchid thunder
#

im just goign to not for now if modpacks break modpacks break

brisk rose
#

You'd have to ask @dense jasper

orchid thunder
#

bro out here @ing people

brisk rose
brisk rose
dense jasper
#

Harp seal is, I believe, hard coded to just replicate what the vanilla seals do.

brisk rose
#

So yeah it shouldn't break anything. Just not exactly follow the description

dense jasper
#

Long term plans were to make it work for modded seals just haven't gotten to it

rough furnace
#

Could you reuse the logic for stuff like oversatuated and glitched but just apply it to seals

#

Since it is a cryptid joker

orchid thunder
#

what do i use to create a card

#

such as a black hole

haughty wraith
tranquil gull
#

@muted kite sorry if the ping bothers you, but would you happen to know if steamodded supports giving jokers custom Card:draw functions?

lucid umbra
#

anyone know how to get rid off other event queues? they keep stacking and stacking up and laging out my game

crisp coral
#

also you'd be better off pinging @ aure__ for steamodded now

crisp coral
lucid umbra
frosty dock
#

but stickers do, for some reason

edgy reef
#

:]

#

Honestly forgot the reason

#

Oh wait I know

#

Using a different shader for the shine or not having it all

#

Felt for intuitive to just expose drawing the sticker over a variable that disabled the shine.

wintry solar
#

Probably something like queue:clear_queue()

crisp coral
#

@frosty dock have you fixed the hovering crash?

#

because i just updated and it still does that

frosty dock
#

ah no i still need to do that

crisp coral
#

🥀

frosty dock
#

i was too busy discussing dependencies

crisp coral
#

tyty

cerulean rose
#

i'm trying to add a new challenge, but its name shows up as ERROR

name = "Debug Challenge",
    id = "c_debug_1",
    rules = {
        custom = {
        },
        modifiers = {
            { id = "dollars", value = 1e200 },
        }
    },
    jokers = {
    },
    consumeables = {
    },
    vouchers = {
    },
    deck = {
        cards = { { s = "S", r = "K", e = "m_glass", eternal = true } },
        type = 'Challenge Deck'
    },
    restrictions = {
        banned_cards = {
        },
        banned_tags = {
        },
        banned_other = {
        }
    }
brisk rose
cerulean rose
#

i'm having trouble getting loc_txt to work

#
table.insert(G.CHALLENGES, {
    name = "Debug Challenge",
    id = "c_debug",
    key = "c_debug",
    loc_txt = {
        ["en-us"] = {
            name = "Debug Challenge"
        }
    },
    rules = {
        custom = {
        },
        modifiers = {
            { id = "dollars", value = 1e200 },
        }
    },
    jokers = {
    },
    consumeables = {
    },
    vouchers = {
    },
    deck = {
        cards = { { s = "S", r = "K", e = "m_steel" }, { s = "S", r = "K", e = "m_steel" }, { s = "S", r = "K", e = "m_steel" }, { s = "S", r = "K", e = "m_steel" }, { s = "S", r = "K", e = "m_steel" }, { s = "S", r = "K", e = "m_steel" }, { s = "S", r = "K", e = "m_steel" }, { s = "S", r = "K", e = "m_steel" } },
        type = 'Challenge Deck'
    },
    restrictions = {
        banned_cards = {
        },
        banned_tags = {
        },
        banned_other = {
        }
    }
})
wintry solar
#

where are you putting this code

cerulean rose
#

body of main file

frosty dock
#

loc_txt can only possibly work with steamodded APIs

#

you're directly inserting into the game's challenge table

cerulean rose
#

how do i do this properly

frosty dock
#

SMODS.Challenge({ your table here ... })

cerulean rose
#

that worked! thanks

#

how do i ban blinds from other mods in challenges?

#

waitwaitwait lemme try something first

#

alright just include it in the table

#

it's ignored if the mod isn't active

#

also haha the challenge screen breaks if you ban too many blinds

#

also even though the blinds show the correct description, their sprites are wrong

#

i'm trying to make a challenge that debuffs certain poker hands, how would i go about doing that?

primal robin
#

What is correct way to replicate creating cards for Standard Pack?

#

Ingame code so hardcoded, which is not good for other mods support (like seals)

primal robin
#

And how to scale card properly?

tranquil gull
#

even if hacky

edgy reef
#

Lovely injects are how most mods handle it right now

tranquil gull
#

why lovely inject when you can monkeypatch catstare

#
local card_draw = Card.draw
function Card:draw()
  if --[[ some condition ]] then
    -- stuff goes here
  else 
    card_draw(self)
  end
end
#

i mean performance is probably the reason but who cares about performance :D

#

/j

wintry solar
#

because you're goiong to miss out lots of stuff

tranquil gull
#

ah it's fineeeee

#

i mean look my end goal is a 3d joker

#

nothing's gonna work with that anyways

#

lmao

hardy viper
tranquil gull
#

oh?

hardy viper
#

lovely is only for cases when this isnt convenient

tranquil gull
#

does lua implement tco?

hardy viper
#

sorry?

tranquil gull
#

tail call optimization

hallow forge
#

now the REALLY bad this is overriding the function entirely

hardy viper
#

no clue but i know function call overhead is not that bad in lua

tranquil gull
#

oh it does! awesome

#

so doing something like

function f(v)
  if cond then return v end
  g(v)
end

takes up zero additional stack space since it jumps directly from f to g

#

which means you don't get stack overflows from recursion and it's a little faster 🎉

#

this only works if the function call is deterministically at the end of the function

#

hence, tail call optimization

#

@hardy viper

hardy viper
#

understandable

#

thanks for the explanation

tranquil gull
hallow forge
#

HI BALT factorial factorial

crisp elbow
#

omg balt hi

tranquil gull
#

kjdfghdf

tranquil gull
crisp elbow
#

but hi nonetheless

tranquil gull
#

hi lol

hardy viper
#

omg hi cg

static cairn
tranquil gull
#

so what's a good way to load something that isn't a regular asset? do i just put it in the mod files and then load the file like how you usually do in love?

cerulean rose
timid parrot
#

currently trying to make a custom edition for playing cards, but it keeps crashing when I try to apply the edition and I have no idea why

brisk rose
# timid parrot

So idk the issue, but in any case you should be developing these on the newest smods and lovely

brisk rose
#

Lovely is on 0.6.0 now and steanodded gets updates at least every couple days including a fairly big one on the 30th

timid parrot
#

fun

brisk rose
timid parrot
#

I saw that in the main code lol

#

they flag an extra variable on the edition for use with edition checks when it's set

#

and like the edition works fine in the collection

#

so I think either I'm setting it wrong or something funky is going on

brisk rose
timid parrot
#

I mean I can try that

brisk rose
#

Definitely worth a try. Smods always accounts for conflicting names

timid parrot
#

no change

brisk rose
#

Did you do card.edition.prefix_key?

#

Yeah I'm not sure you need those on_apply things for smods.edition objects

timid parrot
#

ah you're right

brisk rose
#

Here's what the editions in ortalab look like

#

You still want loc_txt ofc. Ortalsb just uses loc files instead

timid parrot
#

so I'm looking through the code in Steamodded to find out what's crashing

#

it's this line in their set_edition function

timid parrot
#

ok I got it working after a lot of pain

wintry solar
#

Looks lile it was a mod prefix error?

timid parrot
#

yes

#

I just didn't have one set in my mod header

#

and now it's finally working

wintry solar
#

You also don’t need those on apply and remove functions at all

glossy stone
#

i can feel my motivation coming back

#

augh time to do 7 more arts so i can release OS

lucid sun
#

hey, looking for some assistance as am unsure what is wrong with code. trying to code it so that if current hand played is the same as last hand plated, joker will upgrade. currently it upgrads on every card played. looked through a few other mods that have something similar but have been unsuccessful

  loc_txt = {
    name = 'Bobo Doll',
    text = {
      "This Joker gains {C:chips}#2#{} Chips", "if played hand is the same","as previously played hand.", "{C:inactive}Currently {C:chips}#1#{} {C:inactive}Chips" 
    }
  },
  config = { extra = { chips = 0, chips_gain = 10, last_hand = 'High Card'} },
  rarity = 1,
  atlas = 'JestersPrivilegeAtlas',
  pos = { x = 3, y = 0 },
  cost = 4,
  unlocked = true,
  discovered = true,
  blueprint_compat = true,
  eternal_compat = true,
  perishable_compat = true,

  loc_vars = function(self, info_queue, card)
    return { vars = {card.ability.extra.chips, card.ability.extra.chips_gain, G.GAME.last_hand_played } }
  end,

  calculate = function(self, card, context)
    local last_hand = G.GAME.last_hand_played
    if context.joker_main then
        return {
            chips_gain = card.ability.extra.chips,
            message = localize {type = 'variable', key = 'a_chips', vars = {card.ability.extra.chips}}
         }
    end
    if context.before and not context.blueprint and context.cardarea == G.jokers then
        if context.scoring_name == G.GAME.last_hand_played then
            card.ability.extra.chips = card.ability.extra.chips + card.ability.extra.chips_gain
                return {
                    message = "Upgraded!",
                    colour = G.C.CHIPS,
                    card = card
                 }
        end
    end
  end
}
wintry solar
#

I imagine G.GAME.last_hand_played is updated before the joker is being calculated

lucid sun
#

yep you are right, just did a quick search in the server and seems to be the case lmao. thank you

wintry solar
#

you can store the last hand inside your jokers extra table though

limpid flint
#

Can I somehow inspect an object's full key ingame

#

Like jokers, booster packs, consumables, blinds, etc

wintry solar
#
local click_ref = Card.click
function Card:click()
  click_ref(self)
  print(self.config.center and self.config.center.key or 'no key found')
end
#

something like this should work

limpid flint
#

So then everytime I leftclick an object, the full key will be printed out?

wintry solar
#

yeah

limpid flint
#

In the console I assume

wintry solar
#

if you have debug plus it'll show up there too

limpid flint
#

Oh cool

#

Thanks a lot

lucid sun
#

hello me again. trying to make it so if a glass is played, xmult is added to the joker, however get this error: bad argument #1 to 'ipairs' (table expected, got nil) and am unsure why if anyone could help

  loc_vars = function(self, info_queue, card)
    return { vars = {card.ability.extra.x_mult, card.ability.extra.x_mult_gain } }
  end,

calculate = function(self, card, context)
    if context.cardarea == G.jokers and context.before and not context.blueprint then
        local faces = {}
        for k, v in ipairs(context.scoring_hand) do
            if v.ability.effect == "Glass Card" then
                card.ability.extra.x_mult = card.ability.extra.x_mult + card.ability.extra.x_mult_gain
                G.E_MANAGER:add_event(Event({
                    func = function()
                        card_eval_status_text(card, 'extra', nil, nil, nil, {message = localize('k_upgrade_ex')}); return true
                        end
                }))
            end
        end ```
maiden phoenix
#

Check if context.scoring_hand exists too, I dont remember if its created on context.before

wintry solar
#

you don't want to do this in context.before

#

you want to use if context.cardarea == G.play and context.individual and not context.blueprint then and then use if context.other_card.config.center_key == 'm_glass' then

#

I believe that'll work

lucid sun
#

legend thank you. if i could ask, why not use context.before in this situation?

hearty sand
#

Hi, I'm new here. I wanted to know how modding this game is. I never really learn code, but I would be done to learn for this game, however, I would like to know how hard it can be.

I already understood how to change text and texture. But the thing I want to do the most is some Joker, would it be hard to start with that?

stiff locust
#

as long as you don't do anything too outlandish like implementing an entire new system

#

there's probably a way to do it, or a similar method you can reference in another mod

#

also the steamodded example mods are great for that kinda stuff

stiff locust
#

the example mod re-makes a bunch of vanilla stuff in steamodded format

#

oops

#

cool video but wrong link

#

there we go

hearty sand
stiff locust
#

that's the one for jokers, they have others for other game objects in there

#

and don't be afraid to look into other mods' code to see how they do a certain thing

#

you dont need to reinvent the wheel if someone else made a similar joker already

hearty sand
#

Perfect, I'll start looking that up, thanks

stiff locust
#

the beauty of open source coding

hearty sand
#

Hehehhe

stiff locust
#

if you have any other more specific questions this is the place to ask and you'll get a reasonably timed response

gloomy aspen
#

anyone know any sites where i can edit my save? not sure where else i'd ask, but i want to port my joker stickers and stake wins from mobile -> pc, essentially "merging" my saves

#

oop! nvm, didn't realise the first result let you put in files other than just save.jkr

timid parrot
#

gotta love the spaghetti code that led to the stay_flipped parameter in the draw_card function being overridden inside the function in every use case

topaz sun
#

Guys, why is the game crashing when I try to play a sound, saying
Could not open file resources/sounds/buf_crystal.ogg. Does not exist.

The sound does, in fact, exist though. Also I'm using the same syntax I used to play another sound which works. Both sounds are .ogg files. They also have similar sizes / lengths. I can't figure this out

#

The /sounds folder. The 'explosion' sound works fine, but the 'crystal' one doesn't

tepid crow
#

seems like steamodded prefix shenanigans

topaz sun
#

I used the 'buf_' prefix on both occasions

wintry solar
#

Can you show the sound definition?

topaz sun
wintry solar
#

No where you create the sound

topaz sun
#

You have to create the sound?

#

How does one do that?

wintry solar
#

Using SMODS.Sound

topaz sun
#

Oooooog

hardy viper
topaz sun
#

Right, omg

hardy viper
topaz sun
#

I simply had forgotten about this entirely

#

Thanks, Eremel and Lars

onyx mango
#

gonna potentially try to start nodding today, any tips on setting up a development / testing environment? are there any stub files available to make working with the api easier or testing mods to enable quick testing of a particular joker?

topaz sun
#

And cg

hardy viper
#

anyways no there's no way of doing what you're asking outside of a couple love2d definition extensions, the best way is to just use some sort of IDE with luals and make sure all the dependencies (like steamodded) are in the environment

#

as for testing a particular joker, use debugplus so you can just spawn it in with C and too many jokers to search it up in record time fore

#

proud self insert right there

topaz sun
#

Probably a good idea to create an in game profile just for testing, so you don't mess up your stats and stuff

onyx mango
#

awesome! thank you bothhh!!!

#

is there any way to reload a jokers functionality dynamically so i wouldn’t have to exit out to fix bugs? i know lua is interpreted so it should be theoretically possible but idk if steammodded is built in a way that supports it

frosty dock
onyx mango
#

awesome! thank you so much!

teal estuary
#

forcing myself back into balatro moddinf: how plausible is it to have a joker that gains the amount of chips each played card gives? i can kinda visualise the code in my head, but wanna ask people smarter than i 😭

tepid crow
#

seems very doable

wintry solar
#

yeah seems like a reasonably simple idea

teal estuary
#

oh thank god

#

i'd presume the main meat and potatoes of the could would be something along the lines of

card.ability.extra.chip = card.ability.extra.chip + card.ability.extra.chip_gain then
return{
message = "you played a card! good job!"
colour = [color here]
}
end
#

of course, within the correct contexts

tepid crow
#

more like
card.ability.extra.chip = card.ability.extra.chip + context.other_card.base.value

#

(if I remember my contexts correctly)

teal estuary
#

joeshrug all my code is botched together unless theres an example version i can steal from

cerulean rose
#

is there a good way to check another mod's settings?

teal estuary
#

(actual crash log, i know im missing something but no fucking idea what 😭)

frosty dock
#

you'd want to use context.other_card.base.nominal for base chip value

teal estuary
#

thank you 😭

#

that works, ty ty

#

is there a way to make the joker trigger specifically at the end of the hand? currently this one triggers after every card played (and adds the chips every time), which is a little busted

teal estuary
#

oh yeah, true

hardy viper
teal estuary
#

oh hey, moar jokers

#

also funny

wintry solar
teal estuary
#

ah, ty

tepid crow
teal estuary
wintry solar
#

no

#

the if context.joker_main then needs to be a seperate statement

#

let me find you an example

teal estuary
#

thank you 😭

cerulean rose
teal estuary
#

i wasnt sure if you meant throw the context in the main if line, so i guessed

wintry solar
teal estuary
#

ahhh, gotcha

#

ty

#

~~i was gonna make a triangle joker, with that exact same premise 😭 ~~

#

it works! ty

tranquil gull
#

is it just me or does love.filesystem.read just. not work. it says the file doesn't exist when it very much does

hardy viper
#

i imagine your issue is assuming the working directory is where your lua file is as opposed to the balatro appdata folder

tranquil gull
#
local mesh = obj.load_obj((mod.path .. "assets/test.obj"):gsub("\\", "/"))
function obj.load_obj(path)
    local obj_file, err = love.filesystem.read(path)
    if not obj_file then
        error("failed to load model: " .. err)
    end
    -- ...
end

and the error message is failed to load model: Could not open file C:/Users/baltdev/AppData/Roaming/Balatro/Mods/Jimbo3D/assets/test.obj. Does not exist.

hardy viper
#

weird

tranquil gull
#

that gsub was me trying to fix it, didn't work

hardy viper
#

try with nativefs.read i guess? that'll tell you whether it's a love filesystem issue

tranquil gull
#

nativefs?

hardy viper
#

require("nativefs")

#

steamodded provides it

#

iirc

tranquil gull
#

ah

#

oop that fixed it

#

nice

hardy viper
#

lol

tranquil gull
#

also yeah i'm loading a 3d model, mostly as a proof of concept

hardy viper
tranquil gull
#

idc egg

lucid sun
# lucid sun hello me again. trying to make it so if a glass is played, xmult is added to the...

working off this and advice SDM and Eremel gave, have got it working so when a glass is scored it adds x mult, but also want it that if a glass shatters it resets.
thought it would be a simple steal glass joker code and tweak it but nope. I have tried many different things and nothing seems to work - current error is the same bad argument #1 to 'ipairs'. I understand that i probably shouldnt be using the ipairs anyway so i have tried looking for other mods that use shattered cards but havent been able to find anything that could help me, if anyone has any ideas.

  calculate = function(self, card, context)
    if context.joker_main and card.ability.extra.x_mult > 1 then
        return {
            Xmult_mod = card.ability.extra.x_mult,
            message = localize {type = 'variable', key = 'a_mult', vars = {card.ability.extra.x_mult}}
        }
    end
    if context.cardarea == G.play and context.individual and not context.blueprint then
        if context.other_card.ability.effect == "Glass Card" then
                card.ability.extra.x_mult = card.ability.extra.x_mult + card.ability.extra.x_mult_gain
                return {
                    message = "Upgrade",
                    colour = G.C.RED,
                    card = card
                }
        end
    end
    if card.ability.extra.x_mult > 1 and not context.blueprint then
        for k, v in ipairs(context.glass_shattered) do
            if v.shattered then
                card.ability.extra.x_mult = 1
            end
        end
    end
end
tranquil gull
#

so how would i go about detecting if an arbitrary Card is my joker?

#

.name isn't set by steamodded

#

or if it is, name isn't set in the collection listing

#

this is for custom logic in Card:draw

brisk rose
tranquil gull
#

that's not set either

#

i looked into it and it

#

makes.

#

entirely new Card instances

#

in the collection.

brisk rose
#

Hmm maybe check the sprite object for the key? I'm kinda just throwing things out they'd, but it has to be there somewhere

tranquil gull
#

okay, What

#

why do i have a value of type table

#

that when printed prints nil

#

and hard crashes when i do anything with it

#

is this deadass a null pointer

maiden phoenix
#

Your object should have mod in it, that could work no?

tranquil gull
#

lemme do some diggig to make sure that isn't whjatr's happening here

#

okay it isn't lmao

narrow pollen
#

so uh, is there a way for me to access the SMODS version of a joker i've already taken ownership of?

onyx mango
#

any apparent reason why this code neither changes the card nor spawns a message?

#

nevermind i misunderstood how the function took the rank lol

tranquil gull
#

hh i think 3d is a bust

#

can't get it actually drawing

#

wait love.physics exists

#

just had a REALLY funny idea for a joker

hallow forge
#

i don't likw where this is going

#

*like

tranquil gull
#

you know these things

#

"x3 mult when ball is inside cup", but the shake from Card:juice_up yeets the ball wherever the fuck

#

it's REALLY good so you kinda gotta pick it up when you see it but also REALLY annoying because you gotta reset it every. time. which takes like 5 minutes. and you can't really do retriggers on it

#

i was thinking "hgey i should make more jokers like this and make a content mod out of it"

#

and then i was like "okay what would i name it"

#

and fucking

#

Jimbotomy

#

just jokers that are Weird.

#

and to get their full potential you have to do esoteric and possibly frustrating things

tranquil gull
hallow forge
#

Not really

tranquil gull
#

gottem

hallow forge
#

It’s silly and I’d never take it in a run

#

But it’s funny

tranquil gull
#

that's what i'm going for

#

LMAO another idea

#

"+20 mult if language is not set to system language"

#

hmm what else

#

"x5 Mult if Chips is prime, debuffed if Chips > 1,000,000,000"

opal spade
tranquil gull
#

oh that's good

timid parrot
#

+1 mult for every modded boss blind installed

tranquil gull
#

lkjfds

timid parrot
#

Actually no +2 or +3

#

Well depends on rarity

tranquil gull
#

Roll the Dice: +{N} mult, 5/6 chance when selling this card to create a Roll the Dice with the same enhancements, edition, and seals with +{N+5} mult (N starts at 0)

timid parrot
#

Time to buy madness or dagger

tranquil gull
#

no specifically when selling

timid parrot
#

Exactly

tranquil gull
#

dagger destroys, doesn't sell

timid parrot
#

Yeah

#

I imagine that joker as the ultimate Judgement trap

brisk rose
#

With eternal in parenthesis and a sell value listed I'm confused

#

Oh I see

#

It creates itself when sold

timid parrot
#

Yeah I mean eternal is great when it’s on the thing you want

#

Oh you changed it

brisk rose
#

It's a good name tbh

timid parrot
brisk rose
#

Reminds me of Jimbo's Ouroboros

#

It's similar it just makes a stronger version of itself that costs more spawn in shop when you sell it

#

But this is distinct and interesting

tranquil gull
#

maybe not the one that needs love.physics yet, don't wanna be up until 4am setting that up

tranquil gull
#

well

#

ig i could take the localized string for jimbo ("Joker") and then search for that

tranquil gull
#

hmmmm you know

#

i've made raymarchers before

#

oh my god hilarious idea

#

Pirate Joker: +20 mult if Steam is not initialized

#

Dyslexic Joker: Each hand is scored as a random hand type

#

eh, no why would you take that

#

well ig with a little tweaking it could be good early game, bc you could random into things like flush five

hallow forge
#

tbh I feel the hand type matters too much to be left to chance like that

cerulean rose
#
if (SMODS.Mods["Cryptid"] or {}).can_load and SMODS.Mods.Cryptid.config["Blinds"] then
    table.insert(permamouth.restrictions.banned_other, { id = "bl_cry_oldhouse", type = 'blind' })
    table.insert(permamouth.restrictions.banned_other, { id = "bl_cry_oldpillar", type = 'blind' })
    table.insert(permamouth.restrictions.banned_other, { id = "bl_cry_oldflint", type = 'blind' })
    table.insert(permamouth.restrictions.banned_other, { id = "bl_cry_oldmark", type = 'blind' })
end
tepid crow
#

maybe put it in the function where the run starts or smth

stiff locust
#

is it easy to "reimplement xchips"

wintry solar
#

Why not just depend on talisman

stiff locust
#

¯_(ツ)_/¯

brisk rose
#

which until math makes the config save to the config folder, has other issues

stiff locust
#

if i do anything xchips in tsunami it'll use talisman as a dependency because you're already getting fusionjokers as a dependency anyway so why do you care

brisk rose
#

I mean I already have Talisman and don't plan to play Tsumami (sorry), so it's not something that bothers me

#

I just think the Talisman situation is in general unfortunate

stiff locust
#

yeah you're (unfortunately) the last person i expect to play my mod

#

so for limit must be a number crash on this line in state events.lua

#

what's that mean

#

happens when i play a hand with the fusion i just made
it doesnt even do anything outlandish nor use retriggers so i'm confused

wintry solar
#

you need to add and not context.repetition iirc

stiff locust
#

oh

#

why is this happening on this joker and no others

wintry solar
stiff locust
#

so is it difficult to reimplement xchips

#

can i copy borrow some code from talisman to do it or is it harder than that

wintry solar
#

implemenet xchips is pretty straightforward

#

it's just a couple of lovely patches iirc

stiff locust
#

so that's why it is, noted

stiff locust
#

one of the other projects i'm on uses xchips

#

so i'll do that for that one

#

tsunami will use talisman as a dependency

stiff locust
#

dont want anything to break if this mod and talisman are both present

wintry solar
#

just change your variable name to be different to talismans

stiff locust
#

oh I almost forgot about the sounds

wintry solar
#

for your xchip return

stiff locust
#

which one is that
this makes zero sense to me

wintry solar
#

so say talisman uses x_chip_mod as it's return value name, you can make yours tsunami_x_chips and it won't conflict with anything

stiff locust
#

this still makes no sense to me

#

i think this is out of my pay grade for now

#

just gonna bite the bullet and have talisman as a dependency

topaz sun
#

Can't remember which one though

#

But it's probably possible

tepid sky
#

(jk, idk anything about that stuff so don't take me seriously)

wintry solar
#

It’s called talisman

opal spade
#

on one hand true but i feel like xchip is common enough to warrant a smods inclusion

brisk rose
mellow sable
#

I feel like a large part of Talisman could be merged with Steamodded, ye

teal estuary
#

out of all features i’d want next in steammodded, xchips is definitely up there

teal estuary
#

is there a way to enforce a max amount on a joker? for example, if i wanted a joker to only be able to gain 100 of something - would it be possible? raisedcateyebrow

stiff locust
#

that's

#

and i hate to patronise you

#

trivial

#

you take the increase amount, check if it's above 100, and if it is, set it back to 100

teal estuary
#

not patronising, and it just clicked in my head on how you’d so it

#

yeah

#

😭

#

i forgot code can code

stiff locust
#

increase = <insert calculation>
if increase > 100 then
increase = 100
end
card.ability.extra.value = card.ability.extra.value + increase

#

literally that

teal estuary
#

yeah, i was writing that out as you started typing 😭😭

stiff locust
#

it happens to the best of us

teal estuary
#

im good at coding, i swear clueless

#

ty thougg 😭

stiff locust
#

i mean yeah everyone whos good at coding forgets the simple shit

teal estuary
#

ong, clearly just means im amazing at code clueless

frosty dock
#

math.min(increase, 100)

primal robin
#

How can I rename Joker by using some value from card.ability?

teal estuary
#

?

teal estuary
#

oh, no, its something different 😭

#

is a good idea though

tepid sky
#

lol

opal spade
teal estuary
#

ahhh, gotcha

#

ty

bitter fog
#

did the most recent update break modding? I tried following the guides on installing mods and found nothing changed

#

If i were to restart the modding proccess, would a clean reinstall of balatro help?

tepid crow
#

balatro's 1.0.1m? no, everything should be fine as long as you're not using steamodded 0.9.8

bitter fog
#

hmmm, i think i installed the 1.0 alpha version

#

one sec

#

oop ok i did download the 9.8 version. do i just do a reinstall of vanilla balatro to restart and install 1.0?

tepid crow
bitter fog
#

kk thanks

vague island
#

how do i check how many enhanced cards are in the deck (for example drivers license)

#

?

cerulean rose
#
if self.ability.name == "Driver's License" then 
    self.ability.driver_tally = 0
    for k, v in pairs(G.playing_cards) do
        if v.config.center ~= G.P_CENTERS.c_base then self.ability.driver_tally = self.ability.driver_tally+1 end
    end
end

this is the code that tallies driver's license

#

what's the best way to organize code into different files like cryptid does?

narrow arch
#

@brisk rose i know you probably can't do much about this but when im using the modpack the game stack overflows when i try to switch profiles

tepid crow
#

^ someone else in the cryptid discord had the same issue

wintry solar
#

anyone using the blind animation tool in aseprite? I'm having some issues with it misaligning

brisk rose
narrow arch
#

it must be loading in all of the unlocks, which is like a couple thousand stacks (a lot i think)

brisk rose
#

I don't think it's just a scale issue

cerulean rose
#

is G.hand.highlighted supposed to be nil when a consumable is used?

#

i have this so far

    use = function(self, card, area, copier)
        local left = nil
        local right = nil
        print(G.hand.highlighted)
        for k, v in ipairs(G.hand.highlighted) do
            if v == card then
            elseif left == nil then
                left = v
            else
                right = v
            end
        end
        G.E_MANAGER:add_event(Event({
            trigger = "after",
            delay = 0.15,
            func = function()
                left:flip()
                play_sound("card1", 1.15 - (1 - 0.999) / (2 - 0.998) * 0.3)
                return true
            end,
        }))
        G.E_MANAGER:add_event(Event({
            trigger = "after",
            delay = 0.15,
            func = function()
                right:flip()
                play_sound("card1", 1.15 - (2 - 0.999) / (2 - 0.998) * 0.3)
                return true
            end,
        }))
        G.E_MANAGER:add_event(Event({
            trigger = "after",
            delay = 0.1,
            func = function()
                    local left_suit_prefix = string.sub(left.base.suit, 1, 1)..'_'
                    local left_rank_suffix = left.base.id
                    if left_rank_suffix < 10 then left_rank_suffix = tostring(rank_suffix)
                    elseif left_rank_suffix == 10 then left_rank_suffix = 'T'
                    elseif left_rank_suffix == 11 then left_rank_suffix = 'J'
                    elseif left_rank_suffix == 12 then left_rank_suffix = 'Q'
                    elseif left_rank_suffix == 13 then left_rank_suffix = 'K'
                    elseif left_rank_suffix == 14 then left_rank_suffix = 'A'
                    end
                    local right_suit_prefix = string.sub(right.base.suit, 1, 1)..'_'
                    local right_rank_suffix = right.base.id
                    if right_rank_suffix < 10 then right_rank_suffix = tostring(rank_suffix)
                    elseif right_rank_suffix == 10 then right_rank_suffix = 'T'
                    elseif right_rank_suffix == 11 then right_rank_suffix = 'J'
                    elseif right_rank_suffix == 12 then right_rank_suffix = 'Q'
                    elseif right_rank_suffix == 13 then right_rank_suffix = 'K'
                    elseif right_rank_suffix == 14 then right_rank_suffix = 'A'
                    end
                    left:set_base(G.P_CARDS[right_suit_prefix..right_rank_suffix])
                    right:set_base(G.P_CARDS[left_suit_prefix..left_rank_suffix])
            end,
        }))
        G.E_MANAGER:add_event(Event({
            trigger = "after",
            delay = 0.15,
            func = function()
                left:flip()
                play_sound("card1", 1.15 - (1 - 0.999) / (2 - 0.998) * 0.3)
                return true
            end,
        }))
        G.E_MANAGER:add_event(Event({
            trigger = "after",
            delay = 0.15,
            func = function()
                right:flip()
                play_sound("card1", 1.15 - (2 - 0.999) / (2 - 0.998) * 0.3)
                return true
            end,
        }))
        G.E_MANAGER:add_event(Event({trigger = 'after', delay = 0.2,func = function() G.hand:unhighlight_all(); return true end }))
    end

print says nil

restive badger
#

hey first time modder here can anyone help?
I tried following a tutorial and it says the game crashed with a bunch of lines saying a whole bunch of stuff about errors and such

limpid flint
restive badger
#

I can try im not sure how to take a screenshot and save it...

tepid crow
#

don't take a screenshot

#

copy+paste it

#

you can just press ctrl+c on the crash screen

restive badger
#

Well I mean when I try to open the game it has a crash screen I cant interact with

#

it had alot of other stuff before I closed it but now it has this

#

oh wait I think I know what you mean

tepid crow
#

that one looks like steamodded isn't present

restive badger
#

how would I go about adding it? I have steamodded in...

tepid crow
#

probably just nested on accident

restive badger
#

Is this not correct?

tepid crow
restive badger
#

Also it made the lovely folder after I tried launching the game it didnt have that before launch

#

where could I go to check for errors?

tepid crow
#

coincidentally, in the lovely folder

#

lovely/logs/

hardy viper
#

i wish steamodded had basic integrity checks

tepid crow
#

such as?

hardy viper
#

oh wait i could just

#

do that myself

hardy viper
restive badger
#

one moment

#

I have two logs as I tried to launch twice

tepid crow
#

yeah I'm still guessing steamodded is nested

#

open the steamodded folder

restive badger
#

can I fix that somehow?

#

alright

tepid crow
#

sure, nested just means that instead of Balatro/mods/steamodded/ you have Balatro/mods/steamodded/steamodded/

restive badger
#

thanks for clarifying im like a toddler when it comes to modding if its not minecraft or f&h

#

What now?

tepid crow
#

could you show the steamodded folder?

restive badger
tepid crow
#

well that seems good

#

did you just fix it based on the description I gave?

restive badger
#

Im afraid im not sure what you mean

tepid crow
#

that's a "no" then, don't worry haha

#

although you are missing the steamodded/lovely folder 🤔

restive badger
#

I apologize for being slow I dont want to try and waste your time as im trying to mod the first time-

tepid crow
#

no worries!

restive badger
#

Could I just make a lovely folder out of nowhere?

tepid crow
#

well you could but you'd be missing a lot of files in the folder haha

#

can I see your Mods/lovely/ folder? it might've accidentally moved

restive badger
#

Should I try re installing steamodded and see if I accidentally deleted lovely?

edgy reef
restive badger
#

alrighty

tepid crow
#

Hmm, nope. No idea where that folder went then

tepid crow
edgy reef
#

Are we sure the mods aren't nested?

restive badger
#

alright, one moment...

tepid crow
#

I mean, steamodded missing its lovely folder should be fixed regardless

restive badger
tepid crow
#

yup

#

(also some other files that were indeed missing)

restive badger
#

should I try launching?

tepid crow
#

go for it

restive badger
#

well now im back with the huge line of error code let me take a phone picture...

tepid crow
#

if you could ctrl+c it that'd be better 😬

restive badger
restive badger
#

If ultimately my pc just cant mod it i'd be a little disapointed but I could live I just really wanted to be able to mod

tepid crow
#

why's your balatro version 1.0.1f?

restive badger
#

Well, I dont know how to update it as it isnt from steam... if I were to reinstall a "latest version" would it be better?

tepid crow
#

I think it's crashing because it's assuming you're using the latest version of balatro

restive badger
#

Im not sure if that gets in the way as Ive modded lots of games not from steam

tepid crow
#

(there's some small code changes)

restive badger
#

I see...

#

should I check for a newer version?

edgy reef
tepid crow