Skip to content

How to add new game

newman55 edited this page Sep 5, 2024 · 2 revisions

Config

Unity Mod Manager can support most games created on the Unity engine (excluding games compiling as ILCPP), you just need to create a config for this. Find the configuration file UnityModManagerConfig.xml and add the code for the new game, the example below.

<GameInfo Name="Some Game">
	<Folder>GameFolder</Folder>
	<ModsDirectory>Mods</ModsDirectory>
	<ModInfo>Info.json</ModInfo>
	<GameExe>somegame.exe</GameExe>
	<EntryPoint>[UnityEngine.UIModule.dll]UnityEngine.Canvas.cctor:Before</EntryPoint>
	<StartingPoint>[Assembly-CSharp.dll]App.Awake:After</StartingPoint>
	<UIStartingPoint>[Assembly-CSharp.dll]MainMenu.Start:After</UIStartingPoint>
	<GameVersionPoint>[Assembly-CSharp.dll]Version.GetString</GameVersionPoint>
</GameInfo>

Details

  • Name: Game name.
  • Folder: Name of the game folder, for example, as for Steam. UMM will try to find the path to the game by this name.
  • ModsDirectory: Mods folder.
  • ModInfo: The name of the metafile.
  • GameExe: Game launch file. Required for the Doorstop method.
  • EntryPoint: The path to the function where UMM will be installed. Required for the Assembly method.
  • StartingPoint: The path to the function where the mods will be loaded. Required.
  • UIStartingPoint: The path to the function where the UMM UI will be shown. Optional.
  • GameVersionPoint: The path to a static function or field that contains the game version. The returned format must be 'x.x.x'. Optional.
  • SessionStartPoint: The path to the function. It is assumed that this will run after loading a new or saved game. Optional.
  • SessionStopPoint: The path to the function. It is assumed that this will run after the session is closed. Optional.
  • MinimalManagerVersion: Mods will not start below this version.
  • Comment: Additional information (displayed on the installer).
  • ExtraFilesUrl: Direct link to a zip archive that will be unpacked to the game folder.

How to find the Point

Open the Assembly-CSharp.dll file (located in the Game_Data\Managed game folder) via the Dnspy tool. Look for a function that runs as early as possible. Most often their class is called App, Main, Menu. You should have as [Assembly-CSharp.dll]App.Awake:After

  • App: Class (add namespace if present).
  • Awake: Function.
  • :After or :Before: Run before or after.

Finally

If the UMM UI appears when starting the game, it means it works. Send the new part of the code to the forum and with next update it will be added to UMM.

Clone this wiki locally