diff --git a/modules/ROOT/images/BeginnersGuide/Wwise/wwise-create-project-linux.png b/modules/ROOT/images/BeginnersGuide/Wwise/wwise-create-project-linux.png new file mode 100644 index 000000000..74c83071b Binary files /dev/null and b/modules/ROOT/images/BeginnersGuide/Wwise/wwise-create-project-linux.png differ diff --git a/modules/ROOT/nav.adoc b/modules/ROOT/nav.adoc index 762099401..828514649 100644 --- a/modules/ROOT/nav.adoc +++ b/modules/ROOT/nav.adoc @@ -24,6 +24,7 @@ ***** xref:Development/BeginnersGuide/StarterProject/StarterProjectViaClone.adoc[Option A: Git Clone] ***** xref:Development/BeginnersGuide/StarterProject/StarterProjectViaZip.adoc[Option B: Download Zip] *** xref:Development/BeginnersGuide/project_setup.adoc[Project Setup] + *** xref:Development/BeginnersGuide/LinuxSetup.adoc[Linux Setup] *** xref:Development/BeginnersGuide/StarterProjectStructure.adoc[Starter Project Structure] *** xref:Development/BeginnersGuide/SimpleMod/index.adoc[Create a Simple Mod] **** xref:Development/BeginnersGuide/SimpleMod/gameworldmodule.adoc[Plugin Setup and Game World Module] diff --git a/modules/ROOT/pages/Development/BeginnersGuide/LinuxSetup.adoc b/modules/ROOT/pages/Development/BeginnersGuide/LinuxSetup.adoc new file mode 100644 index 000000000..1536faf98 --- /dev/null +++ b/modules/ROOT/pages/Development/BeginnersGuide/LinuxSetup.adoc @@ -0,0 +1,217 @@ += Setting Up The Modding Environment on Linux + +The Satisfactory Modding Environment is also available for you to develop if you are on a Linux-based platform. + +NOTE: This is for setting up the Modding Environment on Linux. If you are on Windows, please follow the guide xref:Development/BeginnersGuide/dependencies.adoc[here]. + +== Prerequisites + +Before we can begin, we must install the following packages with our distro's package manager. +On Debian-based systems such as Ubuntu, this would be `apt install`, or `dnf install` on Fedora. + +* `git` (For version control) +* `msitools` (For `msiextract`, used by `vsdownload.py` of msvc-wine) +* `tar` and `zstd` (For decompressing the engine archive) +* `dos2unix` (For the Wwise patches, used by the SML project) +* `wine` (Needed to build Alpakit Win64 targets and open the Wwise Authoring application) + +For example, on Fedora this would be + +[source,bash] +---- +dnf install git msitools tar zstd dos2unix wine +---- + +== Engine Setup + +Now we can begin setting up our custom version of Unreal Engine. + +=== Download MSVC + +First, we must install MSVC using msvc-wine: + +Copy and paste this into your terminal, but be sure to first swap `` to the directory where you want to install MSVC, then run it. +This will automatically clone the msvc-wine repository and use it to download the correct version of MSVC for the editor to use. + +[source,bash] +---- +git clone --branch ue-patches https://github.com/mircearoata/msvc-wine.git + +cd msvc-wine + +./vsdownload.py --accept-license --dest "" --msvc-version "17.8" --sdk-version "10.0.22621" --channel "release.ltsc.17.8" + +./install.sh "" +---- + +Next, you'll need to edit either `/etc/environment` or `~/.profile` with a tool such as Neovim, to set the `UE_WINE_MSVC` environment variable. + +For example: `UE_WINE_MSVC=""` (make sure to surround the directory in quotes) + +Then you may need to log out and back in, or restart your PC for the change to take effect. + +=== Download the engine + +You can do this one of two ways: Either build the engine from source, or download an already built archive from the GitHub CI. + +==== From Source + +Clone the `5.6.1-CSS` branch of https://github.com/satisfactorymodding/UnrealEngine (A source build can take at least 2-3 hours depending on your hardware). + +==== Download an archive + +Click on the latest release https://github.com/satisfactorymodding/UnrealEngine/releases/[here], and download each of the `UnrealEngine-CSS-Editor-Linux.tar.zst.*` files. + +[NOTE] +==== +You do NOT have to download the `UnrealEngine-CSS-Editor-Linux-Debug.tar.zst.*` files. Only the non-debug ones. +==== + +Once those are done downloading, create a folder called `UnrealEngineCSS` or similar, and move the archives into it. +Then run the command below to extract them: + +[source,bash] +---- +cat UnrealEngine-CSS-Editor-Linux.tar.zst.* | zstd -d | tar -xf - +---- + +=== Register the engine + +Register the engine to your system by running this command, replacing `` with the path to your engine installation: + +[source,bash] +---- +/Engine/Binaries/Linux/UnrealVersionSelector -register -unattended +---- + +== Project Setup + +Clone or download the starter project from https://github.com/satisfactorymodding/SatisfactoryModLoader as normal. + +=== Wwise setup + +Download the latest build of wwise-cli from https://github.com/mircearoata/wwise-cli/releases/latest. + +Run this command in your terminal to download the required version of Wwise: + +[source,bash] +---- +./wwise-cli download --sdk-version "2023.1.14.8770" --filter Packages=SDK --filter DeploymentPlatforms=Windows_vc160 --filter DeploymentPlatforms=Windows_vc170 --filter DeploymentPlatforms=Linux --filter DeploymentPlatforms= +---- + +When that's done, run this command to integrate it into the starter project, replacing `` with the path to your project: + +[source,bash] +---- +./wwise-cli integrate-ue --integration-version "2023.1.14.3555" --project "/FactoryGame.uproject" +---- + +=== IDE setup + +Now we must set up our IDE for building the starter project, and for developing with C++. +Since Visual Studio isn't available for Linux, you can instead use Rider or VS Code. + +==== Rider + +There are two methods to open the project in Rider. Uproject is preferred, but Solution + Makefile is also available if you need it for a specific reason. + +===== Uproject + +Due to a bug with Rider, you'll need to install a plugin in order to see the `Mods` folder when opening the Uproject file. Open the Settings window and find the "Plugins" page, then search the marketplace for `Unreal Project Model Mods Fix` by Archengius and install it. Restart the IDE if prompted. + + +===== Makefile + +The other method is to generate a Visual Studio Solution and Makefile to build the project. + +[NOTE] +==== +The Uproject method is preferred, but if for whatever reason you need to have the solution and makefile, you can follow these steps. +==== + +Run the following commands, replacing `` and `` with the respective paths. + +To generate the VS Solution: + +[source,bash] +---- +/Engine/Build/BatchFiles/Linux/Build.sh -projectfiles -project="/FactoryGame.uproject" -game -2022 +---- + +To create a Makefile: + +[source,bash] +---- +/Engine/Build/BatchFiles/Linux/Build.sh -projectfiles -project="/FactoryGame.uproject" -game -Makefile +---- + +Open the `FactoryGame.sln` file in Rider. +In the Rider settings, under `Toolset and Build`, make sure `.NET CLI executable path` is set to `/Engine/Binaries/ThirdParty/DotNet/8.0.300/linux/dotnet` + +Then to build it, run `make FactoryEditor` or any of the other targets. + +==== VS Code + +To generate a code-workspace file, run the following command, replacing `` and `` with the respective paths. + +[source,bash] +---- +/Engine/Build/BatchFiles/Linux/Build.sh -projectfiles -project="/FactoryGame.uproject" -game -VSCode +---- + +Open the `.code-workspace` file, **not** the folder. +In the workspace settings, add `/Engine/Binaries/ThirdParty/DotNet/8.0.300/linux` to `omnisharp.dotNetCliPaths` + +=== Other + +For other IDEs (not tested by us), you can view this page for command line options to generate project files for various other IDEs: https://github.com/satisfactorymodding/UnrealEngine/blob/5.3.2-CSS/Engine/Source/Programs/UnrealBuildTool/Modes/GenerateProjectFilesMode.cs#L26-L38 + +== Compile the project + +* For Rider, select `Development`, `Editor`, `Linux`, and then click the build button in the top right. +* For VS Code, press `Ctrl + Shift + P`, then select `Run Task`, then `FactoryEditor Linux Development Build` + +Then wait for the build to complete. + +== Open the editor + +If everything above was done correctly, you may now open the `FactoryGame.uproject` file in your Starter Project to launch the Unreal Editor. + +== Generating the Wwise Project + +You may see "GeneratedSoundBanks folder does not seem to be set" when you go to open the Unreal Editor, which is because the wwise-cli does not create a project automatically. +Instead, you must download the Wwise Authoring package by appending `--filter Packages=Authoring` to the command from earlier: + +[source,bash] +---- +./wwise-cli download --sdk-version "2023.1.14.8770" --filter Packages=SDK --filter DeploymentPlatforms=Windows_vc160 --filter DeploymentPlatforms=Windows_vc170 --filter DeploymentPlatforms=Linux --filter DeploymentPlatforms= --filter Packages=Authoring +---- + +Once that's completed, run + +[source,bash] +---- +wine ~/.cache/wwise-cli/wwise/2023.1.14.8770/Authoring/x64/Release/bin/Wwise.exe +---- + +which will open the Wwise Authoring application. +In the bottom left, click `New`. +Set the project name to `SatisfactoryModLoader_WwiseProject`, and the location to the root of your project folder. + +image:BeginnersGuide/Wwise/wwise-create-project-linux.png[Create Wwise Project] + +If you get a pop-up saying `No valid license key found. Wwise will run in Trial mode.`, you can ignore it and click `Close` in the bottom right. + +=== Generate Sound Banks + +Find the "Project Explorer" tab in the Wwise editor (left sidebar) +and select the `SoundBanks` sub-tab. +Right-click on the top level folder and click `Generate Soundbank(s) for all platforms`. + +image:Satisfactory/Wwise/Wwise_Soundbank_Generate.png[Generate Wwise Soundbanks] + +A pop-up should open stating "Completed with message(s)". +Click the `Close` button in the bottom right. + +Now you can open the Unreal Editor. +If you get the GeneratedSoundBanks pop-up, you can follow the link:project_setup.html#_generatedsoundbanks_folder_does_not_seem_to_be_set[normal instructions] now that the Wwise project is set up. \ No newline at end of file diff --git a/modules/ROOT/pages/Development/BeginnersGuide/dependencies.adoc b/modules/ROOT/pages/Development/BeginnersGuide/dependencies.adoc index fc3445728..3326439df 100644 --- a/modules/ROOT/pages/Development/BeginnersGuide/dependencies.adoc +++ b/modules/ROOT/pages/Development/BeginnersGuide/dependencies.adoc @@ -14,6 +14,9 @@ once everything is installed and built - 30+ GB is possible. Keep this in mind when deciding where put all your files - don't keep them on a drive with very little space left. +NOTE: This is for setting up the Modding Environment on Windows. +If you are on Linux, please follow the guide xref:Development/BeginnersGuide/LinuxSetup.adoc[here]. + == Before you Begin Make sure you've read the starting information on the @@ -341,4 +344,4 @@ To install Satisfactory Mod Manager, follow the directions xref:ForUsers/Satisfa The last dependency to obtain is a copy of the modding Starter Project. Check out the xref:Development/BeginnersGuide/StarterProject/ObtainStarterProject.adoc[next section] -for directions on how to obtain it. +for directions on how to obtain it. \ No newline at end of file