Difference between revisions of "How to add new game (UMM)"
m (Newman55 moved page How to add new game to How to add new game (UMM): Specifics) |
|||
Line 11: | Line 11: | ||
<StartingPoint>[Assembly-CSharp.dll]App.Awake:After</StartingPoint> | <StartingPoint>[Assembly-CSharp.dll]App.Awake:After</StartingPoint> | ||
<UIStartingPoint>[Assembly-CSharp.dll]MainMenu.Start:After</UIStartingPoint> | <UIStartingPoint>[Assembly-CSharp.dll]MainMenu.Start:After</UIStartingPoint> | ||
+ | <GameVersionPoint>[Assembly-CSharp.dll]Version.GetString</GameVersionPoint> | ||
</GameInfo></pre> | </GameInfo></pre> | ||
Only all fields need to be replaced by your actual data. | Only all fields need to be replaced by your actual data. | ||
− | == | + | == Details == |
− | ''Name ''- Game name.<br/> ''Folder ''- Name of game folder, for example, as in steam. UMM will try to find path to game by this name.<br/> ''ModsDirectory ''- Mods folder.<br/> ''ModInfo ''- The info file from which to start scripts.<br/> ''GameExe ''- Game launch file. Required for Doorstop method.<br/> ''EntryPoint ''- The path to function where UMM will be installed. Required for Assembly method.<br/> ''StartingPoint ''- The path to function where the mods will be loaded. Required | + | ''Name ''- Game name.<br/> ''Folder ''- Name of game folder, for example, as in steam. UMM will try to find path to game by this name.<br/> ''ModsDirectory ''- Mods folder.<br/> ''ModInfo ''- The info file from which to start scripts.<br/> ''GameExe ''- Game launch file. Required for Doorstop method.<br/> ''EntryPoint ''- The path to function where UMM will be installed. Required for Assembly method.<br/> ''StartingPoint ''- The path to function where the mods will be loaded. Required.<br/> ''UIStartingPoint ''- The path to function where will be showing UMM UI. Optional.<br/> ''GameVersionPoint'' - The path to static function or field that contains game version. The format must be 'x.x.x'. Optional.<br/> ''OldPatchTarget ''- For new games is not needed. |
== How to find the Point == | == How to find the Point == |
Revision as of 09:27, 18 March 2019
How to
The UnityModManager can support most of games made on the Unity engine, you just need to create rules for how the UMM will interact with game.
Find 'UnityModManagerConfig.xml' configuration file and add the code for the new game.
<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>
Only all fields need to be replaced by your actual data.
Details
Name - Game name.
Folder - Name of game folder, for example, as in steam. UMM will try to find path to game by this name.
ModsDirectory - Mods folder.
ModInfo - The info file from which to start scripts.
GameExe - Game launch file. Required for Doorstop method.
EntryPoint - The path to function where UMM will be installed. Required for Assembly method.
StartingPoint - The path to function where the mods will be loaded. Required.
UIStartingPoint - The path to function where will be showing UMM UI. Optional.
GameVersionPoint - The path to static function or field that contains game version. The format must be 'x.x.x'. Optional.
OldPatchTarget - For new games is not needed.
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 :Before - Run before or after.
Finally
If the UMM UI appears when starting game, it means it works.
Send the new code to the forum and with next update it will be added to UMM.