1. Hello!

    First of all, welcome to MapleLegends! You are currently viewing the forums as a guest, so you can only view the first post of every topic. We highly recommend registering so you can be part of our community.

    By registering to our forums you can introduce yourself and make your first friends, talk in the shoutbox, contribute, and much more!

    This process only takes a few minutes and you can always decide to lurk even after!

    - MapleLegends Administration-
  2. Experiencing disconnecting after inserting your login info? Make sure you are on the latest MapleLegends version. The current latest version is found by clicking here.
    Dismiss Notice

Installing ML... on the Steam Deck!

Discussion in 'Guides' started by Theaceae, Aug 28, 2022.

  1. Theaceae
    Offline

    Theaceae King Slime

    28
    7
    36
    Jul 4, 2021
    Female
    12:39 AM
    Theaceae
    Hi.

    I recently obtained a Steam Deck. What better game then to test how far I can break this nifty little device? MapleLegends, of course! This will be a tutorial on installing the game, so that others may follow my findings in the future. Huge thanks especially to halfwaysleet for the original Debian-based instructions.


    [​IMG]
    Just a quick note. There's absolutely better ways out there to do what I did. As someone who's job involves Red Hat day in, day out, I'm not at all familiar with Arch Linux or KDE, which SteamOS both make use of. If anyone has any suggestions or potential workarounds for existing issues, or improvements I can make, please let me know!

    Step 0: Deck Preparation
    Let's just save you the headache right now and get this out of the way: Forget using the Wine flatpak. I'm sure a clever mind could get this to work, but this is just an extra set of steps and errors to troubleshoot, and it's a lot of effort to install a custom version of Wine. We also want to install an updated set of Wine Dependencies, so I wanted to access Pacman as quickly as I could.

    Let's also clear up another obstacle. Steam uses an immutable Operating System. This means that all of the steps in this preparation step will be LOST with each update.
    First of all, open Konsole. If you have not already done so, create password for the deck user with:
    Code:
    passwd
    (Note: Triple click code box text to select the entire line!)

    Next Disable Read-only mode:
    Code:
    sudo steamos-readonly disable
    Your NAND Partition is now unprotected! I suggest exercising extreme caution, and only continue if you know what you're getting yourself into. Here is Valve's response on disabling readonly:


    Initialize the pacman keyring:
    Code:
    sudo pacman-key --init
    Populate the pacman keyring with the default Arch Linux keys:
    Code:
    sudo pacman-key --populate archlinux
    Now we want to make sure we have access to multilib.
    When I did this, access was already enabled, but it is still worth checking:
    Open /etc/pacman.conf in any editor (Forgive me, I like nano)
    and uncomment the following line(s):
    Code:
    [multilib]
    Include = /etc/pacman.d/mirrorlist
    Now let's update!
    Code:
    sudo pacman -Syyu
    Next, I want to install a few things.
    Some of these were for testing, and may or may not be used for improved workarounds in the future, but the most important item you should install is protonup-qt and wine-staging:
    Code:
    sudo pacman -S wine-staging winetricks wine-nine wine-mono lutris python-magic 
    Protonup-Qt is not available in the multilib, and must be installed as a flatpak from the KDE Discover store, or from the AUR.
    My mistake! See the Proton Github for more info.

    and finally, Wine dependencies:
    Code:
    sudo pacman -S giflib lib32-giflib libpng lib32-libpng libldap lib32-libldap gnutls lib32-gnutls mpg123 lib32-mpg123 openal lib32-openal v4l-utils lib32-v4l-utils libpulse lib32-libpulse alsa-plugins lib32-alsa-plugins alsa-lib libjpeg-turbo lib32-libjpeg-turbo libxcomposite lib32-libxcomposite libxinerama lib32-libxinerama ncurses lib32-ncurses opencl-icd-loader lib32-opencl-icd-loader libxslt lib32-libxslt libva lib32-libva gtk3 lib32-gtk3 gst-plugins-base-libs lib32-gst-plugins-base-libs vulkan-icd-loader lib32-vulkan-icd-loader cups samba dosbox 
    Now, to make this setup easier for the next SteamOS update, let's make a shell script:
    Code:
    tee -a ~/ml-unlock.sh << END
    #!/bin/bash
    # -*- ENCODING: UTF-8 -*-
    sudo steamos-readonly disable
    sudo pacman-key --init
    sudo pacman-key --populate archlinux
    sudo pacman -Syyu
    sudo pacman -S wine-staging winetricks wine-nine wine-mono lutris python-magic protonup-qt
    sudo pacman -S giflib lib32-giflib libpng lib32-libpng libldap lib32-libldap gnutls lib32-gnutls mpg123 lib32-mpg123 openal lib32-openal v4l-utils lib32-v4l-utils libpulse lib32-libpulse alsa-plugins lib32-alsa-plugins alsa-lib libjpeg-turbo lib32-libjpeg-turbo libxcomposite lib32-libxcomposite libxinerama lib32-libxinerama ncurses lib32-ncurses opencl-icd-loader lib32-opencl-icd-loader libxslt lib32-libxslt libva lib32-libva gtk3 lib32-gtk3 gst-plugins-base-libs lib32-gst-plugins-base-libs vulkan-icd-loader lib32-vulkan-icd-loader cups samba dosbox
    END
    
    and finally, set the executable bit:
    Code:
    chmod +x ~/ml-unlock.sh
    
    The next time you update SteamOS, just run this script.

    Step 1: Download files, add MapleLegends shortcut to Steam.
    Download the LATEST version of the WINESKIN client.
    By Default, Downloads will download to ~/Downloads.

    After this has finished downloading, extract the contents using Ark, or by right clicking the download in Dolphin, and going to Extract > Autodetect subfolders.

    In the newly created folder,Extract the payload file the same way, and then renamed the decrypted payload file to Payload.xar, and extract this file one more time.

    You should now have a ./Payload/Applications/MapleLegends.app folder. I copied this directly to my Home folder (~/), but put this somewhere of your preference/ convenience.


    Navigate through this folder into ./drive_c/MapleLegendsHD, and right click MapleLegends.exe. Click Add to Steam.
    [​IMG]
    Before continuing to the next step, we will also download two additional files that are required for this to work:
    http://www.mediafire.com/?bvt20olayvfbgw7 FOR ws2_32.dll
    http://www.mediafire.com/?7c9tee7fhvebopc FOR ws2help.dll

    We will deal with these files later. Do not lose them for now.

    Step 2: Preparing Proton prefix.
    TO continue, we need to unsuccessfully launch our new non-steam shortcut from within Steam. Navigate to your new MapleLegend.exe game shortcut. Click settings > Properties...

    Fill in "PROTON_USE_WINED3D=1 %command%" in launch options, as shown below:
    [​IMG]
    (I also have PROTON_LOG=1 turned on, so I can debug Proton crashes as needed. These are dumped in your home directory with the filename "Steam-<appID>.log")

    Click Compatibility, and check the box for "Force the use of a specific Steam Play compatibility tool". Close this box and try to launch the game.

    It will fail.

    That's okay!

    Let's continue.


    Open ProtonUp-Qt.
    This is a great little tool that allows easy installation of custom proton versions. I specifically want to download a custom version to not mess with the default Proton used to boot steam games. For this, I downloaded GE-Proton7-30 (Because I actively use GE-Proton7-33, the latest version, for other games!)

    Return to Dolphin or navigate to ~/.steam/steam/steamapps/compatdata
    You should see many (or a few) folders with a series of numbers. If MapleLegends is the only non-steam game you have added, this will be easy! Steam games use a series of 7 digits, and non-steam games are automatically applied with longer digit sets. MapleLegends should be the last folder in this list. (Mine was 2446083177) You can confirm this by checking properties of the folder, and confirming that the folder was created within the last several minutes.
    [​IMG]
    Open the correct wineprefix folder.

    Copy the two dll files you downloaded earlier to the root of this folder.

    Step 3: Destroying that Proton Prefix

    First, let's get a bit destructive. We're going to rebuild the prefix as Win32.


    If you are using Dolphin, open an in-line terminal by pressing F4, or work from within Konsole.

    Make a backup of the steam files in the prefix:
    Code:
    cp -r pfx/drive_c/Program\ Files\ \(x86\)/Steam/ . 
    ...and now delete the prefix:
    Code:
    rm -r pfx
    and create a new one!
    Code:
    WINEPREFIX=$PWD/pfx WINEARCH=win32 wineboot winecfg
    
    Proton will crash if syswow64 does not simply exist, so we will create this folder now:
    Code:
    mkdir pfx/drive_c/windows/syswow64 
    Copy Steam's libraries, as well as the dll's that I had you bring with you. (You DID bring those, riiiight?)
    Code:
    cp -rf Steam pfx/drive_c/Program\ Files/
    cp -rf ws2_32.dll pfx/drive_c/windows/system32/ws2_32.dll
    cp -rf ws2help.dll pfx/drive_c/windows/system32/ws2help.dll
    
    Step 4: Re-fixing your destroyed prefix

    Lets next export a few environmental variables:
    Code:
    export WINE=/home/deck/.steam/steam/compatibilitytools.d/GE-Proton7-29/
    export WINEARCH=win32
    export WINEPREFIX=$PWD/pfx
    
    Now launch winecfg. If Wine begins setting up in your pfx folder, then you did the above steps correctly. Great job!
    within winecfg, we need to set Windows Version to Windows 98, then go to the Graphics tab, and enable "Emulate a Virtual Desktop". Set the Desktop size to 1280 x 800 (The steamdeck's native resolution). Over on Desktop Integration, I also select the Item drop down and change Desktop to a black color.
    [​IMG]
    Click Apply, OK, then bring your focus back to the terminal prompt in Dolphin.

    We want to back up our configuration files, so that we do not need to set Virtual Desktop again in the future:
    Code:
    cp pfx/system.reg .
    cp pfx/user.reg .
    cp pfx/userdef.reg .
    
    In my experience, I needed to restore this prefix a few different times, so I went ahead and made another shell script to automate this process if it needs to be done:
    Code:
    tee -a ./refresh.sh << END
    #!/bin/bash
    # -*- ENCODING: UTF-8 -*-
    rm -r pfx
    WINEPREFIX=$PWD/pfx WINEARCH=win32 wineboot winecfg
    mkdir pfx/drive_c/windows/syswow64
    cp -rf Steam pfx/drive_c/Program\ Files/
    cp -f ws2_32.dll pfx/drive_c/windows/system32/ws2_32.dll
    cp -f ws2help.dll pfx/drive_c/windows/system32/ws2help.dll
    cp system.reg pfx/system.reg
    cp user.reg pfx/user.reg
    cp userdef.reg pfx/userdef.reg
    END
    
    So far, I only needed to do this once. Creating a script is still a good step to take to help with easy troubleshooting later.

    Set the executable bit on this script:
    Code:
    chmod +x refresh.sh
    
    Nearly there! We need to do one last thing.
    Navigate to your proton folder:
    Code:
    cd /home/deck/.steam/steam/compatibilitytools.d/GE-Proton7-30/
    
    We need to substitute a string, because Proton defaults to Win64:
    Code:
    sed -i 's/wine64/wine/' proton
    
    Prefix-fixing complete!

    Step 5: Launching the game!

    From this point on, MapleLegends will launch from within Steam. Nothing to it!

    Step ???: Really? Nothing to it?

    Well, okay, not everything is working too well, though. My current observations:
    • The game will not launch from Game mode, and has to be launched after booting to Desktop mode
    • Because of this, game mode overlay is also seemingly broken, but desktop overlay works just fine. (This requires more testing. I have a few ideas on why this might be happening, and is the sole reason for the delays in posting my promised guide. That is, if many people saw my Discord message.)
    • You can set the steamdeck's controls outside of the game, but not while the game is running (This should be fixed once the issues with gamemode overlay are cleared up.)
    • Yeah, so much for my above three points. Ya girl just didn't do it right the first time and it's working just fine: game mode, controls, and all. If you run into this issue, try using the refresh shell script I included and try again.
    • 1366 x 768 does NOT work at all. I wouldn't mind having a bit of screen cut off, or scaled (a true crisp 1280x800 mode implemented would be the dream, though. ~COUGH~)
    • While testing, I was unable to ever boot the game from the command prompt, or from a shell script, as instructed in halfwaysleet's guide. Lutris worked just fine, if that's your thing, but you lose convenient access to setting up gamepad controls. This won't matter if you're using a keyboard / mouse with your deck.
    • Still can't drop virtual window mode. This alone is the reason why I needed to rebuild the entire proton prefix. If launching from a shell script were to work, we'd be able to point Steam at this script and launch the game this way, rather than use built in Proton.
    • Random? Arch Linux is...fine. My personal desktop uses Nobara Linux, a Red Hat / Fedora distro built by the wonderful dev that contributes to Lutris, and the creator of Proton-ge. Getting MapleLegends to work on thi distro was a flawless endeavor, without the need for any virtual workarounds. I'd like to tinker with installing Nobara on deck and see how this would function, but I'll keep Arch / SteamOS just to better discover how to fix the flaws with running the game on native software.
    Sometime in the future, I'll put a bit more effort into working out some of the deeper incompatibility bugs between the MLegends client and wine.

    I'd also like to make a Flatpak version of the existing wineskin ML client, to REALLY simplify installation; Not only for Steam Deck users, but for all Linux distros with access to Flatpak. Upon further testing, the prefix that I created above worked just fine when dropped onto my Nobara desktop, so I think wrapping this solution up into a single flatpak repo would be a near-universal solution for many users. A flatpak would also be an easy automatic way to keep the game updated for many users. (and to think, I used to be so opposed to flatpaks..)

    I simply have way too much on my plate right now to be of any use in that endeavor for now.
    Oh, and...keybindings! these obviously don't translate over well, but the controls allow for quite a few additional options over what I put together. I just tried to take what i have, and cram as many buttons in as made sense to me:
    [​IMG]
    You have the option of assigning touch (but not clicking in) as separate buttons for each pad/stick, gyro...but I felt that would have been overload. I have a little portable Thinkpad keyboard that I carry in my bag for whenever I need to do some serious key-ing.


    Phew! I think that's it. I'm not the greatest at providing any support, so please consider this as a disclaimer (follow my instructions at your own risk, be prepared to recover your device from any mistakes, etc.) It's been an adventure with this tiny little system, but the journey is just getting started.

    Good luck!

    Updates:
    2022/08/28: I really cleaned up formatting and spelling of this post, and added a few call-outs to Deck preparation. Corrected myself on GameMode compatibility. Also Piccys!
    2022/08/30: Neded to reconfigure my prefix once again. This time, I started from scratch, using my guide to further catch any errors. All context and commands should be correct now!
    09/19/2022: Cleaned up more inconsistencies.
     
    • Great Work Great Work x 16
    • Useful Useful x 2
    • Creative Creative x 1
  2. Imberos
    Offline

    Imberos Horny Mushroom

    46
    12
    46
    Nov 20, 2018
    10:39 AM
    Liffon
    Priest
    96
    Dang I get mine in 3 weeks and was about to try it myself. Thanks for the info!
     
  3. OP
    OP
    Theaceae
    Offline

    Theaceae King Slime

    28
    7
    36
    Jul 4, 2021
    Female
    12:39 AM
    Theaceae
    I'm glad to have helped! Don't let this be your expectation of installing other non-steam games. as long as the game doesn't use some sort of anti-cheat or cryptic windows-only kernel function, compatibility has been super great and easy to set up! Proton (and Wine) has come a long way, and I'm willing to bet that well over 80% of all games ever are going to be playable.
     
  4. Odie
    Offline

    Odie Blue Snail

    2
    0
    2
    Sep 19, 2022
    9:39 AM
    Thief
    Hello, i've been trying to get this to work on my Steam Deck, but i simply cannot figure out how to get steam to launch ML successfully. After following your guide, i can only get ML to work in lutris ( in both desktop mode and game mode, but the former won't let me set gamepad controls and the latter won't let me use the on-screen keyboard to fill in my login details)

    How do i proceed? Any help'd be greatly appreciated.
     
  5. OP
    OP
    Theaceae
    Offline

    Theaceae King Slime

    28
    7
    36
    Jul 4, 2021
    Female
    12:39 AM
    Theaceae
    Where exactly are you stuck at with this? I don't use Lutris at all, if that helps clear things up. I found that if you add a lutris shortcut to steam as a virtual window, steam can't properly hook into the running application, and you're unable to use the added overlays, the game HID, and steam tools.

    The best way to run this through steam is to trick the proton prefix into configuring itself as a 32-bit. I've been having trouble with this configuration sticking, because I play other wine games that like to mess up the configuration.

    Edit- There's at least one other server out there that managed to patch 64-bit prefix/WineD3D compatibility into their client. I'd love to look into how they did this, and see if this was possible for ML. This would not only clear up the issues with compatibility of playing through Steam Play, but playing on wine in general for all Linux distros.
     
  6. LeonardoJF
    Online

    LeonardoJF Zakum

    1,873
    344
    460
    Jun 16, 2021
    Male
    Rio grande do Sul - BR
    4:39 AM
    ItzLeo
    Paladin
    200
    Favela
    Nicee! I wanna try on my psp too!
     
  7. Odie
    Offline

    Odie Blue Snail

    2
    0
    2
    Sep 19, 2022
    9:39 AM
    Thief
    Given i got it to work using Lutris, i think i'm having trouble getting the proton prefix to work as intended. After following the guide ( and getting wine to setup in the prefix as mentioned in the last step), ML doesn't launch from steam, and the play/stop button in the library just reverts to play. As a troubleshooting step, i attempted to run ML in lutris by adding the .exe, setting the arch to 32-bit and disabling DXVK, which yielded aforementioned results.

    I do have some questions that might help me troubleshoot this problem better, though:
    • If one enables PROTON_LOG=1 in the launch options, where are these logs stored?
    • During the part "Click Compatibility, and check the box for "Force the use of a specific Steam Play compatibility tool". Close this box and try to launch the game." which compatibility tool should be selected?
    • Near the end of Step 4, why is one instructed to /home/deck/.steam/steam/compatibilitytools.d/GE-Proton7-30/ even though we downloaded the GE-Proton7-29 prefix as per the guide?
     
  8. OP
    OP
    Theaceae
    Offline

    Theaceae King Slime

    28
    7
    36
    Jul 4, 2021
    Female
    12:39 AM
    Theaceae
    A few typos on my part, but let me address them here, then update my top post.
    Directly in your home directory. These files are often named "Steam-<appid>.log", and will only reflect the most recent launch of the game.
    In my setup, I'm using GE, simply because it was a custom proton version that I could modify without making modifications to the default Proton. The actual version you use does not matter, as there are no major changes in between recent versions that make or break compatibility with ML.

    Sorry about that! GloriousEggroll released an update before I completed my guide. Basically, I'm using "The most recent version of GE minus 1". I did not want to modify the *latest* version, as I use this for other game compatibility. To clarify what I mean: The exact version that you use is inconsequential, just at long as the same consistent version is used in all configuration.
     
  9. Cak33
    Offline

    Cak33 Headless Horseman

    819
    342
    371
    Oct 24, 2019
    Male
    3:39 PM
    NotCut3
    Hero
    172
    Active
    having a flatpak version will be totally awesome. considering that we just run off mac's version of wine, in theory it should not require any maintainance.
    i run daily drive linux mint so, if u ever need someone to test, lmk :DD
     
    • Friendly Friendly x 1
  10. OP
    OP
    Theaceae
    Offline

    Theaceae King Slime

    28
    7
    36
    Jul 4, 2021
    Female
    12:39 AM
    Theaceae
    Thank you for not requesting a snap SlimeXD
    It definitely won't be anytime soon, but I'll keep you in mind!
     
    • Great Work Great Work x 1
  11. Cak33
    Offline

    Cak33 Headless Horseman

    819
    342
    371
    Oct 24, 2019
    Male
    3:39 PM
    NotCut3
    Hero
    172
    Active
    im not a choosy guy, even if u give appimage and it works, i'll take it xDD
     
  12. Daydreamer
    Offline

    Daydreamer Headless Horseman

    705
    243
    376
    Jul 8, 2017
    Male
    12:39 AM
    I/L Arch Mage
    I talked to Geo a bit about this, I think it should theoretically be possible but no luck with it just yet.
     
    • Like Like x 1
  13. Cak33
    Offline

    Cak33 Headless Horseman

    819
    342
    371
    Oct 24, 2019
    Male
    3:39 PM
    NotCut3
    Hero
    172
    Active
    Found this few days ago:
    https://github.com/mmtrt/WINE_AppImage

    Its appimage, not flatpak. But with a full portable wine executable, i think it will be very easy to write a GUI launcher to handle the prefix, extracting the game files from crossover/wine-mac builds, and launching of MapleLegends.

    Probably our best chance at a true newbie friendly client, without worrying about the usual learning curve of linux in general.
     
  14. deckedMS
    Offline

    deckedMS Red Snail

    5
    0
    5
    Jun 4, 2023
    Male
    The Netherlands
    9:39 AM
    Hello Theaceae !
    I followed your guide step by step, but when trying to open maplelegends on my steam deck I get the following error log :

    ======================
    Proton: 1683754263 GE-Proton8-3
    SteamGameId: 10630441380763140096
    Command: ['/home/deck/Payload/MapleLegends.app/drive_c/MapleLegends/MapleLegends.exe']
    Options: {'wined3d', 'forcelgadd'}
    depot: 0.20230424.48416
    pressure-vessel: 0.20230418.0 scout
    scripts: 0.20230418.0
    sniper: 0.20230424.48416 sniper 0.20230424.48416
    Kernel: Linux 5.13.0-valve36-1-neptune #1 SMP PREEMPT Mon, 19 Dec 2022 23:39:41 +0000 x86_64
    Language: LC_ALL None, LC_MESSAGES None, LC_CTYPE None
    ======================
    wine: using kernel write watches (experimental).
    fsync: up and running.
    wine: RLIMIT_NICE is <= 20, unable to use setpriority safely
    wine: '/home/deck/.local/share/Steam/steamapps/compatdata/2475092509/pfx' is a 32-bit installation, it cannot support 64-bit applications.
    pid 7932 != 7931, skipping destruction (fork without exec?)

    perhaps it helps noting that I actually still had the 64 bit version of wine when following your guide, and did not have an option to select windows 98 in winecfg.
    For this I manually changed the .wine folder in my home directory to the 32 bit version, so I can select windows 98.
    Any help would be appreciated ! Already reinstalled steamos 2 times, this is my third try xD.
     

Share This Page