Hellow
This Guide will Help you install Engine Mesh Updater on Linux Device (steamdeck too)



i been working for quite some time on reasonable way to run my mods on Steamdesk/linux
Most reasonable solution i found: Thru Wine: https://www.winehq.org/
Some people Recommend the Bottles: https://flathub.org/apps/com.usebottles.bottles
  • it is obvious, but important to mention that Wine is not my application so i can't promise it will always work
This allow you to run windows App thru linux and it will work on my funky installers just aswell :)

This will work on MeshUpdater, but PSO require manual version and PerformanceFix will break
use Water optimizer instead...
https://steamcommunity.com/sharedfiles/filedetails/?id=2974077189
Thanks to Discord user Satellite for help and tests for the wine workaround
Have fun playing the game :)

Article information

Added on

Edited on

Written by

SCARaw

7 comments

  1. Lightsockie
    Lightsockie
    • member
    • 0 kudos
    Locked
    Sticky
    To run any of SCARaw's batch jobs on linux (and any unfortunately-windows program for kenshi, really), if you're using steam (aka proton) to run the game, you can just copy/paste this:
    WINEPREFIX=~/.steam/steam/steamapps/compatdata/233860/pfx wine /path/to/Whatever_Job.bat
    (if you use a non-standard path for Steam, you'll obviously need to change where that first part points to to whatever you changed it to)

    This will use the "windows environment" you're already using for Kenshi to run the program. I've done this for MeshUpdater, PSO, PerformanceFix, and stuff like RE_Kenshi. All works fine


    And just to note it cuz a lot of pages redirect here, for some of these they'll give you dlls to place next to your Kenshi.exe. To make sure wine loads those, you need to something like this to your launch options in steam:
    WINEDLLOVERRIDES="dxgi,d3d11=n,b" %command%
    (this example is for the vulkan mod, but add into those quotes whatever other stuff some particular mod tells you too)
    https://wiki.winehq.org/Wine_User's_Guide#WINEDLLOVERRIDES=DLL_Overrides
  2. Snowfious
    Snowfious
    • premium
    • 4 kudos
    I've tried the mesh update by SCARaw that update the meshes and such on Windows, and it does it super fast. But on Linux, it does the bat script really slow (like 2-3 a second, not dozens a second like on Windows). Is there a setting anywhere whether on wine/proton/etc., that can speed it up like how Windows does it?
    1. Esrevinue
      Esrevinue
      • member
      • 0 kudos
      I'm having the same issue here - I really don't think it's working properly. I tried adding it to steam as a non steam game and i tried editing the batch file with @leomeinel's fix. Everything goes really slowly and there are still a lot of .png files left in the data folders.
  3. barashka
    barashka
    • member
    • 0 kudos
    In my installation of PerformanceFix lots of files like the one below returned syntax error and weren't converted to dds. But those that did get converted still have their original .PNG files alongside them. I'm not sure it installed properly.
    /Kenshi/data/newland/land/overlaymaps/colour.0.1.pngI ran the bat file on steam deck from inside desktop steam client with the following launch option
    STEAM_COMPAT_DATA_PATH=/home/deck/.local/share/Steam/steamapps/compatdata/233860/pfx %command%
     But .MESH files seem to have been properly modified. I thought since it was saying "found", it wasn't modifying them immediately, and would do it in batch at the end, but that wasn't the case. Maybe mod author should reword it like "modified" instead of found. And only use "not found" for the error message.
    1. Mow
      Mow
      • premium
      • 0 kudos
      Using "PATH" as a variable name and complex if statements with variable substitutions seems to cause syntax errors under Wine/Proton (On Proton 9.x at least) To fix this, rename "PATH" to something else (e.g., FILEPATH in :compress and TARGETPATH in :replace) and replace the problematic if statement with a simpler condition.

      Here's the modified section of FixALL.bat that worked for me:
      :compress
       Set FILEPATH=%~1
       if NOT exist "%FILEPATH%" goto :eof
       echo Converting %FILEPATH%
       bin\nvcompress -bc3 -silent "%FILEPATH%" >nul

       :: Don't delete png's which are used in internal mods.
       if /I "x%FILEPATH:%MATERIALS%\=%" == "x%FILEPATH%" if /I "x%FILEPATH:%TEXTURES%\=%" == "x%FILEPATH%" del "%FILEPATH%"
       goto :eof

      :replace
       Set TARGETPATH=%~1
       bin\fart -r -c -- "%TARGETPATH%\*.material","%TARGETPATH%\*.pu","%TARGETPATH%\*.os","%TARGETPATH%\*.xml","%TARGETPATH%\*.cfg","%TARGETPATH%\*.   " ".png" ".dds"
       goto :eof
    2. leomeinel
      leomeinel
      • supporter
      • 1 kudos
      Hi,

      I had the same issue as @barashka.

      Your fix seems to solve the issue, but it will still throw errors because it seems like using batch variable substitution in an if /I statement is not valid. At least for me that was the case, idk if the same behaviour can be observed on Windows.

      What solved it for me was replacing the :compress and :replace sections of the script with the following (Btw I almost never use batch, but this works without any errors):

      :compress
      Set FILEPATH=%~1
      CALL :dequote FILEPATH
      if NOT exist "%FILEPATH%" goto :eof
      echo Converting %FILEPATH%
      bin\nvcompress -bc3 -silent "%FILEPATH%" >nul

      :: Skip deletion if %MATERIALS% is found in %FILEPATH%
      echo %FILEPATH% | findstr /i "%MATERIALS%" >nul
      if %errorlevel% == 0 goto :eof

      :: Skip deletion if %TEXTURES% is found in %FILEPATH%
      echo %FILEPATH% | findstr /i "%TEXTURES%" >nul
      if %errorlevel% == 0 goto :eof

      del "%FILEPATH%"
      goto :eof


      :replace
      Set TARGETPATH=%~1
      CALL :dequote TARGETPATH
      bin\fart -r -c -- "%TARGETPATH%\*.material","%TARGETPATH%\*.pu","%TARGETPATH%\*.os","%TARGETPATH%\*.xml","%TARGETPATH%\*.cfg","%TARGETPATH%\*." ".png" ".dds"
      goto :eof

      EDIT: I have updated the script to use findstr /I instead of variable substitution. For anyone that saw the last edit: the artifacts were due to me using hardware mouse in settings, idk why that causes artifacts but whatever.
  4. playeremers
    playeremers
    • member
    • 0 kudos
    The bash installers worked just fine as a non-steam game using proton compatibility, no need for bottles or anything else
    1. ethanr323
      ethanr323
      • member
      • 0 kudos
      This is also what worked for me, I tried getting Bottles to work for over an hour to no avail and then i found this comment. Thank you