metarmask / teardown

Tools for parsing and converting Teardown game saves
GNU General Public License v3.0
12 stars 3 forks source link

Application crash #1

Closed TTFH closed 3 years ago

TTFH commented 3 years ago

I compiled the aplication with: cargo run --release --package teardown-converter When I open it I got the next error: thread 'main' panicked at 'calledResult::unwrap()on anErrvalue: Parsing error.', user-interface\src\graphical\mod.rs:172:41 That it's probably related to the paths on main.rs

        mods: user_dir.join("My Documents").join("Teardown").join("mods"),
        progress: user_dir.join("Local Settings").join("Application Data").join("Teardown"),
        main: steam_app.install_dir(),

I try changing that to:

        mods: user_dir.join("Documents").join("Teardown").join("mods"),
        progress: user_dir.join("AppData").join("Local").join("Teardown"),
        main: steam_app.install_dir(),

or

        mods: PathBuf::from(r"C:\Users\User\Documents\Teardown\mods"),
        progress: PathBuf::from(r"C:\Users\User\AppData\Local\Teardown"),
        main: PathBuf::from(r"E:\JUEGOS\SteamLibrary\steamapps\common\Teardown")

But the crash still occurs.

Can you please add an option to select the paths in the graphic interface? and avoid the crash to happen.

TTFH commented 3 years ago

I changed let dirs = find_teardown_dirs().unwrap(); to

        let dirs = Directories {
            mods: PathBuf::from(r"C:\Users\User\Documents\Teardown\mods"),
            progress: PathBuf::from(r"C:\Users\User\AppData\Local\Teardown"),
            main: PathBuf::from(r"E:\JUEGOS\SteamLibrary\steamapps\common\Teardown")
        };

and now I can open the graphic interface. But when I click on Convert to Editor I get the next error: thread '<unnamed>' panicked at 'calledResult::unwrap()on anErrvalue: Parsing requires 4 bytes/chars', editor-format\src\lib.rs:226:38

lib.rs:226:38: `VoxStoreFile::new(self.hash_vox_dir.join(format!("{}.vox", hash_n_to_str(hash_n))), palette).unwrap()

TTFH commented 3 years ago

Ok, so models are extracted to SteamLibrary\steamapps\common\Teardown\data\vox\hash, just copying the folder hash to the mods/converted and change hash/ to MODS/hash/ in main.xml and the map can be opened in the editor.