Obenseuer/Modding:Game Decompilation: Difference between revisions
Initial page |
mNo edit summary |
||
| (5 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
{{breadcrumb|Obenseuer|Modding}} | |||
== Notice on Copyright == | |||
Modding a game does not mean it is free of copyright. Redistributing assets is not allowed and is banned from distribution websites entirely. These instructions are here to allow you to browse the game's source without needing to request copyrighted assets. | |||
== Debugging == | == Debugging == | ||
| Line 30: | Line 36: | ||
* [https://github.com/ManlyMarco/RuntimeUnityEditor/releases Runtime Unity Editor (built for BepInEx)] | * [https://github.com/ManlyMarco/RuntimeUnityEditor/releases Runtime Unity Editor (built for BepInEx)] | ||
* [https://github.com/sinai-dev/UnityExplorer/releases UnityExplorer (built for BepInEx, but also supports running standalone with no modloader)] | * [https://github.com/sinai-dev/UnityExplorer/releases UnityExplorer (built for BepInEx, but also supports running standalone with no modloader)] | ||
== Browsing Scene Hierarchy in Unity Editor == | |||
The other way to browse scene hierarchy (as well as the rest of the project) is to decompile the full game back into a Unity project. | |||
<blockquote> | |||
Note that these instructions are somewhat unreliable, given each distribution of the game may change how the decompiler generates the project even slightly, which means some extra work may be required to get the project into a workable state even if you do follow them perfectly. This is especially true for code errors, you may have to comment out or fix some code errors which the decompiler wrongly generated. | |||
</blockquote> | |||
The tool to do this with is [https://github.com/assetripper/assetripper AssetRipper]. Following the steps below will allow you to obtain a decompiled version of the game. | |||
# Drag the game's folder into AssetRipper using the default settings. | |||
# Delete <code>AuxiliaryFiles</code> in the generated folder. | |||
# Bring the contents of the <code>ExportedProjects</code> folder up one level, then delete the directory. | |||
# Delete <code>LightingDataAssets</code> in the <code>Assets</code> folder. This will prevent crashes when opening it in the editor. | |||
# Create a <code>Assets/Plugins/</code> directory. | |||
# Drag the following assemblies from the compiled game's directory to the <code>Assets/Plugins/</code> directory: | |||
## <code>Assembly-CSharp-firstpass</code> | |||
## <code>AstarPathfindingProject</code> | |||
## <code>BehaviourDesignerRuntime</code> | |||
## <code>Pathfinding.ClipperLib</code> | |||
## <code>Pahtfinding.Ionic.Zip.Reduced</code> | |||
## <code>Pathfinding.Poly2Tri</code> | |||
## <code>SALSA-LipSync</code> | |||
# Install <code>Unity 2019.4.41f2</code>. | |||
# Open the project using Unity. | |||
# Change the .NET compatibility level in the project settings to <code>4.x</code>. To access the project settings menu, go to '''Edit''' > '''Project Settings''' > '''Player''' > '''Other Settings''' > '''Configuration''' > '''Api Compatibility Level''' | |||
# Install Packages from the Package Manager (to access Package Manager, go to: '''Window''' > '''Package Manager'''): | |||
## <code>TMPro</code> | |||
## <code>Post Processing</code> | |||
## <code>Mathematics</code> | |||
## <code>Addressables</code> | |||
## <code>Multiplayer HLAPI</code> | |||
## <code>Entities</code> (this is a preview package in <code>2019.4.41f2</code>, you need to install it from that tab) | |||
## <code>Animation Rigging</code> (this is a preview package in <code>2019.4.41f2</code>, you need to install it from that tab) | |||
# Fix any code errors | |||
== Browsing and Exporting Singular Assets == | |||
You may simply want to export a singular asset or a small number of assets without caring about project structure. In this case, AssetStudio is a tool which allows you to do that with little effort and no time, unlike decompiling the full game which may take several hours. | |||
In this case, you can use [https://github.com/Perfare/AssetStudio/releases AssetStudio]. | |||
Note that AssetStudio will not work for Unity 6, which is the next version of the game once the Bazaar update releases. You may then use the [https://github.com/Razviar/assetstudio/releases AssetStudio fork here] instead. | |||
[[Category:Obenseuer Modding]] | |||