#Mod development: Out of game collection viewer

1 messages · Page 1 of 1 (latest)

urban comet
#

I want to make a mod that is able to grab mod objects from the game when it runs and output a webpage using notmario's Balatro mod website template

This will enable people to easily see everything they have in game on one place and I'll also be able to use it to publish the exact contents of my modoack if I wish to

I have a pretty good idea of how to go about it. It doesn't really need any sort of interface, at least at first, just to run once on game startup

What it'll need to do is grab the name, description, and rarity of every modded joker. In the future I'll add other mod objects, but I'm starting with just jokers. I plan to also add mod badges under the rarity badges. Additionally it needs to grab and re-export the individual sprites. I've been told this part is pretty easy with a Love2D function.

My question is, what do I iterate over to get these attributes? Also can I do this with only steamodded or do I need lovely too?

I think I can figure out the web design end with the Javascript, html, and css, as well as getting Lua to write custom versions of those files. I just need to know where to start basically

This is kinda in a similar vein to #1291393594799689779 I know. I've had this idea for quite a while though and they can coexist.

unborn lily
#

wouldn't that just be during context.other_joker and you do something like

#

context.other_joker.loc_txt.text for the description?

#

if i'm getting that right..?

#

this is of course if something like

#

baseball card was iterating through jokers

#

if you want to make a thing happen constantly you do it in the event manager

urban comet
#

I want it to log all jokers at startup

#

And then stop

#

I presume I mostly just need a loop, a context, and where to get the list of smods.joker objects

unborn lily
urban comet
#

I want to do that, yes

unborn lily
#

.

urban comet
#

The vanillas are a bit superfluous but still

#

It'll be a beeeg addjokers.js, lol

unborn lily
#

what if instead of that

#

you make it a joker that uses the context of baseball card

#

and logs every joker in your joker slots except itself

urban comet
#

That's... a very different thing from what I'm doing

unborn lily
#

so then you use debugmode to spawn all the jokers you wanna log

urban comet
#

But interesting

#

The main design goal for this mod is to export the entire collection

unborn lily
#

then

#

spawn every joker

urban comet
#

They'll be loaded into memory anyway. I don't need it even more hacky, lol

#

At least I presume the code for the joker objects is accessible while not actively in a game, for the collection to work on the first place

unborn lily
#

¯_(ツ)_/¯

#

the way i suggested is so easy even I could probably code it

teal venture
#

..Why do we need to spawn jokers at all for this?

mellow cypress
#

really like this idea! been trying to find jokers from other mods to help me with understanding modding and this would be ripper for that as well

teal venture
#

If all we want is the card's into on startup just grab all the jokers after injection and you should be able to get the rest of the info about then (i.e. atlas file, loc text, etc).

#

Then just save this somewhere that can be accessed for the webpage.

urban comet
#

Dosclaimer: I've coded roughly 0 Lua before

#

Sp I'll need to read the docs and and ask questions along the way

teal venture
#

The Lua part sounds decently simple for at least the modded objects that are close to vanilla (with extra code needed for all the different custom UI elements).

#

Making the webpage would likely be the harder part.

urban comet
urban comet
#

And add a new field for the mod badges

#

I figure I can even grab the badge colors and incorporate those

urban comet
#

I'm trying to do a quick proof of concept test where I just write all the keys to a text file. I got writing to a file instantly, but need to know how to grab the data

teal venture
#

Iterate over G.P_CENTERS and check if anything has set = "Joker"

#

Should net you the config of a joker.

winter wedge
#

This would be really convenient to help set up something large like Cryptid

teal venture
#

Yea it's definitely something really neat.

urban comet
urban comet
#

and I know priority inf probably isn't valid, but i don't think it's my issue

#

yeah I removed it and no change
I think I need a context or something
or maybe the set for smods jokers is different

teal venture
#

File loading is done when jokers are being registered.

#

Which is before their injection.

#

You need after, which can be done through creating/hooking post_inject_class in SMODS.Joker (can’t remember if jokers have this or not).

#

Or just making a custom class that looks like how the internal ones for file localization do.

urban comet
#

sorry for so many questions, but how would I do any of those?

true rose
#

if im getting this right then this means you can just shit out a webpage anytime you want for the mod your using

#

that sounds epic

teal venture
urban comet
#

it's... almost working

urban comet
urban comet
true rose
#

sounds like it would be hard to do joker images though

#

like with soul_pos jokers

#

do you just align them in the middle or smthr

urban comet
#

apperently you can use love2D directly to redrw the sprites

#

I presume it works with soul_pos jokers too

urban comet
true rose
#

sounds epic

#

and also a great way to get your mod out there

#

hope this gets made

urban comet
deft nimbus
#

I'm actually working on that. Right now I have it exporting most informations about most game types into a json format. My next step was going to work on modifying the template to work with the json file and allowing it to display more options.

urban comet
#

yeah, this is a bit simplier

deft nimbus
teal venture
#

Looks great, although I don't think we need to create the cards to get this info.

#

Something like how curses and D6 sides are processed should work for just about all of them.

#

Game might end up crashing from trying to process tons of cards being created and deleted.

urban comet
#

it's starting to work, and no crashes, just a bit of hanging

#

how do curses and d6 do it?

deft nimbus
#

I found I needed to create the cards if I wanted the description variables to resolve. Not all object types had the same problems so some I could just call localize on without issue

urban comet
#

yeah I also haven't gotten the variables to resolve

#

but I haven't ried doing it with the created cards yet

#

I created the cards to get the sprites first and foremost

#

(though now the ~center~ rarity doesn't resolve like it used to?)

#

I mean the rarity

deft nimbus
#

Rarity wasn't too bad for me, just had to account for how some special cases are hamdled

#

Evolutions specifically, I believe

#

I didn't need to create the sprites to get the images, I just referenced into the sprite sheets. Though I haven't gotten soul images done yet

urban comet
#

idk if that's possible without creating the card

deft nimbus
#

I did it using only the center object. You can look at my code to see the method I made, but like I said, it doesn't do overlay sprites yet.

#

Basically get the atlas image and the use the love paste function to select only the pos you care about and then use a write function to export that new image as a png

#

Though now I'm curious what you're doing to export the rendered card.

urban comet
#

yeah that looks so much cleaner

teal venture
#

I managed to also get it to work but 1: the game crashes when trying to load modded objects (Could not open file output/images/c_cry_malware.png (not found) when trying with Cryptid) and 2: I can't find the output files.

urban comet
deft nimbus
#

My guess is that you have to make sure the path exists relative to the app data balatro file. After some restructuring I may have accidentally removed the creatq folder if it doesnt exist cod3

teal venture
#

Yea it does save when it's in the save directory

urban comet
teal venture
#

Yea everything is saved as if it's in 2x and not 1x

urban comet
#

i mean they all have 2xassets though? why isn't it pulling from those?

deft nimbus
#

When I run it I get the 2x output. I'm not sure how it decides which to use.

#

I originally coded it to use the 1x dimensions but the output was only a quarter of the images

urban comet
#

I'm still creating the cards because apperently I'll need them for the descriptions

#

but not using the card object

deft nimbus
#

Parsing the description was a bit of a pain since the output is designed for ui rendering

urban comet
#

the balatro website template is kinda meant for mostly unmodified descriptions

#

even with the colors

urban comet
deft nimbus
#

I mostly meant the data structure that the ui uses isn't really friendly for anything other than the ui. You get a ui element you have to index into with each line being a table and each part of the line being a nested table containing the string and color data (and other stuff)

urban comet
#

the extra linebreaks are the only thing you need to remove

#

and that's just aesthetics

#

that and localizing trhe variables

#

that you do have to do yourself

deft nimbus
#

The color data are decimal numbers representing the hex values

urban comet
#

even with an smods function?

deft nimbus
#

The template worka with the unprocessed text that has the stuff like {g.c.color}but the processed text doesnt use that, it preps it for actual rendering.

urban comet
#

I just assuemed that steamodded could get the descriptions back in that format

deft nimbus
#

It's a balance between getting the raw text without the variables or the processed text that is in the ui data structure for the variables to be filled in.

urban comet
deft nimbus
#

The stuff with the g.c.color data also had the #2# variable placeholders

urban comet
deft nimbus
#

I think you should be able to but I kept running into issues with the loc_vars not working correctly. I just ended up calling hover to force the game to process the text and then just did it all in custom logic

urban comet
#

I know on smods jokers at least it's just an index into a config table

#

idk if vanillia jokers work the same

deft nimbus
#

If you can find a more consistent solution I might steal it

urban comet
#

need to get images working before I start back on the descriptions

#

I mean they were working

#

but I wanna steal your code because i like it better

#

lmfao

deft nimbus
#

As a general rule descriptions were the most difficult thing to deal with. Different object types sometimes had their own special needs.

#

When I'm back at my computer I'm going to upload the newest version of the code to github

urban comet
deft nimbus
#

Just for a ballpark, when I export everything I get around 2600 images

urban comet
#

I just noticed I have no vanillia jokers in my export. I... don't know why. I don't even care that much about including them, but they;re in the text values due to how I did it

urban comet
deft nimbus
#

Are you indexing off of smods.jokers?

urban comet
deft nimbus
#

That is odd

urban comet
#

it was exporting them with my other code

deft nimbus
#

I guess it's possible they aren't exporting for me and I just never noticed. When you have over 1000 jokers it's easy to miss if a small subset aren't there.

urban comet
#

I noticed because I wanted to see how wee joker exported

#

I presume it woulda been like this

#

which is better than mine which was at normal joker size

#

is there a way to center them though?

deft nimbus
#

How I'm doing it if they aren't centered on the sprite sheet they won't be centered on the output.

#

Unless maybe the center has info about different h and w values to override the defaults

teal venture
#

Unfortunately they prob don't, cards with dimensions that aren't normal just resize the Card object when created.

deft nimbus
native pine
#

I was thinking it would be intresting to make some kind of api to request the game to give metadata

#

take a look at this object G.localization.descriptions.Joker

#

theres one for other things too

deft nimbus
#

added support for vanilla cards and creating folders if they don't already exist

deft nimbus
urban comet
#

Just really hit me that I'm gonna have to construct the whole ass addjokers.js file basically line by line with io.write() statements even the parts I'm not changing. That'll be fun, lol

#

might break out chat gpt again for that busy work

#

Well I guess I can have 2 js files and leave one static, to minimize the brainnumbing

teal venture
#

I’m wondering which one is easier, building a Lua -> JavaScript converter or getting the website to work with json.

#

Well if there’s likely a converter for one somewhere but whether it’ll work for specifically tables or just convert code like the ones I had seen when searching is a different question.

urban comet
#

based on yours

#

everything is blue atm though

urban comet
#

ayyyy it's working

deft nimbus
#

What did you do for the overlays?

urban comet
#

code is still really messy and hangs indefinitely and never loads the menu, but here it is

urban comet
deft nimbus
#

that looks good, I updated mine to use that same logic

urban comet
deft nimbus
#

progress on the template

urban comet
#

ngl I see some appeal in the completely random seeming order everything comes out in

#

I always get ox joker first too

urban comet
deft nimbus
#

I spent a few hours yesterday trying to get shaders output. it kind of works but I'll probably create a mechanism where I can override the procedurally generated images with custom ones.

#

some of these are fine, some are just blank

urban comet
deft nimbus
true rose
winter wedge
deft nimbus
#

there are still some issues to work out, and it's currently just jokers, but here's the initial public release: https://lshtech.github.io/

winter wedge
#

Beautiful

deft nimbus
#

adjusting odd sized sprites is on my "to fix" list

true rose
#

and a bunchc of other mods

deft nimbus
#

it should basically be everything. I meant it to be a resource for mod developers to see what ideas do or do not already exist

ember terrace
#

Why are vanilla jokers from Aura in here?

deft nimbus
#

why are the vanillas there at all or why are they marked as aura?

ember terrace
#

Why are they here

true rose
#

aura is the mod that animates vanilla jokers

#

and so takes ownership fo them

ember terrace
#

Yea but they aren't modded jokers

#

Should have been removed

true rose
#

also layer mismatch

#

soul layers are formatted wrong

#

the ! should be behind the jonkler

deft nimbus
#

at the moment I don't really have a good way to specifically identify vanilla jokers other than possibly hardcoding it. there are one or two mods that insert jokers directly into the g.p_centers table

ember terrace
#

Beside Aura idk

#

nil
nil
nil

winter wedge
#

I bet Green Joker is also marked as Cryptid

deft nimbus
#

yeah, there are a few nils about and a whole lot of jen's have it

true rose
#

too latr

#

AURA

deft nimbus
#

aura probably took ownership after cryptid did

#

for things like aura I'll put a filter to ignore any card that are set to use it since I don't remember aura adding anything new

shy mirage
#

You coul check if the keys are base game keys and not show them if they are

urban comet
deft sinew
twilit finch
#

:o NLM is there too!

deft nimbus
#

I started working on joker tags, right now I'm looking for chips,mult,xchips,xmult. are there any other properties that would make sense to tag?

urban comet
deft nimbus
#

I can add scaling to my list of blueprint and self destruct of ones I'm not sure how complex it is to programmatically identify

unborn lily
#

or search for "gains" or "this joker gains" in the ability text

#

if they use the correct syntax every scaling joker should have one of those two

deft nimbus
#

I'd have to read the actual lua files to see that sort of thing, though many have some mod value in extra for what to add to the xmult (etc)

#

if a joker gains but gets reset does that count as scaling?

unborn lily
#

yeah

#

it still scales until it gets reset

deft nimbus
#

I guess the descriptions frequently also say something like "currently "

teal venture
#

There is going to be a tag system in SMODS at some point, whenever that's set up it should be easy to set up.

deft nimbus
#

that is true, and I can make use of it then, at least for moded jokers that use it

urban comet
urban comet
#

@deft nimbus how do you have the old jellymod enhancements in your game?

#

also I see other enhancements without mod badges I don't recognize

deft nimbus
#

I just fixed it. Disabled scouter though.

urban comet
#

what are the other weird enhancements from?

#

lke medical card and slimy card

#

i don't think those are jellymod

deft nimbus
#

I don't remember at the moment but I'll check when I get a chance

urban comet
#

Also I'm officially suspending my version of this mod concept, you've already achieved all my goals and more

urban comet
#

though we really need to figure out how to automatically add the shader for jokers like Holo

#

Also, base game jokers should have a "Balatro" badge so we know they're not from a mod without proper smods.Joker support, if possible

deft nimbus
urban comet
deft nimbus
urban comet
#

which they're also doing

#

(if you would have ported it it woulda had a badge, that's why I know)

#

Is your website created by an unmodified version of your current code, or did you do stuff manually on it?

deft nimbus
#

The exporter code or the template code?

urban comet
#

I can tell the template has been modified, I meant the exporter. Though yeah I guess it doesn't put it all together yet?

deft nimbus
#

The exporter is a bit out of date but I think what checked in is functional

urban comet
#

I'll still wait until I can just run it and get a website like yours spit out I think

#

and I can help with iomplementing that if nessacary/not done

deft nimbus
#

Oh, yeah, I can do that. Right now i run it and then upload the results

urban comet
#

yeah, like, the website stuff should be part of the same mod imo

#

so it can just be pushed right to a githib pages site

#

after moving it to the root of a different repo ofc

#

that part should be manual, but yeah it should generate the website files in situ

deft nimbus
#

Oh, gotcha, no, the template lives in a second location. I can work on that though.

urban comet
#

yeah I get'cha

urban comet
#

I'm a bit overtired

deft nimbus
#

Right now I use beyond compare to sync them locally

urban comet
#

also keep up the great work man. I feel kinda like I'm barking orders, which isn't on purpose. this has cpme together super quick

#

and I very much appreciate its existence

deft nimbus
#

No worries. I have to brush up on my website skills though

urban comet
#

I only ever learnewd bare html + css myself, so not much use for js stuff

deft nimbus
#

I'll probably get some more complex framework on place to support better filtering

urban comet
#

you did say in your bio you overcomplicate things :P

#

but it seems to work out well

urban comet
#

which woulda been hard not knowing js, but I'm good at brute forcing stuff like that with enough time

#

I mean... I got the soul sprites to overlay despuite not knowing a lick of lua before I tried to make this mod

deft nimbus
#

I'm new to Lua too but I'm also a developer

urban comet
#

yeah that gives you a major advantage. My only coding experiemence was in college years ago

#

I just kept staring at the love2d docs and googling things until I got it halfway working

#

lol

deft nimbus
#

Googling is half of dev work anyways

urban comet
#

very true from what I understand

deft nimbus
#

Working with Lua is basically knowing, roughly, want I want it to do and figuring out how/if that's possible with this language

urban comet
#

yeah, my very limited previous experience was mostly with python so I have some grasp of how languages genteelly work, but it's probably good thaat I don't have enough to expect a certain way of doing things. Python was a long time ago for me (about 5 years) so I had a semi fresh slate

#

though I do think all the time about writing python scripts to automate menial tasks, but recently, I've been using chatgpt to automate the automatoion (as opposed to befored when I just... didn't do it)

#

and I've been using Bash for that because it has easier access to ImageMagick, which is the right tool for the type of batch tasks I've been messing around with

#

interestingly even though Bash is known for its interactive shell and not as a "prgramming language" as a newcomer to it all it feels like any other scripting-style language like python or even lua

deft nimbus
#

It is, technically so is the windows command language

urban comet
deft nimbus
lime dagger
#

Oh I have seen this one

deft nimbus
deft nimbus
#

I was hoping they'd have a nice, simple copy function but I think I'd have to sequentially read the contents of each file and then write them to the new location. Not undoable, just annoying

urban comet
#

To lua itself and tbh to love too

deft nimbus
#

lua has modules that have more robust support, like os, but they don't seem to be set up here

urban comet
#

Bit of a brainfart there

#

Only max users would have to change it afaik

#

(And yes wine does seem to include xcopy)

deft nimbus
#

inside the template folder are override images for aura's animations. you can delete this gif files if you don't want to use them

urban comet
#

@deft nimbus so I'm probably missing something obvious, but how do I get it to actually.... do the thing?

deft nimbus
#

menu option after you've started a run

urban comet
#

oh you have to be in a run

#

okay

deft nimbus
#

when I create cards I do it in G.jokers

#

there are a also a few loc_vars that expect to be in a run

urban comet
#

this is why I'm glad I use debugplus, so I know if it's still doing things and not to try to exit out

lime dagger
#

What's a desklet

urban comet
#

oh I think that's a poup from m os

#

irrelevent

urban comet
#

the base event queue has been on 1 since it originally counted everything down

deft nimbus
#

the complete line is from this mod, that gets printed when its done

urban comet
#

well the copy commands just didn't work then

deft nimbus
#

the js/html stuff didn't get to the output?

urban comet
#

I was being silly

#

so it did work

deft nimbus
#

looks like an undiscoveredsprite error. did you install my discovery manager mod?

urban comet
#

oh I didn't realize that was needed

#

you need to write a readme, lol

deft nimbus
#

it shouldn't be, just not really sure why else you'd get it

urban comet
#

but i did discover things manually with debugplus

#

so that might be it?

deft nimbus
#

it should mark everything as unlocked and discovered itself but I know it's had issues sometimes

urban comet
#

uh.... do you have manual overwrites for these or something?

#

I don't haveFusion

#

I have Defused

#

and those descriptions are wrong too for the jokers I actually have

#

and no images

deft nimbus
#

the only overrides that currently exist is any image in the images folder that ends with _override

urban comet
#

wait I think you included your export in the download by accident

#

because the suits I don't have but you do also show up

deft nimbus
#

oh... yeah, because I accidentally included it in the template it overwrote the one you generated

deft nimbus
#

deleted the file from my repo

urban comet
deft nimbus
#

cards.js

#

remember to get the one inside the template folder

#

honestly it's working better than I might have expected on a completely different OS

urban comet
#

proton/wine does a great job of reimplementing windows userland

deft nimbus
#

theres a whole lot of weird underpinnings of linux that could have made themselves known

urban comet
#

fair enough, lol

deft nimbus
#

clearly need to put in checks for the existence of modded types and look into why the other vanilla objects aren't exporting images correctly. I'm also planning on implementing an override system so you can have a custom file that "fixes" the data, like list "Balatro" as the mod for all vanilla jokers.

urban comet
#

Also figure out why the voucher packs don't have any sort of betmma mod tag. It might be just how it's added

deft nimbus
#

betmma's vouchers are added directly to G.P_CENTERS

urban comet
#

Ah thought it was something like that

#

Well the vouchers have the tag, I presume you mean the boosters

deft nimbus
#

yeah, sorry, the boosters

urban comet
#

Betmma should add then when steamodded so they show up here and in the mod additions on in game

#

Also they should move everything to one actual smods+lovely mod with a full config

urban comet
#

@deft nimbus I just had a thought. Because though have so actually push a "export cards" button, maybe you could include a text input field for webpage title abd one for a blurb for the top of the page

#

Also make the headings: "jokers" etc, have capital first letters

urban comet
#

Maybe include a summary of what all is in the collection to (count the number of objects) either for the auto blurb and/or in sprenthesis for the tab

#

It's also be cool if they're was a tab for the mods themselves. Just the mod badges should be sufficient for the visual element

#

@deft nimbus you sound also color the mod badges to how it's setup in smodded if possible for both that and the main categories. And just keep the gray as a default color for when that isn't set

deft nimbus
#

Mod badge colors should be being set when applicable

#

Filtering by mod is definitely on my todo list

urban comet
#

I just forgot how many don't have one set

urban comet
#

@deft nimbus Trying to export my collection again and getting a crash

deft nimbus
#

this line is odd, I'm not sure if it would be an issue: card_type = string: "Locked"

urban comet
#

oh is it the locked ortalab cards?

#

I have them disabled in config

#

the ones that don't exist but are teasers for the demo

deft nimbus
#

guess you can try disabling ortalab to see if it'll run then, that'd at least help troubleshoot it

urban comet
deft nimbus
#

when I get a chance I'll run it myself and see if I can figure out what's causing the issue

urban comet
#

no worries

#

I did download a fair few new mods, so it's hard to say which one it is

#

I'll push an update to my modpack so my exact setup will be available for testing

#

(well it's pushed, I just mean make a release because I make zips so people don't have to use git to download it)

urban comet
#

here's just a screenshot of my mods folder if you need to know what mods I have

deft nimbus
#

I reran my entire output without any issues and I appear to have every content adding mod you do

#

the log file should say what object it was working on when it crashed

deft nimbus
#

I was certainly able to export reverie's stamp sleeve

urban comet
deft nimbus
#

i assume so, it's updated from dim's pack

urban comet
#

yeah, we both seem to be using the same version, weird

urban comet
#

but I don;t think we can know what that is

deft nimbus
#

the processing log should be done immediately before it works on an item. the error suggests its happening during the rendering step which is definetely after the processing log.

urban comet
#

huh, weird

#

then mod interaction?

deft nimbus
#

I guess it's possible. the error is happening inside the base rendering logic. I guess I can try and work through the stack trace and see where or why specific_vars is breaking things

#

can you give me your dumped version of functions/common_events.lua?

#

also can you hover over the stamp sleeve in game and see if it crashes?

urban comet
deft nimbus
#

can you regenerate the crash log? the line number and that version of the file don't match up

urban comet
#

yeah, it's because i disabled ortalab

#

here's the new crash log

deft nimbus
#

it certainly looks like it's related to the object being locked. I'm assuming it is in game?

#

I updated the script to unlock objects before processing them

urban comet
#

weird

#

@deft nimbus pretty sure the problem with the editions display is that they apply twice

#

this is exactly how I imagine double negative must look

deft nimbus
#

don't know why it would apply twice, it's just doing set_edition

urban comet
#

I see how that could do it twice

deft nimbus
#

without set_shader

urban comet
#

hm.... do you need to actually set_edition?

#

or can you get the edition shaders another way?

#

are you popping , doing a graphics reset, or doing a setshader() after you render the cards?

deft nimbus
#

setting the shader, drawing the image, clearing the shader, popping the canvas

urban comet
#

hmm... something really does seem like it's making it happen twide though, like it pretty much explians the looks of all of the shaders

#

weird

#

@deft nimbus it's because there are 2 draw operations i think

#

I noticed this before but forgot

#

each gets the shader applied

deft nimbus
#

i'm not sure why there would be two draw operations there

urban comet
#

I think for each "thing" it drawsa it uses the shader, and because these are in the same place, we see the effects of the shader x2

#

but I might be mistaken

#

i barely understand love2d

#

and what I think are 2 distinct things probably aren't in any way

#

lol

deft nimbus
#

I believe that the "sprite" one is just the info about where on the image to key

#

yeah, the first param is the image, the second param is the quad, the next three are position, and the last two are scale

urban comet
#

those 2s are shearing factor

#

wait

#

yeah on the version with the quad, the last digitds are shearing factor

deft nimbus
#

I'm only going up to the scale factor ones though

urban comet
#

my b

deft nimbus
#

no worries, it's not exactly the clearest info

urban comet
#

what if you try the drawing function without the quad?

#

that's what I originally used for my version (not with the shaders but the main images worked)

deft nimbus
#

i think it won't know where on the sprite sheet to look, so it'll just take the entire sheet

urban comet
#

lemme find my old code

deft nimbus
#

all the other cards are drawn in the output_images function which is based on your old code, but cards that have editions by default aren't getting drawn that way.

urban comet
#

yeah I get that

#

I'm just saying that maybe the shaders would bahave using the other draw function

deft nimbus
#

I mean I am doing the other draw function for the other output and jokers with default editions aren't getting them

urban comet
deft nimbus
#

that function is using love.graphics.draw(love.graphics.newImage(newImageData),0,0)

urban comet
#

yes, do you see a quad argument, I don't

#

the whole first part is the image data

#

no comma

deft nimbus
#

i mean that's what my function is doing for non-edition cards

urban comet
#

yes, and I'm saying to do it for edition cards and it might work better. Along with actually applying the edition/shader ofc

deft nimbus
#

but it's not working for editions for the other cards right now. like bobm has the negative edition but it doesn't get output with it

urban comet
#

I'm not saying to use the exact code

#

what is not being communicated?

#

sorry if I'm getting a little frustrated

#

My thought is to do the normal set shader stuff, grab the image card data and store it like the normal draw function does, set the appriate shader, and draw it using the same method as the normal image output function

deft nimbus
#

I don't think it worked last time I tried it but I can try again. the edition stuff can't be fed into the normal draw function as is because the cards they exist on aren't exactly standard and fail the if g.asset_atli checks

urban comet
#

can't we just so set_shader without actually setting the edition?

deft nimbus
#

from the documentation calling set_shader() without params is kind of a reset

urban comet
#

I mean we can find the right shader to use without physically setting it to the card object

#

or set it to a dumy card object so we know where to find it

#

but then outpuit the shader to the real one

deft nimbus
#

...hmm, I guess so. if I wanted to I could create the blank card, don't use set_edition, but just pass along the edition info

urban comet
#

yeah exactly

#

all it is is a love2d compatible shader, right? nothing special afaik

deft nimbus
#

nothing special, you just need to know the proper key to call for either set_edition or set_shader

urban comet
#

nods

#

yeah I'm curious to see if this works, I think it very wel may

urban comet
#

so no more crash

#

I updated my mods including the exporter

#

But it does hard crash (no crash screen) upon finishing

#

but that doesn't matter tbh

#

It does crash if I have othermod installed though, which I noticed you managed to get in your export

versed rain
#

So, how's this going?

urban comet
#

we both made our websites with it

versed rain
#

Christ, I forgot about that...

urban comet
#

whats that from?

deft nimbus
#

jellymod

urban comet
#

ah makes sense

olive ingot
urban comet
#

I finally got your mod to boot, but it crashes when I try to use the card exporter

olive ingot
#

The what

urban comet
#

the thing his thread is for, like... @deft nimbus has practically hundreds of mods, and managed to export yours too, but for me it crashes

#

that's why de @'d you

#

I wasn't gonna

#

because i'm not sure it's even your mod's fault

olive ingot
#

I don't know how to make it card exporter friendly ngl

#

(Also I was gone for weeks)

urban comet
olive ingot
#

Ok

urban comet
#

(this is what the exporter does, it makes those websites)

olive ingot
#

Ok

#

Honestly I was just non-existent because I became much more busy

urban comet
#

fair

olive ingot
#

BTW I think I haven't updated othermod

#

For a month

#

So yeah that might be the problem

deft nimbus
#

@urban comet when you run your export do you have a trance theme on?

deft nimbus
#

did you notice if the output colors match vanilla or the theme?

deft nimbus
#

ok, that's what I was expecting but I never really looked at trance

urban comet
#

Yeah it makes sense

#

Your should draw other xolors from balatro so the websites can be more themed :p

winter wedge
#

Would be cool if it also changed the background based on trance config

deft nimbus
#

the background is just an image, but I guess it's probably doable

urban comet
urban comet
deft nimbus
#

you might be right, I assumed that the external script was just to a hosted image

#

shows how much I payed attention to the background

urban comet
#

I think I remember seeing the colors for the bg defined somewhere

deft nimbus
#

#define colour_1 vec4(1.0,0.3725490196,0.3333333333,1.0)
#define colour_2 vec4(0.0,0.6156862745,1.0,1.0)
#define colour_3 vec4(0.2156862745,0.2588235294,0.2666666667,1.0)

urban comet
#

It's also animated originally. And swirls based on mouse movement

urban comet
#

@deft nimbus the exporter seems unstable atm. Instead of hard crashing when done, which was fine tbh, it currently, with my current modpack (the same update I just published) freezes and hard crashes in the middle of exporting, and not even at the same time.

deft nimbus
#

hmm, possibly a memory issue? I'm not sure how easy that will be to troubleshoot

deft nimbus
urban comet
deft nimbus
#

I'm considering borrowing code from toomanyjokers to add a text field you can select specific mods you want to process

urban comet
#

Would help with debugging at least

unkempt grotto
#

👀

deft nimbus
#

some basic tags. not perfect but it should help identify jokers that do certain things.

shy mirage
#

is this using the tags PR that's being worked on?

deft nimbus
#

nope, though I do want to use those. right now it's just checking to see if a joker is using some of the basic variables

shy mirage
#

fair enough, as long as you're aware of it's existence and don't spend a load of time developing something that'll need to be redone

deft nimbus
#

most of the work was UI side, which I'll want regardless

deft nimbus
#

ok, I've updated the exporter to allow a filter list. comma seperated and you can use "Balatro" for vanilla or non-smod objects

urban comet
#

@deft nimbus I suspect the new smodded update breaks the exporter? (Likely the proper rarity system?) Crash as soon as I hit the export all button

deft nimbus
#

so that was actually cause by an accidental dependency on too many jokers that went away in a recent update.

deft sinew
deft nimbus
#

Haven't done it in a bit, sorry

deft sinew