#Lovely - A runtime lua injector for LOVE2D

1 messages · Page 4 of 1

twin bluff
#

wasn't thimking tjhat but being able to also patch buffers at runtime would be cool

#

mostly just over lovely patches can cauwse the game to crash before the crash handler has a chance to load

errant robin
#

though lovely and steamodded could work off the same file

solar pebble
#

if that's convenient then absolutely

twin bluff
#

I mean steamodded is already fairly deeply tied to lovely so I'm down

solar pebble
#

we might be able to implement a lovely runtime feature that queries the metadata for fields

errant robin
#

steamodded's side will require a main_file to actually load anything, so lovely mods could still use it without relying on anything steamodded, or optionally load something if steamodded happens to be present

twin bluff
#

actualy if you do this could I also disable other patches at runtime?

solar pebble
solar pebble
#

(and lovely itself)

#

which isn't that hard

twin bluff
solar pebble
#

ah yeah, gotcha

twin bluff
solar pebble
#

so the crash handler can catch syntax errors

twin bluff
#

yeah

#

its okay now cause I can catch then in every file except main

#

because I load it before the game requires any files

errant robin
#

i have mod.json in my drafts but I'm not fully convinced

twin bluff
#

also if it is a toml file we need a way to parse it

errant robin
#

i don't mind toml files if that makes things easier and there's a lua parser for it, but I'd prefer json personally

solar pebble
#

toml is almost always my choice because it works as a human-editable data format

#

but hmm, let me think

twin bluff
# twin bluff actualy if you do this could I also disable other patches at runtime?

okay propsal for this.
New patch type where I specifcy a buffer and file to laod. When lovely gets the request to load that file, it loads the raw text, then before applying patches, hands the buffer and patch info to my code. My code can then run and do whatever it does, then I can basically remove patches and modify the buffer however I see fit, and then I return the new patches and buffer to you, where you continue what you were doing normally.

solar pebble
#

a preload patch, if you will

#

it might be possible

twin bluff
#

thats probably bnot too important though

#

I'd worry about other stuff first

solar pebble
#

if you implement a standardized function then I can call it from native code with the buffer

twin bluff
#

might also be intresting supporting lua pattern matching as a pattern type

errant robin
#

aren't lua patterns just worse regexes

twin bluff
#

yeah but they are a bit simplere as they don't need to be escaped in strings cause they use %, and they would probably be more portable as they are included with the lua runtime

solar pebble
#

the annoying thing with that is that we need to dip into the runtime to actually apply the pattern

#

and at this point we're not working with the buffer as though it's a contiguous bit of text

#

so my bet is that we would need to do a ton of allocations to pass that data across the FFI boundary, and then do some wonky string rope manipulation to fit it back in aok

twin bluff
#

okay fair enough

solar pebble
#

I do like the idea though

solar pebble
#

I need lovely metadata to be set in an agnostic way

#

but it would also be super convenient for devs if smods and lovely were able to share

#

maybe I can ignore non-lovely fields within the metadata file

twin bluff
#

that might be nice

solar pebble
#
[lovely]
name = ""
author = ""
version = 1.0.0

# everything after this point is ignored by lovely
[smods]
...
twin bluff
#

if we are using toml could you exoirt a toml parser throguh lovely?

#

levergeing your built in parser

solar pebble
#

definitely but it would be tricky to convert the native struct as a table

#

actually it shouldn't be that hard. iirc there are several functions within lua that let you setup and define tables

twin bluff
#

yeah

#

can you just have the toml parser give you each key and value as they pop up and then you don't even need a native struct?

solar pebble
#

Rust-isms would make that harder than just converting whatever data we get to a table

#

I can probably write a macro that converts a typed datastructure to a generic table automatically

#

also I appreciate that convo in #💻・modding-dev because it reminded me to update the version of lovely on thunderstore lmao

#

also I'm weighing the idea of making a 0.8 release and then, once all of this feature stuff is implemented, going for a full release

errant robin
#

it seems a toml.lua library exists but requires loading a dll/dynamic lib file (not too big a deal though since we can do this from any location through ffi)

#

though actually i haven't explored if/how that works with mac/unix

solar pebble
#

I think that exposing this functionality through lovely is S tier, but if it's not viable then that also works

solar pebble
#
poll_question_text

lovely discord server? I'm feeling meh about it, but I'm curious to hear what you guys think.

victor_answer_votes

4

total_votes

8

true pagoda
solar pebble
#

not super surprised

#

it's a somewhat niche dev-facing tool so the userbase doesn't really necessitate its own server

#

ironically niche

solar pebble
solar pebble
#

waiting on google to let me spend my money, then we can look into lovely Android support

#

no promises

twin bluff
#

lol thats funny

#

surely theres some free love2d game on the play store somewhere

twin bluff
#

oh link disapeared

#

I hit the serrver limit

solar pebble
glad hare
potent kiln
#

I tried running the lines in the run_lovely.sh manually, got lovely to load, but then it shows a screen saying "No game"

errant robin
#

do you have a custom steam installation folder by any chance?

potent kiln
#

No, paths in the script match my installation

deep raven
celest swallow
nova talon
#

I managed to turn off windows defender and it says all my antivirus protection apps are off, and yet downloading lovely is still getting blocked sadly

celest swallow
#

downloading? you're using chrome?

nova talon
#

yeah

celest swallow
#

try using firefox

#

chrome blocks it sometimes

nova talon
#

alright

#

I dont have firefox and when trying microsoft edge it proceeded to get blocked again

#

Guess Ima download firefox

celest swallow
#

edge is chromium based so

nova talon
#

Ok firefox worked

#

yay everythings working now

#

sweet, thanks stupid

celest swallow
#

you're welcome 👍

lament drift
#

I've downloaded and put the version.dll into my balatro files, but every time I go to launch steam just deletes it

errant robin
lament drift
#

thanks, I figured it out

dark kayak
#

Windows keeps deleting the 0.5.0-beta6 file (for pokermon) after I already force chrome to keep it 😅

#

Any tips?

#

Got it! Had to disable real-time protection

celest swallow
solar pebble
#

(Plus some other fun stuff)

final void
#

👀

#

Does this also mean we’ll get a Thunderstore update for Lovely (and as a result Steamodded)?

solar pebble
#

yup

#

I'm going to let this cook for a while to make sure that everything is aok

#

and then I'll submit the version tomorrow

grave moss
#

Wow

#

I need test it now

solar pebble
#

actually yamper, you can't, I've blocked your computer from running lovely

#

(jk jk give it a go)

grave moss
#

Jsjsj

#

now i will test it with a antimatter deck run

twin bluff
#

0.5.0 never got a full release

solar pebble
#

good riddance

celest swallow
#

hell yeah

clear oyster
#

I made a PR to add patch file paths to patch log messages

grizzled tinsel
#

Possibly Lovely bug, a pattern patch that's targeting 4*G.CARD_W, is landing in a position with 4.25*G.CARD_W,.

#

God forwarding is trash wtf

#

Here I thought you jsut copied the link but nah

true pagoda
#

I know not only telegram ofc, but that's kinda the dichotomy (discord vs tele) in somr communities, so that's my point of comparison

proud arch
#

it's better than nothing

true pagoda
#

yeah I find it definitelynice to have

twin bluff
#

Imma be honest I forgot about them until thinking why that would matcv

#

Looks like under the hood it uses wild-match which does not have escape characters

clear oyster
#

...unfortunate it seems

twin bluff
#

Yeah

#

Seems like you could just use the ? Wildcard to match the * or use regex patch, although they have issues kf their own

celest swallow
#

is there no way to toggle off wildcards?

#

Maybe it could be an opt in to enable wildcards as they're rarely used anyways

twin bluff
#

not right now I don't think

#

it would probably be opt out to not break backwards compatibility

celest swallow
#

I meant in rust in general, figured that it's not an option in lovely otherwise someone would've suggested it

timber turret
#

Can someone help me figure out an issue? I followed the tutorial on the Git repo... And I get this error

#

I copied the command from the repo to the launch command on Steam

#

And I don't really get what's going on?

#

I checked the log file in the Lovely folder in the mods directory

#

stack traceback:
    [love "boot.lua"]:352: in function <[love "boot.lua"]:348>
    [C]: at 0x7ffc1b392fa0
    [C]: in function 'require'
    main.lua:14: in main chunk
    [C]: in function 'require'
    [love "boot.lua"]:323: in function <[love "boot.lua"]:126>
    [C]: in function 'xpcall'
    [love "boot.lua"]:362: in function <[love "boot.lua"]:355>
    [C]: in function 'xpcall'
#

It gives me this

#

I have no idea what this means or how to fix it...

twin bluff
errant robin
errant robin
timber turret
#

I already got it, but thanks all the same!

solar pebble
#

Oh wow thanks Discord for not showing me messages until I respond

#

Glad you figured it out!

solar pebble
#

because it's pretty inexcusable to not have them

solar pebble
# grizzled tinsel

... but in the meantime you should replace this with a regex. it won't be very complex.

twin bluff
#

I think replacing the * with a ? would work too

grizzled tinsel
#

It did get switched to a regex

solar pebble
#

also lovely's at 120k downloads on github

twin bluff
#

on my way to download lovely -120k times

solar pebble
#

Any value in being able to pin/prefer certain versions of the game?

#

Might be useful for devs

twin bluff
#

idk

#

seems difficult causwe games don't have a standard method of versions

#

at least not one I'm aware of

thick steppe
#

each platform has a depot version

mystic oasis
#

In detail how do i install the current version

twin bluff
mystic oasis
#

calls it a dangerous file

mystic oasis
#

still not letting me download

twin bluff
#

you should be able to tell your browser to keep the download

mystic oasis
#

says dangerous download blocked

twin bluff
#

is there like an arrow or something you can click for more options?

mystic oasis
#

no just says delete from history

twin bluff
#

not sure

mystic oasis
#

me either

#

i wish we used steam to mod my antivirus keeps deleting this mod

twin bluff
trim cairn
#

steam doesn't have modding capabilities all steam does is let people upload files on the workshop to get downloaded

#

it is up to the game to add modding support

neat oxide
#

When i runned lovely, it appear 2 error:

  • priority is 999999, expected to i32
  • expected "",""
fierce whale
#

whats the lovely crash report

twin bluff
#

do we not support negative priorties?

celest swallow
#

I think we do after 0.5.0-beta6?

twin bluff
#

Lovely

#

I would need it only for something to work on beta5 and before

solar pebble
#

that's unfortunate

split monolith
#

So i know that some antiviruses mark Lovely as a trojan bc it works like one, but recently it's having some strange issues. On my dad's computer, Norton (i dont personally use Norton cuz its trash) quarantined the version.dll file. So i tried to install v0.6.0, and even on my own computer, Brave browser didn't allow the download. I downloaded it with Edge, and ran it through Virus Total and got this:

twin bluff
split monolith
#

Some of those say Adware though? And it used to Download and run without much issue, but now it seems to be tripping more things, including the Brave Browser (probably Chromium in general) and Norton (which i can't for the life of me figure out how to add an exclusion)

twin bluff
#

tbh theres usually a couple weird or different results on virtus total. Lovely doesn't have ads, and if you want you can check the source code

#

Also the chrome safe download thing was one of the first to trigger on it

split monolith
#

thanks for the clarification - I've used it prior and know it's fine, but was running into weird new issues and didn't see anyone talking about it, so i thought i'd ask

celest swallow
waxen lava
#

b

errant robin
#

cba

solar pebble
tepid sonnet
#

Hi really noob dumb question but when the install instructions on github say "Open the .zip archive" does that mean I extract it first and THEN do that, or do it without extracting first. I assume extract the .zip first.

errant robin
tepid sonnet
#

Oh cool

zealous void
#

not all archiving softwares do that I think
e.g. MacOS Archive Utility

#

extracting the entire .zip is the only option

twin bluff
#

Idea a special type of module patch that just returns the full path to the passed file (or maybe an object with the full path and some other info)

#

Then we could use it on non-Lua things like shaders and images or just use it on . to get our mod path

pliant hinge
#

I keep crashing when trying to select a deck in my game and it seems to be referencing a lua file in the lovely folder in my mods folder, anyone able to help?

#

can give the full error if needed

celest swallow
#

it seems to be crashing because of cryptid glass shader

solar pebble
#

@silk creek I think I have a fix for the problem you were having last night. Let me know when you're available to try a test build out.

silk creek
#

@solar pebble Just woke up haha, should be able to test it in a half hour or so

solar pebble
silk creek
#

OK, seems to be working. Main menu screen animation is stuttering again though

#

in-game seems to be running fine

solar pebble
#

Heard. I'm not sure what the lag would be caused by. Could be Lovely, could also equally be something else.

#

I think it's a success or you're no longer crashing

silk creek
#

I have extremely limited experience with lua, but I'm kinda tempted to poke around myself with whatever was changed just for fun. Probably don't have the expertise to actually create a useful pull request, but still kinda interested to see what all was broken/fixed

pliant hinge
night elm
#

It is a fresh install of the game, only mod in the folder is steamodded

#

Both the Balatro gamefiles folder and the dll itself are whitelisted and the antivirus is turned off

#

Running on windows 11

#

Running Balatro this is what i get, the game never leaves the black screen

solar pebble
#

Make sure you're not accidentally clicking on the console window as it'll freeze the game

night elm
#

it seems to happen regardless of if i tab to the console or not

solar pebble
#

Hmm, alright. Does the game start if you delete steamodded?

night elm
#

let me see

#

it does

solar pebble
#

Hmm

#

(This doesn't require Steamodded)

#

what we're doing here is figuring out if the issue is because of Steamodded or patch injection at large

night elm
#

it does launch

solar pebble
#

Cool cool

#

When did you download Steamodded?

night elm
#

today

#

should be using the latest version on their github

solar pebble
#

That's from a couple days ago

night elm
#

do i need to change the name for it to be recognised?

solar pebble
#

To be safe, yeah

#

Just rename the folder to Steamodded

night elm
#

it is now stuck

solar pebble
#

Strange

#

How powerful is your PC?

#

And what OS?

night elm
#

12th gen i7-12650H
16gb DDR4 ram
3050ti
windows 11

#

its a laptop

errant robin
solar pebble
#

gotcha

#

mac 🙄

#

have you seen this issue before?

errant robin
#

nope, new one for me

solar pebble
#

weird

#

@night elm share the latest log file in Balatro/Mods/lovely/log when you get a chance

night elm
twin bluff
#

Hold on a sec

#

Could you try going into your steamodded folder > src and edit logging.lua, then delefs line 6 (client = socket.connect("localhost", 12345)) then try launching it

night elm
#

it works!

twin bluff
#

I've seen this once before

#

Not entirely sure why it happens

solar pebble
#

my guess is that they have a process that already has an open handle on that port

#

@night elm Windows button + R, powershell.exe, paste this Get-Process -Id (Get-NetTCPConnection -LocalPort 12345).OwningProcess, press enter

night elm
#

throws an error

#

`Get-NetTCPConnection : No se encontraron objetos MSFT_NetTCPConnection cuya propiedad 'LocalPort' sea igual a '12345'.
Compruebe el valor de la propiedad e inténtelo de nuevo.
En línea: 1 Carácter: 18

  • Get-Process -Id (Get-NetTCPConnection -LocalPort 12345).OwningProcess
  •              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : ObjectNotFound: (12345:UInt16) [Get-NetTCPConnection], CimJobException
    • FullyQualifiedErrorId : CmdletizationQuery_NotFound_LocalPort,Get-NetTCPConnection

Get-Process : No se puede enlazar el argumento al parámetro 'Id' porque es nulo.
En línea: 1 Carácter: 17

  • Get-Process -Id (Get-NetTCPConnection -LocalPort 12345).OwningProcess
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidData: (:) [Get-Process], ParameterBindingValidationException
    • FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.GetProcessC
      ommand`
solar pebble
#

nevermind then

#

that's the same that I got on my end

night elm
#

such a weird issue (~.~)

#

thank you both for the troubleshooting tho!

#

much appreciated

errant robin
twin bluff
#

Some people said they used it when I removed it

errant robin
#

yeah I recall

#

but I don't see the point of using it

twin bluff
#

The Python console does have a few features the lovely console and DebugPlus don't have

#

Actually winder if we could modify the Python console to read the lovsly logs so it doesn't need a socket

errant robin
#

surely

lone relic
#

im lost an brain to small

#

it cant find what its looking at from what i can tell

#

got fed up put json5 into the main folder and it worked

#

parrot mod that also uses lovely said

#

i hate java

solar pebble
#

... what

#

playing around with embedding lovely patch metadata within lua dumps:

#

this would be a first step towards making lovely easier to develop for. lots more ideas in the pipeline, but this is the easiest at the moment

twin bluff
#

Can't wait for this comment to screw up someone's patch

#

But yeah looks good

celest swallow
#

oh yeah I'm also worried that it might cause issues with multiline patches

twin bluff
#

I don't think it should be too bad, unless you rely on patching something after someone else patches it

#

And it needs multiline

errant robin
#

I could see at least one patch being affected by that

twin bluff
#

We've broken more patches at a time before

pliant hinge
solar pebble
vapid bramble
solar pebble
#

@twin bluff

twin bluff
#

Why am I being pinged?

solar pebble
#

another instance of the logging port causing the game to hang

stoic silo
#

So is it common for lovely to be flagged as malware, trojan and hacktool all at once?

#

its also adware apparently

#

Im extremely scared to mod balatro because of these warnings

celest swallow
stoic silo
#

gotcha

#

mods didnt show up in game, did i do something wrong

#

wait nvm

neat knoll
#

the adware one is weird, none of what lovely does is remotely similar to advertising
i mean ik this is all false positives from heuristic stuff, but adware is a particularly false positive, yk?

solar pebble
#

man I really need to start signing my releases

#

sorry about scaring you, av vendors have gotten really aggressive towards stuff like lovely as of late

errant robin
#

@solar pebble any ETA for a 0.7.0 release? extended patch targets would be kinda useful to have available, esp with SMODS.calculate_context (and to some degree SMODS.calculate_individual_effect, though that one can be hooked easier) becoming important patch targets to add custom calculation

solar pebble
# errant robin <@194524329709535233> any ETA for a 0.7.0 release? extended patch targets would ...

If everything works out then it should be sometime this week. Maybe Friday? I want to get https://github.com/ethangreen-dev/lovely-injector/pull/107 reviewed and merged before I make a release.

GitHub

Motivation
Whilst installing Lovely is fairly simple, it is a bit inelegant to require launching from the installation directory as a script. Likewise, the script does not take into account the pos...

errant robin
#

Sounds good 👍

zealous void
#

I really love the icon
taking inspiration from Xcode

solar pebble
#

🤔

#

did I forgot?

errant robin
#

idk but the PR doesn't look reviewed or merged to me

zealous void
zealous void
#

I don't mind waiting for some time longer

#

the installer method currently only focuses on Balatro

noble badge
#

@solar pebble did you ever use the VM to test the things on mac?

twin bluff
#

Random idea some kind of love.lovelylog function or smth that if it exists is called when lovely logs something (not the game)

noble badge
#

just waiting on the new lovely update

solar pebble
#

jk jk it'll be out today unless I find any major issues

noble badge
#

also working on a cool implementation to the MTJ mod https://scryfall.com/card/lci/135/brasss-tunnel-grinder-tecutlan-the-searing-rift

solar pebble
proud arch
#

Damn

proud arch
solar pebble
noble badge
#

will probably make my implementation of double sided easier

final void
#

winmerge is goated

twin bluff
lyric horizon
#

hii, mod a mod this weekend by patching the exe and then porting the diffs into lovely, went great ❤️

#

was only confused about the exact behavior of match_indent, like wondering if there's any implicit whitespace stripping(?), and then what about multiline patches, etc

#

and i'm not here to open issues or complain, great work, just sharing my hiccups >u<

#

last one is that my mod conflicts with SteamModded, so i included two patches for that hunk and (depending on whether sm is installed or not) one always fails. this seems kida topical given the new patch scope feature, and it'd be great to be able to specify a-la times that one patch is for sm and one isn't (suppressing spurious applications/warnings or emitting one if both apply)

#

so, 'whitespace docs' and 'is there an idiom for that' ❤️

twin bluff
#

yeah by default it will strip whitepsace to match your target (so you don't need like 8 tabs In your target).

#

And for the patches failing we just suck it up (or try to find something else to patch)

#

it might be nice to group patches though so if one of the group fails it's okay but if both it warns

lyric horizon
#

alternatively: compat patches in a sep. file, dependent patch-sets that error if they don't pass/fail unanimously (think init/free pairs), or a particularly clever regex c:<

#

i don't usually mod things so idk what communities have the most interesting tooling, vry curious but beside the point -- thx for making in happen on an accessible foundation here c:

solar pebble
#
[patch.pattern]
identifier = "some_id"
err_hook = "set some_id.errored true"
can_error = false

# other patch
[patch.pattern]
err_cond = "some_id.errored is true"
#

or something

#

idk

stuck vapor
#

@solar pebble sorry to bother you but saw you’re active right now! Any ideas as to why my mod menu isn’t appearing?

solar pebble
#

no worries! do you have smods installed?

#

lovely by itself will only show that fancy console window

stuck vapor
#

I do! It’s in my mods folder

solar pebble
#

Is your mod folder next to Balatro.exe?

stuck vapor
#

It’s in the Balatro folder where the Balatro application is, so I think so?

solar pebble
#

figured! move that mods folder to %AppData%/Balatro/Mods and you'll be golden :-)

#

well move the folder named Mods to %AppData%/Balatro

stuck vapor
#

Should my version.dll be there too or does that stay in the other folder?

solar pebble
#

nope, version.dll will always live next to the Balatro application (Balatro.exe)

stuck vapor
#

AH it worked!! Thank you so much I’d been struggling for over an hour trying to figure that out. You’re the best!!!

solar pebble
#

no worries! never be afraid to reach out if you're having a hard time. mods can be tricky :-)

zealous void
#

the instructions clearly say game directory and mod directory are not the same jimbo_spin

true timber
#

What's the syntax like to do a lovely patch in another mod?

errant robin
#

modid is _ for smods itself

true timber
#

Ty

clear oyster
#

What would the patch be for a non-smods mod

twin bluff
#

depends how it's loading

#

if it's a lovely module then it will be =[lovely modulename "path/to/file.lua"]. With lovely 0.7.0 above you can add --dump-all to lovely and then you can look in your dump folder for the right file and the txt file beside it will have it's target

clear oyster
#

So can Cartomancer now dispense with that weird hack of wrapping the nfs module to patch the Steamodded file in lua

errant robin
#

yes

ornate vector
#

how would i use the --dump-all utility? struggling to find info on that

#

im sure its some obvious console thing but i dunno

#

ohh figured it out

#

for easy searchable reference for others: you go into the properties for balatro on steam, then add --dump-all to the launch options here

#

maybe i'm the only one that's confused about this but maybe i'm not and this will be useful to someone

zealous void
#

Idek how to put --dump-all in run_lovely.sh lmao

solar pebble
#

iirc run_lovely.sh --dump-all should work

#

otherwise replace LD_PRELOAD=liblovely.so love Balatro.exe "$@" with LD_PRELOAD=liblovely.so love Balatro.exe --dump-all "$@"

bitter perch
#

Hello there

#

Is there a way to conditionally load a lovely patch if a specified mod is present?

twin bluff
#

No

#

Lovely patches are code so you can just do an if statement in your patch

#

Or if your patch is simple enough you can use hooking instead of patching

bitter perch
#

I see. Thank you

grizzled tinsel
twin bluff
#

this is an update lovely momenty

grizzled tinsel
#

Still has the "panic in a function that cannot unwind" which isn't an update lovely moment.

#

Pretty sure that's still a thing in 0.7.1

twin bluff
#

that just happens after ever panic and isn't userful\

grizzled tinsel
#

something something 98%

crimson ivy
earnest pine
#

Unsure if this is related, but does anyone know the fix for lovely essentially crashing every .exe i try to run?

earnest pine
#

It's doing this for two seemingly unrelated programs im trying to launch (an itch.io game and the setup for docker desktop installer?)

solar pebble
earnest pine
#

updated it to 0.7.1! same issue

solar pebble
#

did you delete the lovely .dll from your downloads folder?

#

It'll either be version.dll or dwmapi.dll

earnest pine
#

dwmapi.dll was the culprit!

solar pebble
#

that's the one!

earnest pine
#

my god i was pulling my hair out

solar pebble
#

there's a reason why lovely is now a .zip :-)

#

you're absolutely not the first person that this has happened to haha

earnest pine
#

homeworks late but at least i can do it now lmfao

solar pebble
#

well dang, you can blame me if you want. not sure if your teacher would get it though

earnest pine
#

youre a lifesaver thanks!

solar pebble
#

np! good luck with your homework

twin bluff
#

would it be possible to show lovely version in panic messages or is that too much a concern of causing issues

twin bluff
#

so I can use less brainpower in doing support for lovely panics

rustic pendant
#

I've just gone down a rabbit hole trying to figure out why the stacktraces cuts off the chunk name which would show the offending file. Got all the way to the lovely injector code where it creates the chunk, and it doesn't quite match up with what I'm seeing

#

I don't see why the name would be cut off or end with a right bracket

#

This is the only useful thing I need from the stacktrace and it's cut off for a reason I really can't find. Any insights?

#

I'm at least reasonably sure that steammodded is not cutting off any strings, it comes straight from debug.getinfo

solar pebble
#

@twin bluff this is more relevant to you i think

twin bluff
rustic pendant
#

I'm not a modder just a user

#

Just happen to be able to read stacktraces and source code

twin bluff
#

yeah I think its just a thing that lua does where it truncates long chunk names and it decided to truncate the end and not the beginning

rustic pendant
#

But that's on lovely then, right? It should keep patched in chunk names shorter so the important parts are included

#

Rather than just dumping in the entire file path

solar pebble
#

nah, lovely doesn't have anything to do with chunk names

twin bluff
#

No it would be howbeer the mod dev is loadng the chunk and luajit

rustic pendant
twin bluff
#

That's only for lovely modules

solar pebble
#

that's specifically for module patches and they follow a chunk naming pattern of =[lovely {}...] so they're pretty easy to identify (and short)

clear oyster
#

Does lua just lop off the end of the chunk name as soon as it gets a long one, or can it be salvaged somehow

twin bluff
#

I believe that there's 2 copies of the chunk name, a short a and longer one

twin bluff
solar pebble
#

Ya I guess I forgot to tell you

#

forgive me

twin bluff
#

That's it you're my sworn enemy now

waxen lava
#

is it lovely that's dumping all the .txt files?

#

if so thats annoying

errant robin
#

It is, they contain buffer names

waxen lava
#

its twice as annoying to navigate dumps now

solar pebble
#

hmm

#

2 * 0 = 0

#

job done

#

wouldn't hurt to make it easy to turn off I suppose

sterile anvil
#

what's the point of them?

zealous void
#

buffer names for you to specify when declaring patch targets

twin bluff
#

tbh I'm for keeping them

#

you're not really meant to navigate dumps that much and it's nice having the name of the buffer output for weirdly named buffers and makes it easier to find what to target when combined with dump all

gilded barn
#

Any chance of a payload argument for patches.copy, for when the patch is only a line or two and a unique lua file feels excessive?

#

Or is there a way to specify EOF to patches.pattern?

#

Should have led with that question

errant robin
#

$(?!\n) works for that I think

gilded barn
#

Ah right. I had a crack with regex, trying to match for $(?![\r\n]) but with no success

#

Will that check through the entire file contents before finding a match, or is Lua's implementation smart enough to jump straight to EOF?

errant robin
#

it'd be rust if anything, but regex is inefficient so it probably goes thru the entire file if I had to guess

gilded barn
#

Hm, same issue as with my attempt, UnsupportedLookAround

#

Seems like the rust-lang regex doesn't support lookahead at all, that's surprising

#

For now i think the most robust way might just be patches.copy with a single-line lua file

errant robin
#

interesting, guess I've never actually tried to do that

gilded barn
solar pebble
#

at least possibly

#

it's been a while since I've played with lookarounds

gilded barn
#

Would you be comfortable with complicating patches.copy a bit more to handle a payload argument instead of file sources?
#1214591552903716954 message

#

It's far from a critical feature, but would let me remove my single-line init.lua file

#

Targeting a single line near the end feels a bit too brittle if there are future changes, and my best efforts with matching EOL with regex have failed

solar pebble
#

very reasonable request, I'll take a swing at this after work today

gilded barn
#

Thanks!

frosty ruin
#

heya. game is crashing, and i am unsure why. I haven't played in god knows how long sooooo.... i dunno what the hell im doing.

#

Oops! The game crashed:
main.lua:2078: bad argument #1 to 'load' (function expected, got nil)

Additional Context:
Balatro Version: 1.0.1n-FULL
Modded Version: 1.0.0~ALPHA-1420a-STEAMODDED
LÖVE Version: 11.5.0
Lovely Version: 0.7.1
Platform: Windows

Stack Traceback

(3) global C function 'load'
(4) main chunk of file 'main.lua' at line 2078
(5) global C function 'require'
(6) LÖVE function at file 'boot.lua:323' (best guess)
Local variables:
c = table: 0x28859538 {identity:false, version:11.5, accelerometerjoystick:true, modules:table: 0x28859588 (more...)}
openedconsole = boolean: false
confok = boolean: true
conferr = nil
(7) global C function 'xpcall'
(8) LÖVE function at file 'boot.lua:362' (best guess)
Local variables:
result = boolean: true
(9) global C function 'xpcall'
(10) LÖVE function at file 'boot.lua:377' (best guess)
Local variables:
func = Lua function '(LÖVE Function)' (defined at line 355 of chunk [love "boot.lua"])
inerror = boolean: true
deferErrhand = Lua function '(LÖVE Function)' (defined at line 348 of chunk [love "boot.lua"])
earlyinit = Lua function '(LÖVE Function)' (defined at line 355 of chunk [love "boot.lua"])

gilded barn
#

At what point does lovely create dump files? Is it after pattern and regex patches but before copy and modules?

errant robin
gilded barn
#

Including copy patches? I'm not seeing them showing up Sorted!

errant robin
#

look harder, they definitely show up in the dumps from my experience kk

gilded barn
#

It wasn't auto-updating in VSCode

#

Deleting showed it all immediately

gilded barn
#

That would make sense, i suppose it's not necessary to dump modules because they'd be unmodified

#

--dump-all did the trick, but causes a panic with error for target =[SMODS Handy "config"] contains a non-terminating null char: NulError

errant robin
#

... huh

gilded barn
#

Handy also manages its own config in a very unusual way with compress_and_save("config/Handy.jkr", Handy.config.current) instead of using the Steamodded-friendly lua-based config

errant robin
#

uh huh

tight carbon
#

Game saves all data in such way. Is it wrong?

errant robin
#

this means not only can it be patched by lovely without such complications, but it can also be edited manually

tight carbon
#

So I should replace it with love.filesystem.write("config/Handy.jkr", STR_PACK(Handy.config.current))?

#

Looks like it's works

bitter perch
#

Guys, is there any partciular reason why the same lovely patches, from the same mod, with the same modlist, would load for an user but not for another one? (the two users are using the same smods/lovely version)

gilded barn
#

Sounds like a riddle asked by a hunchback at the gates of a labyrinth

bitter perch
#

Lmaooo

#

I'm having trouble helping someone that has the same mod version as me and same smods/lovely, but their patches are apparently not loading, but mine are

#

Which makes no sense to me

gilded barn
#

Need more info about the nature of the problem. My bet would be their antivirus removing Lovely's .dll though

gilded barn
bitter perch
gilded barn
#

Disabling the mod in Smods' Mod menu will do that

bitter perch
#

It was enabled, but still not loading them patches

twin bluff
#

Are they on a different platform

#

The platform shouldn't matter on lovely 0.7.0+ but it did on older ones and it's possible there's some unknown bug

pine nebula
#

seems like patching other mods is broken on macos

twin bluff
#

How so?

pine nebula
#

this patch does not work on macos

obtuse dragon
#

so ive been trying to get mods to load, but when i go to extract the lovely file it doesnt unpack properly and it just says file type dll and not application extension...would anyone know how to fix that

twin bluff
#

that might be fine

#

if you follow the rest of the steps does it load?

obtuse dragon
twin bluff
#

you

#

I don't have my mac avaible to test the mac issue rn

obtuse dragon
#

balatro loads, but i dont get the mods tab in game

twin bluff
#

is there the console?

obtuse dragon
#

im very new to modding..sorry you might have to explain a bit more

twin bluff
#

when you launch balatro, does a second black window come up?

obtuse dragon
#

yeah is this what you mean

twin bluff
obtuse dragon
#

thanks!

pine nebula
#

@solar pebble ok so I'll put it here again just for the record so the patch that patches another steamodded mod doesn't work on macOS

#

works fine on Windows

twin bluff
#

can you run it with --dump-all and see if it dumps those

pine nebula
#

the patched files?

#

i don't recall any steamodded files being dumped at all

#

someone told me to run that already

twin bluff
#

and which version do you have?

pine nebula
#

0.7.1

twin bluff
#

okay and what does your dumps folder look like with --dump-all

pine nebula
#

pretty sure this was the output

twin bluff
#

interesting

twin bluff
#

Seems like lovely modules are not accessible in threads

#

print also doesn't seem to work in said threads (idk if they work on bog standard love)

junior ruin
#

Does lovely work on steam deck?

neat knoll
#

it should, steam deck is basically linux in a valve-shaped hat

junior ruin
twin bluff
#

@solar pebble I can confirm on my mac dump-all doesn't seem to detect SMODS and similar dumps

#

seems to work on linux native though which is odd

gilded barn
errant robin
#

there's been a very small amount of talk about it in the lovely discord

gilded barn
#

TIL there's a separate discord

gilded barn
#

I'll prepare myself for a whole new wave of the same 4 issues being posted in #⚙・modding-general but with the Cooler Daniel installation folder instead

zealous void
#

is there a way to add mod dependency conditions to lovely patches

errant robin
#

not directly as lovely doesn't know what mods you have beyond their folder names. you can either bake the condition into the patch payload or have multiple patches where only one ever hits depending on what mod is or isn't loaded

zealous void
errant robin
zealous void
#

I'm already using the latter
the former is interesting thonk

#

I'm trying to make my Vietnamese mod no longer depend on smods by having it load an alternative patch when smods is not around

gilded barn
cerulean helm
#

@solar pebble Sorry to bother, any update on the Xbox PC Mod Support?

solar pebble
#

working on it tonight after I've finished up work

#

shouldn't be overly complex

lilac rapids
#

Hyped! Thanks in advance!

cerulean helm
#

LETS GO IM SO HYPED

#

@solar pebble thank you for working on this project, take as much time as you need

solar pebble
#

I indeed worked tonight, made some progress. It's ending up to be more complicated so I'll need to rework some parts of lovely before I can make a release.

#

Most important is a proper sig scanner so we can figure out where all the doodads are in memory.

pine nebula
#

and also maybe macOS other mod patching fix (i can help test)

twin bluff
#

I'm not sure why thatd happening

plucky reef
solar pebble
#

I'm planning on reviewing all of the PRs tomorrow. Didn't end up having time to work on GamePass support today, had other plans.

celest swallow
#

so uh is there still no easy way to patch smods files or is it just not in the readme

#

if patch relies on mod folder name then it's still not great (because anyone can name folder however they want)

errant robin
#

'=[SMODS _ "src/utils.lua"]', '=[SMODS modid "path/to/file.lua"]'

celest swallow
#

okay

#

I'll test, thanks

celest swallow
#

any plans on adding "alternative" patch target? not entirely sure how good of an idea it is, but in my silly lovely patches at home I needed to support patch pattern for 2 different steamodded versions.
logic would be that if main patch target couldnt match anything in the file, alternative pattern is used

celest swallow
shut merlin
#

does bit defender hate lovely or something? I tried making exceptions and even disabling it it still keeps quarantining it. I uninstalled bit defender and game and mods run just fine, reinstalled bit defender and the game just wont open

pine nebula
#

the issue is that patching other mods on mac does not work

#

please refer to the directory on line 2 of the file for platform

solar pebble
#

gamepass support is almost there

#

just fixing some weird bugs and I think we'll be golden

solar pebble
#

damn gamepass got hands

junior ruin
#

It always does

twin bluff
storm tusk
#

will there be instructions on how to get mods set up on the game pass version once it gets supported?

lilac rapids
#

Probably delete the whole github page as well just to spite us

nova terrace
#

Hey got a Question my Windows Defender pops up the whole time and says there is something wrong with the dll is that normal ?

neat knoll
#

yeah
lovely works by injecting code into balatro while it runs, which is also a thing viruses do, so antivirus programs are like "holy shit potential virus‽¿?”

tropic cipher
#

Oops! The game crashed:
main.lua:4064: bad argument #1 to 'load' (function expected, got nil)

Additional Context:
Balatro Version: 1.0.1o-FULL
Modded Version: 1.0.0~BETA-0305c-STEAMODDED
LÖVE Version: 11.5.0
Lovely Version: 0.7.1
Platform: Windows

Stack Traceback

(3) global C function 'load'
(4) main chunk of file 'main.lua' at line 4064
(5) global C function 'require'
(6) LÖVE function at file 'boot.lua:323' (best guess)
Local variables:
c = table: 0x230beff8 {identity:false, version:11.5, accelerometerjoystick:true, modules:table: 0x230bf048, gammacorrect:false, title:Balatro, externalstorage:false (more...)}
openedconsole = boolean: false
confok = boolean: true
conferr = nil
(7) global C function 'xpcall'
(8) LÖVE function at file 'boot.lua:362' (best guess)
Local variables:
result = boolean: true
(9) global C function 'xpcall'
(10) LÖVE function at file 'boot.lua:377' (best guess)
Local variables:
func = Lua function '(LÖVE Function)' (defined at line 355 of chunk [love "boot.lua"])
inerror = boolean: true
deferErrhand = Lua function '(LÖVE Function)' (defined at line 348 of chunk [love "boot.lua"])
earlyinit = Lua function '(LÖVE Function)' (defined at line 355 of chunk [love "boot.lua"])

Someone help

pine nebula
#

damn gamepass got hands

gilded barn
#

Is recursive mod folder loading a feature on the roadmap? It would fix the common issues caused by nested mod folders that a lot of newbies run into, and also solve a challenge for BMM and similar mod managers trying to distribute feature mods consisting of multiple sub-mods.

grizzled tinsel
#

From what I remember, no. There’s a manifest which iirc would allow for extra folders besides lovely to search for but I’d imagine said manifest would have similar depth rules that lovely injects do already.

#

Imo, it doesn’t fix the problem it just acts as a band-aid.

#

Sure current mods it wouldn’t be a problem, but anyone in the future could have a double-nested mod repo and have this bug happen the same way it would now for nested mods.

gilded barn
#

What are the obstacles to implementing it? Is it more complex than recursively searching for lovely.toml and lovely/*.toml files?

grizzled tinsel
#

That I don’t know, I figure this has been discussed in the lovely discord but I forgor to join and I can’t the link anywhere.

gilded barn
#

It took me a while to find when I went hunting a month ago. Not sure if it's meant to be sneaky and semi-private, but: https://discord.gg/qJCEquPKB8

#

Couldn't find any mention of nesting or recursive searching

twin bluff
gilded barn
#

Making patch sources and patch file locations less obvious would be a downside, but could be fixed by adding some basic mod metadata to patch files. Just an id would be enough, right?
Deriving patch metadata from folder name and structure doesn't seem like a great solution regardless of whether nested folders are allowed or not.

I'd suggest .lovelyignore would just ignore any .toml files in the same folder and not recurse any child folders of that.

shut bramble
#

Hey! idk how easy it would be, but I think it could be a great idea to make old lovely terminals close when disabling/enabling mods directlly from the mods option? i often find myself having 2-4 lovely terminals in the background and it's harder to navigate through other windows using alt tabs

celest swallow
#

or use regex, I guess

twin bluff
#

There's a more clean way of restartinf but it's not compatible with lovely so it can't be used

shut bramble
#

that's sad, thanks for the info though!

zealous void
#

speaking of which, auto-restart when enabling/disabling mods or pressing R in crash screen doesn't work on Mac

#

this thing

twin bluff
#

yeah smods might be messing with something

#

oh it could be the pwd

fiery crest
#

hello, i was wondering about a rare use case, not sure if i should create an issue for it on github. does lovely actually work with anything other than balatro.exe on windows? on linux i can bundle a game by zipping it then doing cat $(realpath $(which love)) game.love >game and use lovely on it by doing LD_PRELOAD=/path/to/liblovely.so ./game, but when balatro is packaged with cat on windows and has version.dll in its dir, lovely prints logs during the game's startup but none of the patches take effect

twin bluff
#

That should work. Are you sure your mods are in the right spot? On windows they would be in your wineprefix's appdata. You can probably find it with find ~ -name lovely if you don't know where that is

#

Also if you run wine manuskly it has a different pregix then when run through steam

neat knoll
errant robin
#

talisman.lua is just appended to main.lua, so you would target it by patching main.lua with a priority greater than that of the copy patch that does this (that priority being 0)

#

for other files loaded by talisman, I don't think it follows those naming conventions

neat knoll
#

ah i see

cerulean helm
#

Out of sheer curiosity, any updates on the Gamepass mod support?

twin bluff
solar pebble
#

I've been playing with it and it's still largely unstable

#

But we're getting there

solar pebble
blissful venture
#

peak actually

cerulean helm
#

Take your time champ, we rooting for you for ya

pine nebula
#

thank you for your work

solar pebble
solar pebble
harsh glacier
solar pebble
#

Gotcha, had no idea. Appreciate it

harsh glacier
#

No worries, sorry about the forwards

#

don't have much time to write

solar pebble
#

Totally fine, it provides more context than copying and pasting anyways

zealous void
#

at least invite links are allowed here

twin bluff
#

I mean it wasn't deleted

solar pebble
#

gamepass

#

experimental gamepass support. smods is probably broken so try it with DebugPlus.

blissful venture
#

MASSIVE

solar pebble
#

this one will do a better job at telling you when an error occurs (since gamepass doesn't seem to have a crash handler)

#

what I NEED is for people to test out DebugPlus with this

#

lovely is installed into C:\XboxGames\Balatro\Content and mods are installed into %AppData%/love/Mods

slender mason
#

I tried with debugplus, debug works but it doesn't open the console with . should I change something?

lilac rapids
#

Crashed at launch with these mods (Cryptic v0.5.5 and Balatro Ultimate Speedup Mod-152-v1-00-1737377317)
I'll try debugplus next

#

With debugPlus it launched

#

(I removed the cryptic mod and it's dependencies)

true timber
#

Have you tried using Nopeus as a speed-up mod instead or this is a gamepass test?

lilac rapids
lilac rapids
#

Nopeus crashed the game when I openned the settings

#

And I don't even get a message to show you guys. Everything closes instantly

#

Also, what's the key to type commands with DebugPlus?
I tried my / key and it does nothing

#

Maybe it's because I have an Azerty keyboard?

#

Nevermind, it's my "other" / key, the one that looks like this "➗"

true timber
#

You and me, never got to make it work either

#

Maybe there's a setting to change the keybind?

lilac rapids
slender mason
solar pebble
#

cool, glad it's been working. anything that depends on smods will be broken until they fix things on their end, so don't expect to play any modded content

solar pebble
#

you wont get a crash screen, it just dies

lilac rapids
lilac rapids
deep raven
#

the crash handler is there by default on steam

#

hence why debugplus doesnt add one

clear oyster
#

Can we detect if there is a crash handler or not

#

Or do we just have to hardcode that "gamepass doesn't have a crash handler, we'll install one"

twin bluff
#

you can just extract smods crash handler and use it standalone

solar pebble
#

^ is probably the fi

#

x

#

Anyways I'm no longer going to support the Steam version

thorny oyster
#

crazy

eager star
#

Lovely injector was flagged as a Trojan/malware by my antivirus. Got it from the official GitHub page. Anyone else have this problem?

azure seal
#

it's because it's an injector

#

and antiviruses don't really jive with that

eager star
#

Preciate the help 🙏

ivory void
#

antivirus and the web browser itself fucking yeeted my download into nothingness

no literally

  • regular download: Network error
  • unzipped download: Insufficient Permissions
errant robin
#

it tends to do that

ivory void
#

What other download options do i have left? Or is my PC not worthy of Lovely Injector?

gilded barn
ivory void
violet cradle
gilded barn
violet cradle
#

ok thank you

spring garnet
#

is there xbox game pass support?

solar pebble
#

somewhat. you can find it in the lovely discord

#

lovely itself works fine but mod support isn't very consistent

junior sand
solar pebble
#

@frank birch ^^ feel free to join the lovely server as well

#

it would be a better place to chat about your pr and general dev stuff

glad silo
#

i cant extract the verison dll. it says i need administration permission but ti snot giving me the promt to input my passowrdD?

solar pebble
#

no mac binaries yet because the CI is broken

zealous void
junior sand
#

lovely 0.8.0 pre-release 👀

#

what's the difference for other mod devs?

gilded barn
#
+ added good thing
- removed bad thing
junior sand
#

I should make that my next changelog

twin bluff
# junior sand what's the difference for other mod devs?
  • Mac can patch smods loaded stuff properly
  • module patches without load_now now ignore the before (Its now optional) and are just always accessible. Allows moduels to be loaded in threads without specifying multiple patches
  • the lovely module is now always accessible. Allows it to be accessed in threads and also when restarted using loves methods
  • print now works in threads
  • no longer panics if an extensionless file is in the lovelt folder (I think)
zealous void
#

rested-in-peace mac users waiting to be revived

twin bluff
#

Once I get home from work I can make a Mac build

zealous void
#

me using Lovely-integrated LuaJIT: I am 4 parallel universes ahead of you

twin bluff
#

(The lovely integrated build doesn't have the new module patches IIRC)

zealous void
#

at least I don't have to use that immediately, my last mention of it in lovely server really sucked and there already existed a non-patch solution

solar pebble
#

the Mac fix took a ridiculous amount of effort to fix

#

it doesn't seem like it after the fact but man, that sucked

twin bluff
#

Mac builds uploaded to release

#

@solar pebble I didn't promote it to the latest rleease idk what your process is

solar pebble
#

sweet, thanks!

#

how do the release notes look?

twin bluff
solar pebble
#

tweaked it a bit

#

I've also updated lovely on thunderstore

#

and it should be available in BMM

twin bluff
#

Looks good.

#

Technically this isn't true for load_now modules but whatever

solar pebble
#

yeah

#

fixed

zealous void
#

lovely crashes when using --dump-all
and just stops responding when not using it

#

ehhh, it's probably caused by some mods 💀
I ran again with only smods and it's totally fine

#

sucks to be backward incompatible

solar pebble
zealous void
#

it doesn't crash on 0.7.1

#

I've been using 0.7.1 the whole time it was Talisman 💀

gusty pagoda
#

uh............

neat knoll
#

you have a mod which is trying to apply a two part patch, and only one part is succeeding

#

there's a reasonable chance that the mod in question has an update which fixes this

gusty pagoda
#

hmmm ok

#

is there a good way to figure out what mod that is

neat knoll
#

method 1, you can manually disable mods by creating an empty file named .lovelyignore in their folder, so do that one by one until it stops crashing
method 2, look near line 489 of functions/common_events.lua in your lovely dump for anything different from vanilla code and search the mods folder for .toml files containing a relevant string

method 2 is usually faster but it has more things that you have to know how to do

gusty pagoda
#

oki

#

i uh... i had different versions of crypid by accident

#

me when im stupif

neat knoll
heady steeple
#

so ive tried to delete all my mods whilst still having lovely, but whenever i check my deck ingame i get this crash

#

any suggestions?

solar pebble
# heady steeple any suggestions?

This is probably caused by you removing all of your mods, not by Lovely. You'll need to figure out which one it is by readding them one by one

#

Start with smods, obviously

heady steeple
#

ok

#

but i want to be able to still get achievements

#

which i cant do with any mods i think?

#

so im trying to completely reverse it to its vanilla state

#

@solar pebble forgot to ping

solar pebble
heady steeple
#

doesnt crash anymore

#

thx

solar pebble
#

working on dev tooling

fiery crest
#

you can run LOVELY_MOD_DIR=$(mktemp -d) Balatro.exe to launch the game in "vanilla mode" without having to delete version.dll or temporarily undo any of lovely's setup
unfortunately LOVELY_MOD_DIR=/dev/null results in a segfault

fiery crest
twin bluff
fiery crest
#

--vanilla panics and segfaults for me

$ nix run /home/misc/work/ana/balatro -- --vanilla
INFO - [♥] Lovely 0.8.0
INFO - [♥] Running in vanilla mode
ERROR - [♥] lovely-injector has crashed:
panicked at crates/lovely-core/src/lib.rs:470:75:
called `Option::unwrap()` on a `None` value
ERROR - [♥] lovely-injector has crashed:
panicked at library/core/src/panicking.rs:225:5:
panic in a function that cannot unwind
thread caused non-unwinding panic. aborting.
Aborted (core dumped)
#

on 0.8.0, built from aec360bd8ca86da8191852f469fae4b2940d10f9 (current master HEAD)

solar pebble
#

huh

#

you don't need that --

#

unless that's a nix thing

fiery crest
#

it's a nix cli thing yeah

#

otherwise nix would consider vanilla on option passed to it and fail because it's unrecognized

#

i can try to repro it on mint or sth

solar pebble
#

if convenient. the arg parser needs to be replaced, it's been causing issues

fiery crest
# solar pebble if convenient. the arg parser needs to be replaced, it's been causing issues

was able to reproduce it on mint and arch, without any nix packages or nixos non-standard fuckery. so it's probably a linux wide issue (?)

$ wget --progress=bar:force:noscroll \
    https://github.com/ethangreen-dev/lovely-injector/releases/download/v0.8.0/lovely-x86_64-unknown-linux-gnu.tar.gz \
    -O - | tar -xzf -
# -- irrelevant output --
$ LD_PRELOAD=$PWD/liblovely.so ./love-11.5-x86_64.AppImage Balatro.love --vanilla
INFO - [♥] Lovely 0.8.0
INFO - [♥] Running in vanilla mode
INFO - [♥] Lovely 0.8.0
INFO - [♥] Running in vanilla mode
INFO - [♥] Lovely 0.8.0
INFO - [♥] Running in vanilla mode
ERROR - [♥] lovely-injector has crashed: 
panicked at crates/lovely-core/src/lib.rs:470:75:
called `Option::unwrap()` on a `None` value
ERROR - [♥] lovely-injector has crashed: 
panicked at library/core/src/panicking.rs:225:5:
panic in a function that cannot unwind
thread caused non-unwinding panic. aborting.
Aborted (core dumped)
#

(my nix package runs native love, for other distros i used the appimage since it was already there in the drive shared between VMs)

#

same error with arch's love-11.5 package, except no repititions of "Lovely 0.8.0" and "Running in vanilla mode"

$ LD_PRELOAD=$PWD/liblovely.so love Balatro.love --vanilla
INFO - [♥] Lovely 0.8.0
INFO - [♥] Running in vanilla mode
ERROR - [♥] lovely-injector has crashed: 
panicked at crates/lovely-core/src/lib.rs:470:75:
called `Option::unwrap()` on a `None` value
ERROR - [♥] lovely-injector has crashed: 
panicked at library/core/src/panicking.rs:225:5:
panic in a function that cannot unwind
thread caused non-unwinding panic. aborting.
Aborted (core dumped)
solar pebble
#

Ah, this is probably due to a logical error in how we setup the lovely rt when mods are disabled.

#

Line 470

#

It looks like inject_metadata is still being called even in vanilla mode, which refers to self.loadbuffer, which hasn't been properly set

#

I'll get a PR up for this sometime this weekend. How pressing is the issue?

#

IIRC you can also try with --disable-mods. (don't ask why they both exist)

solar pebble
#

gotcha

#

yeah , I'll get a fix out this weekend

fiery crest
#

and the issues isn't pressing at all, i have my LOVELY_MOD_DIR=$(mktemp -d) hack anyway

solar pebble
#

ok!

#

thanks for the report. I rarely use Linux nowadays (not by choice) so I never would've caught this.

fiery crest
fiery crest
#

patch_table = not loadbuffer =, was a typo

solar pebble
#

argument parsing is such a mess in lovely good god

#

the correct solution here is to (inside of lovely-unix) check for the --vanilla flag and, if present, immediately return from the ctor function.

#
    if args.contains(&"--vanilla".to_string()) || args.contains(&"-v".to_string()) {
        return 1;
    }
#

that is a sufficient hack. we'll likely redo it when we get around to refactoring arg management

fiery crest
#

(the otherwise in question is when i tried RUNTIME.get().map(...).unwrap_or anything)

junior sand
#

Heya Meth (or whoever else can answer this question), what's the lovely-x86_64-unknown-linux-gnu.tar.gz release for? The manual instructions for proton/wine specify the user should get the windows version

gilded barn
#

Possibly for other Love2D games with proper Linux builds?

junior sand
#

Ah. Yeah that could make sense

twin bluff
#

or if you run balatro natively

junior sand
twin bluff
#

I do

#

but usually the people who do that are smart emiugh

junior sand
# twin bluff I do

Of course you do. No need to add it to the install instructions though right?

twin bluff
#

yeah it's fine

twin bluff
#

my server does balatrojoker

junior sand
fiery crest
#

(btw)

twin bluff
#

well just non-pc

fiery crest
#

yeah but it implies the official windows & mac builds

twin bluff
#

not really

#

also running the offical build with a native engine is still the offical build

fiery crest
#

can you run Balatro.exe on linux without unpacking & repacking it?

#

never tried that

twin bluff
#

yep

#

love Balatro.exe

#

doesn't even need to be renamed

fiery crest
#

definitely counts as the official build yeah

twin bluff
#

to be fair old steamodded literally modified the build

fiery crest
#

there's no rule against modifying the builds, ive always taken "only PC modding" to mean don't port to or pirate mobile

fiery crest
lone vigil
#

I'm having an issue where the lovely window isn't popping up. I'm on a mac (os15.6) and am using these instructions https://github.com/Steamodded/smods/wiki/Installing-Steamodded-mac . I have it placed correctly in the in the same folder as the application and am using terminal to start the game. any help would be really appreciated!

GitHub

A Balatro Modding Framework. Contribute to Steamodded/smods development by creating an account on GitHub.

twin bluff
#

Lovely does not have a window on macos, that seems to be a mistake in the guide. You should see a bunch of lines in the console that look vaguely like INFO - [G] XXXXXXXXX

lone vigil
#

thank you!

junior sand
#

I can also create a PR, but I'm still very unfamiliar with how modded balatro works on mac

twin bluff
#

I updated the main parts but the troubleshooting stuff nerds to be redone still

#

Am.on phone so I'm not doing it now

junior sand
#

thanks

#

yeah will still need to update the common issues section to remove all the stuff about "second window", and preferably have the full error message when lovely fails to find balatro (I have no idea what happens in such cases)

short yoke
#

I've got some problems with lovely where it has an error going in every game I try to launch, any ideas on how to correct this ?

celest swallow
#

(if you are trying to remove lovely)

torn inlet
#

Having problem with setting up Smods

twin bluff
#

good mod

solar pebble
#

just gives you a nice way to tell how the patches applied

solar pebble
solar pebble
errant robin
#

lovely virus?

solar pebble
#

New update, not super functional but I mainly want to hear about performance in the project scope

#

big chunky timeline viewer

#

navigation is pretty messed up still but you can sorta navigate it righ the arrow keys

solar pebble
#

current iteration

#

fixed a lot of bugs by making the internal timeline authoritative

#

it's starting to work well I think

solar pebble
#

@dull aspen still making mods?

#

I just want to chat about your android support pr

dull aspen
#

hi yes

twin bluff
# dull aspen hi yes

oh hi not sure if this is the best place to talk about it but we were kinda not sure about the android pr as we have some other methods now and some other stuff
Mostly was wondering

  • how would this be distributed (would it just be have to build it from source?)
  • does it make sense for us to have several techniques for android?
acoustic stump
#

idk whats happening here

#

Oops! The game crashed:
Syntax error: card.lua:1461: '<eof>' expected near 'end'

A bad lovely patch has resulted in this crash.

Additional Context:
Balatro Version: 1.0.1o-FULL
Modded Version: 1.0.0~BETA-0827c-STEAMODDED
LÖVE Version: 11.5.0
Lovely Version: 0.8.0
Platform: Windows

Stack Traceback

(3) C function 'function: 0x147b2ed8'
(4) global C function 'require'
(5) main chunk of file 'main.lua' at line 896
(6) global C function 'require'
(7) LÖVE function at file 'boot.lua:323' (best guess)
Local variables:
c = table: 0x147b8808 {identity:false, version:11.5, accelerometerjoystick:true, modules:table: 0x147b8ce8, gammacorrect:false, title:Balatro, externalstorage:false (more...)}
openedconsole = boolean: false
confok = boolean: true
conferr = nil
(8) global C function 'xpcall'
(9) LÖVE function at file 'boot.lua:362' (best guess)
Local variables:
result = boolean: true
(10) global C function 'xpcall'
(11) LÖVE function at file 'boot.lua:377' (best guess)
Local variables:
func = Lua function '(LÖVE Function)' (defined at line 355 of chunk [love "boot.lua"])
inerror = boolean: true
deferErrhand = Lua function '(LÖVE Function)' (defined at line 348 of chunk [love "boot.lua"])
earlyinit = Lua function '(LÖVE Function)' (defined at line 355 of chunk [love "boot.lua"])

#

it was fine a few hours ago thats whats bugging me

neat knoll
#

you updated something

#

one of your mods was relying on some piece of code for its patches, and some other mod has changed it

grim orchid
#

i might need build instructions on linux

grim orchid
#

fixed it

fiery crest
grim orchid
#

all my friends moved to nix except me

twin bluff
#

the AUR fixes this

onyx coyote
#

Can I get a link to the Lovely discord, please, the one above expired and I'd like some help with the SDK since I'm trying to troubleshoot a paperback Beta/Cryptid crash.

junior sand
neat knoll
#

so this is a thing that happens

twin bluff
#

oh thats with the lovely variable expansion

#

@solar pebble that should be fixed

solar pebble
#

mmmm

grim orchid
#

i think its working just fine

#

the patch entry was using """ and not '''

twin bluff
#

The placeholders should behave the same no matter what quotes users use

solar pebble
#

(I just made this release to get this thread pinned again)

glossy holly
#

sweeet, does the mobile version apply the patches at runtime? there was a workaround to get mods working by using the generated dump files, but i'm guessing the patches can actually be applied when running it on the device now

solar pebble
#

SHH

#

(it works exactly the same as desktop)

#

nothing else required

knotty tendon
#

is there a wiki for this cause i may not know everything that exists
eg i learned about patches.regex by looking at a different mod 😭

#

also whats the difference between dump and game-dump

twin bluff
#

game-dump is unmodified, used for a tool ethan was working on

#

the readme is the docs (although we haven't updated it for 0.9.0) (it does have regex patches though)

knotty tendon
#

oh okay guess i didnt read it all the way
should be updated fr fr tho

#

hm my lovely's on 0.9.0 but when i try lovely.reload_patches through debugplus it doesnt work... may need to be inside of a patch or mod file? idk

#

should i like make an issue on gh abt it i lowkey have no clue tho

#

wait- yoooo [filename].lua.json shows what file patched what!!

knotty tendon
#

ah I’ll try that

solar pebble
knotty tendon
#

w feature!!!

twin bluff
#

wait until you see what I plan to use it for

knotty tendon
#

how would it be used for a mod if its dynamically generated?
or at least thats what i think youre gonna try to use it for

#

also uhhh how would i use this panic!("something") function, it says its a syntax error when i try... im trying using debugplus and the error it's giving is Syntax Error: '=' expected near '!'

solar pebble
#

I was just joking around in the release notes, that's not Lua

#

😭 😭 😭 😭 😭

knotty tendon
#

bro...

twin bluff
#

Ethan doesn't actually write lua so he doesn't know how to throw an error

zealous void
#

lovely is written in rust

errant robin
#

weird rust-lua hybrid when 😭

knotty tendon
#

imagine if someone made a smods api for DLL files and then you could just use whatever language you want as long as you knew how to use the api

twin bluff
#

I mean you can use the lua c api to interact with smods and then you just need a lua file to jumpstart your shared library

#

although then you also need at least 3 compiled libraries (windows, macos arm, macos intel) and probably more since people often use linux (arm and x86) and forbidden devices

grave moss