Sirius902 / LuaBackend

A standalone script interpreter for PC games. Compatible with LuaEngine.
GNU General Public License v3.0
40 stars 5 forks source link

Not working on Steam Deck (Steam Version) #15

Closed HydroSulphide closed 2 months ago

HydroSulphide commented 2 months ago

I tried getting my lua scripts, that work on windows, to run on steam deck. This is what I did, maybe I'm missing a step or did use wrong paths:

After all these steps the game launches like normal, but no scripts are active and the lua console doesn't open by pressing F2.

spongebob902 commented 2 months ago

I'm having the same trouble

HydroSulphide commented 2 months ago

I was stupid and had the old thread struct address still in my LuaBackend.toml. I got it working and this is my updated step-by-step guide. Maybe it will help someone who finds it:

Edit: If you don't want to navigate to the scripts folder inside the prefix every time you install a script, you can define a custom path inside the LuaBackend.toml, that is not relative to the Documents folder inside the prefix. For example:

[kh1]
scripts = [{ path = "/home/deck/Documents/KINGDOM HEARTS HD 1.5+2.5 ReMIX/scripts/kh1/", relative = false }]
base = 0x0
thread_struct = 0x22BAA20
exe = "KINGDOM HEARTS FINAL MIX.exe"
game_docs = "My Games/KINGDOM HEARTS HD 1.5+2.5 ReMIX"
KingNagito commented 2 months ago

Hey I still can't get it to work and I followed your instructions precisely. I'm trying to install some lua scripts for bbs, but none of them seem to be working when I'm opening the game. Any ideas about what I'm missing?

cll0ud commented 2 months ago

I got it working on my Steam Deck following these instructions, for the Steam release, for KH1 at least. However I've had a couple non-critical issues:

HydroSulphide commented 2 months ago

Regarding the empty console: I opened another github issue describing the problem. I didn't find a solution, but also didn't try that hard, because as long as it works the output is not that important for me personally, but I would appreciate if anyone finds a solution. Some people told me that they see output on steam deck after using my guide. I don't know what's causing the issue for some people including me.

What exactly is the message you are getting and where is this error message printed? That's interesting, but I don't really know what the problem could be. Should be just a typo maybe or you forgot to set relative to false or something like that. It should work just like I wrote it. My scripts are only at "/home/deck/Documents/KINGDOM HEARTS HD 1.5+2.5 ReMIX/scripts/kh1/" and not in the prefix folder and it did just work for me.

cll0ud commented 2 months ago

Happens as soon as I open KH1. I took a screenshot: Screenshot_20240706_085823 It works if I move it back to the proton prefix folder. It's really not a major issue for me tho, I just created a shortcut for the prefix folder on my desktop to make it easier to manage scripts. That said, I'm currently only using some simple and light scripts, would be nice to be able to move these to the external SD in case I was going to use texture packs and other heavier stuff as I have the 64gb internal memory model.

HydroSulphide commented 2 months ago

That's really weird. Should definitely work like this. But you shouldn't be worried about space regarding Lua scripts. They are just scripts and will never be too big. Things like texture packs are patches that change the exe and the game files inside the game directory. I don't know if it's possible to put these on the SD card without installing the game on the SD card in the first place. Maybe with sym links, but I didn't test it.

cll0ud commented 2 months ago

Oh, I see. It's my first time messing with mods for these games, so I didn't know textures and the likes are directly patched in the executables. I should be fine then, I already got the games installed in the SD card. Thanks for all the help!