It seems that you're using an outdated browser. Some things may not work as they should (or don't work at all).
We suggest you upgrade newer and better browser like: Chrome, Firefox, Internet Explorer or Opera

×
Ok, here we go.

Everything written below is for the express purpose of using the game you already purchased on unsupported OS. There are no files, nor will I ever distribute anything mentioned below. If you are unable to figure things on your own, Wine/Proton is a better option for you.
I may be able to help some, I don't frequent these forums often, but don't expect any hand holding, this HowTo is much more detailed than I'd like it to be already.


First thing you need is to download the Mac version of the game. Put it in a temporary folder somewhere. I'll use ~/Timberborn_TEMP in my example. Also create a folder that will eventually contain the game, I'll use ~/Timberborn_GAME for this example.

At this point you have a .pkg file which you need to properly unpack. For this you need xar archiver, gunzip and cpio. Research how to install these on your distribution (gzip and cpio are probably already installed, but check anyway).

Prepare Game folder (aka Create an 'Timberborn_Data' and 'Timberborn_Home' folder)
cd ~/Timberborn_GAME
mkdir ~/Timberborn_Data
mkdir ~/Timberborn_Home

Unpack .pkg with
cd ~/Timberborn_TEMP
xar -xvf filename.pkg

Enter the created folder '~/Timberborn_TEMP/package.pkg' and extract the big 'Scripts' file with gzip and cpio.
cd package.pkg
cat Scripts | gunzip -dc | cpio -i

Enter '~/Timberborn_TEMP/package.pkg/payload/Contents' folder and copy MonoBleedingEdge folder to Timberborn data folder
cd payload/Contents
cp -Rv MonoBleedingEdge/ ~/Timberborn_GAME/Timberborn_Data/

Enter '~/Timberborn_TEMP/package.pkg/payload/Contents/Resources/Data' folder and copy everything to Timberborn data folder
cd Resources/Data
cp -Rv * ~/Timberborn_GAME/Timberborn_Data/

Enter '~/Timberborn_TEMP/package.pkg/payload/Contents' and copy some files to Timberborn data folder
cd ../..
cp -v Resources/PlayerIcon.icns ~/Timberborn_GAME/Timberborn_Data/Resources/
cp -v Resources/"unity default resources" ~/Timberborn_GAME/Timberborn_Data/Resources/

Now you need to modify mono config file '~/Timberborn_GAME/Timberborn_Data/MonoBleedingEdge/etc/mono/config' and edit all mac specific settings to linux psecific (just names of common library files). On my system, I have mono installed, so I just copied over my '/etc/mono/config'
cp -v /etc/mono/config ~/Timberborn_GAME/Timberborn_Data/MonoBleedingEdge/etc/mono/config

So now you need Unity player and required libraries which can be found in Unity Editor. You need the proper version of the player, the same which was used when devs built the game. Version 0.2.9.1 was built with version 2022.1.6f1, if at some point it changes, you can find which version the required version by looking into Player.log at ~/.config/unity3D/Mechanistry/Timberborn or ~/.config/unity3d/"Unknown Vendor"/"Unknown Unity Application" and error contained there.

Go to web site unity.com/releases
Click "Latest release"
From the dropdown on the right choose 2022.1.6
Scroll down to linux x86_64 and click on the "Unity Editor Linux (X86_64) button.
I downloaded mine to ~/Timberborn_TEMP
Open the downloaded archive and extract LinuxPlayer and UnityPlayer.so from Editor/Data/PlaybackEngines/LinuxStandaloneSupport/Variations/linux64_player_nondevelopment_mono/, as well as some other .so files and copy them to ~/Timberborn_GAME

tar -xvf Unity-2022.1.6f1.tar.xz Editor/Data/PlaybackEngines/LinuxStandaloneSupport/Variations/linux64_player_nondevelopment_mono/LinuxPlayer Editor/Data/PlaybackEngines/LinuxStandaloneSupport/Variations/linux64_player_nondevelopment_mono/UnityPlayer.s o Editor/Data/MonoEmbedRuntime/libmonobdwgc-2.0.so Editor/Data/MonoEmbedRuntime/libmono-native.so Editor/Data/MonoEmbedRuntime/libMonoPosixHelper.so
cp -v Editor/Data/PlaybackEngines/LinuxStandaloneSupport/Variations/linux64_player_nondevelopment_mono/* ~/Timberborn_GAME/
mkdir -p ~/Timberborn_GAME/Timberborn_Data/MonoBleedingEdge/x86_64
cp -v Editor/Data/MonoEmbedRuntime/* ~/Timberborn_GAME/Timberborn_Data/MonoBleedingEdge/x86_64/

Rename LinuxPlayer executable to 'Timberborn', this is required, because the player automatically searches for Timberborn_Data folder.
cd ~/Timberborn_GAME
mv LinuxPlayer Timberborn

Optional step:
(not really necessary, but it keeps $HOME as ~/Timberborn_GAME/Timberborn_Home, so that it's easier to debug, and as a consequence, save and map files will be at ~/Timberborn_GAME/Timberborn_Home/Timberborn)
Create ~/Timberborn_GAME/run.sh with the following contents (make it executable):
#!/bin/bash
cd ~/Timberborn_GAME
/usr/bin/env HOME=`pwd`/Timberborn_Home ./Timberborn

At this point the game is running and working.

Some further technical reading below, written in hopes someone more knowledgeable than me can pitch in. If you decide to skip reading it, please read the notes at the bottom.

There are basically two differences between shipped Windows/Mac version and ours. Both of those are related to the plugins (~/Timberborn_GAME/Timberborn_Data/PlugIns) folder:
- Steam API library (libsteam_api.so)
- Generated Burst Library (lib_burst_generated.so)

I haven't had a crash at this point, but I tried to make it as faithful as possible to what would be shipped officially.
For libsteam_api.so I just copied one from the steam folder, I used the one from Proton experimental '~/Steam/steamapps/common/Proton - Experimental/files/lib64/libsteam_api.so'.

Now, the burst one is a doozy. Bear in mind that I'm no Game, 3D nor Unity developer. So this is all pretty far from my everyday skills. lib_burst_generated.so is generated at compile time and can speed up the game. At this point I found out there is another version for Linux that some russian guy made that includes this file. I don't know if it's placebo or not, but it seems that the game does run 1 or 2 fps faster with the .so I found. So I pressed on with my analysis.

lib_burst_generated file contains some hashes of functions which are used in the game. Comparing the function hashes in official windows version with winedump and the russian version with readelf, I only found 3 hashes in common. I then tried generating the file myself, and because the Windows version mistakenly ships with the DoNotShip lib_burst_generated.txt (which is a more descriprive build-time textual representation of the library), we know which libraries belong to the 3 hashes contained, all of the seem very basic Burst setup functions.
- Unity.Burst.BurstCompiler+BurstCompilerHelper
- Unity.Burst.Intrinsics.X86::DoSetCSRTrampoline
- Unity.Burst.Intrinsics.X86::DoGetCSRTrampoline

I don't know what any of these do, but I fired an empty Unity project in UnityHub, added Burst support, and compiled the empty project. What I got was a lib_burst_generated.so with just the 3 hashes common between the previously mentioned files. I conclude that the downloaded .so was from some other game. But based on hashes, I'm pretty confident that my .so file and the donwloaded file function exactly the same. (Ironically, this step also provides you with LinuxPlayer and UnityPlayer.so as part of the compiled project, but oh well, dowloaded and copied already in previous steps)

Other hashes belong to Unity.Jobs.IJobForExtensions and similar functions, which I don't know enough about and am unable to replicate atm. So there is probably some room for speed improvements with proper Unity Burst generated library.

And that is the extent to what I have done.

Notes:
- I created a script containing all the commands above, and an archive which the script unpacks. The archive basically contains all the changed and modified files from the step where we modify mono config file onwards. I don't want to redistribute any files, so I researched how you can find them yourself and compiled that into this "tutorial".
- I truly don't know what else might be required but went unnoticed because I already have those libraries installed. I stopped experimenting after I managed to make a game run (For every step of the way Player.log contains useful information for debugging).
- Zoom with mouse doesn't work well for me, it's very slow. I use PgUp and PgDown for that. It's the same in Unity Editor, so it's probably a Unity issue, and not Timberborn issue.
- Don't forget to delete ~/Timberborn_TEMP, which is a several GB folder that we don't need anymore)
Post edited November 21, 2022 by mikiantena
A quick update.

Versions 0.3.5.0 and 0.3.5.1 both use Unity version 2022.1.24f1.

These versions both fix the mouse zoom issue with scroll wheel mentioned in previous post notes.

However, I am unable to run 0.3.5.1 at this time properly. Map Editing works, but neither new game nor loading a 0.3.5.0 save works.
Post edited January 30, 2023 by mikiantena