Berserk-Games / atom-tabletopsimulator-lua

Tabletop Simulator scripting package for Atom.
Other
36 stars 27 forks source link

Uncaught Error: ENOENT: no such file or directory, open 'C:\users\steamuser\My Documents/My Games... #134

Open Ba-So opened 3 years ago

Ba-So commented 3 years ago

[Enter steps to reproduce:]

  1. launch atom and tabletopsimulator in any order
  2. open session in tts, save and load
  3. execute "Get Lua Scripts" in atom tts Plugin

Atom: 1.52.0 x64 Electron: 6.1.12 OS: "Arch Linux" Thrown From: tabletopsimulator-lua package 12.4.3

Stack Trace

Uncaught Error: ENOENT: no such file or directory, open 'C:\users\steamuser\My Documents/My Games/Tabletop Simulator/Saves\ModdingShit\TS_Save_29.json'

At fs.js:126

Error: ENOENT: no such file or directory, open 'C:\users\steamuser\My Documents/My Games/Tabletop Simulator/Saves\ModdingShit\TS_Save_29.json'
    at Object.openSync (fs.js:447:3)
    at Object.func (electron/js2c/asar.js:138:31)
    at Object.func [as openSync] (electron/js2c/asar.js:138:31)
    at Object.readFileSync (fs.js:349:35)
    at Object.fs.readFileSync (electron/js2c/asar.js:580:40)
    at Object.fs.readFileSync (electron/js2c/asar.js:580:40)
    at Object.parseSavePath (/packages/tabletopsimulator-lua/lib/tabletopsimulator-lua.coffee:1867:26)
    at handleMessage (/packages/tabletopsimulator-lua/lib/tabletopsimulator-lua.coffee:1887:12)
    at /packages/tabletopsimulator-lua/lib/tabletopsimulator-lua.coffee:2114:9)
    at Socket.emit (events.js:200:13)
    at addChunk (_stream_readable.js:294:12)
    at readableAddChunk (_stream_readable.js:275:11)
    at Socket.Readable.push (_stream_readable.js:210:10)
    at TCP.onStreamRead (internal/stream_base_commons.js:166:17)

Commands

Non-Core Packages

tabletopsimulator-lua 12.4.3 
vim-mode-plus 1.36.4 

Problem

Nothing is being loaded from tts saves, Plugin is unusable for me (all linux users)

Ideas

it appears that the function parseSavePath in tabletopsimulator-lua.coffee at ll.1869 doesn't account for the fact that TTS is run on Proton. The correct Path would be:

~/.steam/steam/steamapps/compatdata/268130/pfx/drive_c/users/steamuser/My Documents/My Games/Tabletop Simulator/Saves/ModdingShit/TS_Save_29.json

Therefore the script would need to do the following

Ba-So commented 3 years ago

I'll get to figuring out how to fix it, if I can find the time during the weekend. Any way I can help, I'd be glad to!

I just spend 10 hours learning and programming inside the scripting window of TTS and that was no fun ;)