One Lonely Outpost

One Lonely Outpost

评价数不足
Extracting Game Assets
由 Rijam 制作
A guide on how to extract the assets and code from One Lonely Outpost.
   
奖励
收藏
已收藏
取消收藏
Preface
One Lonely Outpost was created with Unity. This is a guide on how to extract the assets of One Loney Outpost. This guide would also probably work with other Unity games.

This guide is also posted on the One Lonely Outpost Wiki[onelonelyoutpost.wiki.gg] These are the tools and processes I used to extract the game assets so I can update the wiki.

All assets and code are property of indie.io, Mi-Lan Studio, Aurorian Studios, Cathar Games, Enjoy Studio, and other contributors.
Extracting the Audio
  • The audio is stored in FMOD .bank files within One Lonely Outpost/One Lonely Outpost_Data/StreamingAssets
  • FenixProFmod[github.com] is a tool that you can use to extract all of the bank files.
  • Unfortunately, the version that is in the GitHub releases doesn't work. The program will crash when you click any buttons.
  • The program does works if you build it from the source code, though.
  • Building the program might be complicated if you've never built a program from the source code before.

Using Visual Studio to build FenixProFmod
  • One way to build the code is to use Visual Studio Community 2022[visualstudio.microsoft.com]. Visual Studio Code and Rider would probably also work.
  • Open the FenixProFmod.sln file.
  • You will need to install the .NET Multi-platform App UI development package.
    • You can install this with the Visual Studio Installer or by clicking Tools -> Get Tools and Features in an empty VS window.
  • Attempt to build the program by clicking Build -> Build Solution.
  • The program also requires a few NuGet packages and Android SDK. Visual Studio should suggest you install them after you try to build the project.
  • Install the NuGet packages and Android SDK when prompted.
  • Android SDK requires that you accept the licenses for it.
    • If it fails to automatically accept the licenses, check this Geeks for Geeks article[www.geeksforgeeks.org] on how to trouble shoot that.
      • Check C:\Program Files (x86)\Android\android-sdk\licenses (for Windows) to see if there are files for each of the licenses.
      • If those files exist and Visual Studio is still saying it can't accept the licenses, try restarting your computer.
      • If you had Android SDK installed previously, you may have two copies in two different locations.
  • After all the dependencies are installed and the Android SDK licenses are accepted, build the project again with Build -> Build Solution.
      Building in Release mode didn't work for me. Debug mode worked just fine, though.
      • To switch between Release and Debug mode, click the drop down below the top toolbar.
      • Leave CPU to AnyCPU (that's probably the only option you have anyway).
  • After the program successfully builds, you can find the .exe in FenixProFmodAva.Desktop\bin\Debug\net8.0.
    • If you built in Release mode, look in the Release folder instead.
  • Once you have built the program, add the input folder and your choice of output folder.
    • Using the file dialog system replaces spaces with %20. The program will then say that it can't find that folder. Replace any %20s with real spaces. Backslashes are ok (on Windows).
    • The game contains a Master.strings.bank. The program will error on that file, so exclude that from the file list. (Copy all of the banks except the Master.strings.bank to somewhere else. Or temporarily move Master.strings.bank to somewhere else.)
  • Click Extract.
  • Now you have all of the sounds and music from the game in OGG format!
Extracting the Textures, Scripts, and Other Assets
  • One Lonely Outpost uses Unity which means all of the assets are stored in the different Unity asset files.
  • Use a tool such as AssetRipper[github.com] to extract all of these.
  • Before loading anything into AssetRipper, I recommend changing some settings:
    • Change the Sprite Export Format to Texture. This way it will actually generate images instead of giving us YAML files.
    • Change the Image Export Format to PNG if it isn't already.
    • The rest of the default settings should work.
  • Click File -> Open Folder
  • Choose One Lonely Outpost/One Lonely Outpost_Data
  • This will take a second to load all of the data.
  • There are many files to look through, but most of the important stuff can be found in resources.assets, sharedassets1.assets, cab-c0cd047d5ea1da722baed9a9e1652a11, or 411f76744ea4997c2bf2f93d3a4a546b_unitybuiltinshaders_e82937750a1b9e1f3215a1fa617fcba7
    • The image files are either in Sprites or Texture2D. AssetRipper will let you preview the Texture2Ds.
    • The game data is in MonoBehaviour and MonoScript.
  • To export, choose a file. For example: cab-c0cd047d5ea1da722baed9a9e1652a11
    • Select the first item in that file.
    • Click either Export -> Export all Files or Export -> Export all Files of Selected Type
      • Export all Files will export all of the subfiles in the file you choose. (It won't export every parent asset file.)
      • Export all Files of Selected Type will export just the subfile that you are highlighting. Example: you highlighted the Texture2D subfile. It will export just the Texture2Ds.
      • You may need to try a couple times. Sometimes it doesn't seem to export in the way that I was hoping it would.
    • Select the destination folder. The export process may take a long time depending on how much you are exporting.
  • Exploring the exported assets is quite a chore. Some assets that should exist you won't find because it happens to be stored in a different Unity asset file.

Looking at the scripts
  • I highly suggest opening the exported MonoBehaviour or similar folder in an IDE like Visual Studio. That way you can use it's find in files search function which is much faster and more useful than the Windows File Explorer search.
    • A lot of the scripts will reference hashes which are long strings of numbers and letters in hexadecimal format.
      • If you see the dead beef hash (0000000deadbeef15deadf00d0000000), that means the export reference failed.
      • If it is not the dead beef hash, you can search that hash to find what it is referencing.
      • If the thing you are trying to find is reference an image:
        • Look at your exported Texture2D and Sprite assets. You will see that they also come with a .meta file. The meta files contain the hash of the image. You can match up the hashes to find the image the script is referencing.
Decompiling the Code
  • In the One Lonely Outpost\One Lonely Outpost_Data\Managed folder, there are many compiled .dll files containing code.
  • The one we are interested in is the Game.dll.
  • Use a tool such as ILSpy[github.com] to decompile the dlls.
  • You can drop the just Game.dll into ILSpy or all of the dlls if you wish.
  • Click File -> Save Code...
  • Choose where you want to save the code.
  • After it is finished with the decompilation, you can open the generated Solution.sln file with Visual Studio or another IDE to explore the code. The OLO specific code is in the Game directory.
    • Note: Most of the juicy game data that you are probably looking for is in the Unity assets as MonoBehaviours.