User Tools

Site Tools


modcreation

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
modcreation [2019/06/27 17:28]
umfdev created
modcreation [2019/07/04 09:24] (current)
umfdev [Important Links and Info]
Line 1: Line 1:
 +~~Title: Mod Creation ~~
 +{{tag>​Modding}}
 ====== Requirements ====== ====== Requirements ======
-* C# Compiler (Recommended:​ [[https://​visualstudio.microsoft.com|Visual Studio Community 2017 or Newer]]) +  ​* C# Compiler (Recommended:​ [[https://​visualstudio.microsoft.com|Visual Studio Community 2017 or Newer]]) 
-* .NET Decompiler (Recommended:​ [[https://​github.com/​0xd4d/​dnSpy|dnSpy]]) +  * .NET Decompiler (Recommended:​ [[https://​github.com/​0xd4d/​dnSpy|dnSpy]]) 
-* **[[install|uMod Framework]]** +  * **[[install|uMod Framework]]** 
-* [[API|UMF API Documentation]] +  * [[api:|UMF API Documentation]] 
-* [[https://​docs.unity3d.com/​ScriptReference|Unity Script Reference]] +  * [[https://​docs.unity3d.com/​ScriptReference|Unity Script Reference]] 
-* [[https://​github.com/​pardeike/​Harmony/​wiki/​Patching|Harmony Documentation]] +  * [[https://​github.com/​pardeike/​Harmony/​wiki/​Patching|Harmony Documentation]] 
-* A game with UMF installed into. +  * A game with UMF installed into. 
-* Some experience and/or patience and willingness to learn.+  * Some experience and/or patience and willingness to learn. 
 +\\
 ---- ----
  
Line 14: Line 17:
 ====== Mod Project Files ====== ====== Mod Project Files ======
   - Run ''​UMF.ProjectGenerator.exe''​ in ''​\uModFramework\Tools\''​ and fill in the data, then click ''​Generate Project Files''​.   - Run ''​UMF.ProjectGenerator.exe''​ in ''​\uModFramework\Tools\''​ and fill in the data, then click ''​Generate Project Files''​.
-    * [[File:UMF.ProjectGenerator_Example.png]]+    * {{:umf.projectgenerator_example.png?nolink|}}
     - Mod name with no spaces or special characters. This is used for the project files, class and assembly name.     - Mod name with no spaces or special characters. This is used for the project files, class and assembly name.
     - Where to save the source code of the mod.     - Where to save the source code of the mod.
Line 22: Line 25:
     - All References adds all dll files in the Managed folder as References, giving you access to all Unity classes as well as any separate classes the game provides. Only use if you know what you are doing.     - All References adds all dll files in the Managed folder as References, giving you access to all Unity classes as well as any separate classes the game provides. Only use if you know what you are doing.
   - Open your project solution by double clicking ModName.sln in the newly opened folder.   - Open your project solution by double clicking ModName.sln in the newly opened folder.
-    * File:UMF.ProjectGenerator_SolutionFolder.png +    * {{:umf.projectgenerator_solutionfolder.png?nolink|}} 
-    * File:UMF.ProjectGenerator_VisualStudio.png+    * {{:umf.projectgenerator_visualstudio.png?nolink|}}
   - Add your code and click Build > Rebuild. (Rebuild will clean your project before each build.)   - Add your code and click Build > Rebuild. (Rebuild will clean your project before each build.)
-    * See **[[#​Important Links and Info]]** to learn more about coding.+    ​* See **[[#​Decompiling Game Code]]** to learn about finding things to mod in the game code. 
 +    ​* See **[[#​Important Links and Info]]** ​for more useful info. 
 +\\ 
 +---- 
 + 
 +\\ 
 + 
 +====== Decompiling Game Code ====== 
 +In order to modify existing game code or figure out which game code you want to interface with you must decompile the game code using any decompiling program.\\ 
 +Due to the vast superiority of [[https://​github.com/​0xd4d/​dnSpy|dnSpy]] we highly recommend you use it to browse the game code.\\ 
 +Once you have installed dnSpy follow these steps: 
 +  - Run dnSpy once so that it integrates with windows explorer'​s right click context menu. 
 +  - Navigate to ''​...\<​Game Folder>​\<​Game Name>​_Data\Managed\''​. 
 +  - Right click ''​Assembly-CSharp.dll''​ and choose **Open with dnSpy**. 
 +    * Alternatively you can click **File > Open** inside the dnSpy and open this file. 
 +  - Navigate through the **Assembly Explorer** on the left side until you reach the ''​-''​ namespace (Code not having any namespace). 
 +    * {{::​dnspy_codelocation.png?​nolink|}} 
 +    * This is where you will find the vast majority of the game code for most games. 
 +    * Some games may use other namespaces for some of it's code. 
 +  - Use the **Assembly Explorer**, **Search** and **Analyze** tools of dnSpy to discover code relevant to what you want to mod and learn where it is tied to. 
 +    * See **[[guide_firstsrmod|My First Slime Rancher Mod (Modding Guide)]]** to learn various ways to create a basic mod. 
 +    * See **[[#​Important Links and Info]]** for more useful info.
 \\ \\
 ---- ----
Line 32: Line 56:
  
 ====== Important Links and Info ====== ====== Important Links and Info ======
-**[[API|UMF API]]** - The UMF API gives you access to various functions that makes modding easier, and is also required in order for the mod to be started. +  * **[[api:|UMF API]]** - The UMF API gives you access to various functions that makes modding easier, and is also required in order for the mod to be started. 
-**[[Mod Installer]]** - The UMF Mod Installer (URI Handler) lets you create one click Install links for your mods. +  ​* ​**[[guides|Modding Guides]]** - A list of guides to assist ​you in creating ​mods for UMF
-**[[Harmony]]** - Harmony is a useful library provided with UMF that lets you overwrite and inject code in MEMORY into existing classes and functions. +  ​* ​**[[Harmony]]** - Harmony is a useful library provided with UMF that lets you overwrite and inject code in MEMORY into existing classes and functions. 
-**[[UMF Patch]]** - An IL-based UMF scripting patch system used as a last resort to let you automatically overwrite code in dll files on disk when Harmony can't access it in any way. +  ​* ​**[[:​examplemods|Example Mods]]** - A list of open source UMF mods you can use as examples to better learn coding with UMF. 
-**[[Source Mods]]** - UMF can compile and run mods at runtime directly from .cs files placed in "''​\Mods\Source\ModName\''"​. ​(Requires Mono to be installed.) +  * **[[:​sourcemods|Source Mods]]** - UMF can compile and run mods at runtime directly from .cs files. 
-**[[Example Mods]]** - A list of open source UMF mods you can use as examples to better learn coding with UMF+  * **[[:​umfpatch|UMF Patch]]** - An IL-based UMF scripting patch system used as a last resort to let you automatically overwrite code in dll files on disk when Harmony can't access it in any way. 
-**[[dnSpy Guide]]** - A basic guide on how to use dnSpy for modding.+  ​* ​**[[:​modinstaller|Mod Installer]]** - The UMF Mod Installer ​(URI Handlerlets you create one click Install links for your mods
 +  ​* ​**[[:​umfhosting|UMF Hosting]]** - This will show you the steps to having your mod added to mod list on this website.
  
-UMF starts and access mods through **[[API:Attributes|Attributes]]**.\\ +UMF starts and access mods through **[[api:attributes:​start|Attributes]]**.\\ 
-Mods can currently be provided as .cs files, .dll files, .zip files(containing .dll files), and .umfmod files(packed and encrypted) by the **[[modpacker|Mod Packer]]**.\\+Mods can currently be provided as .cs files, .dll files, .zip files(containing .dll files), and .umfmod files(packed and encrypted) by the **[[:modpacker|Mod Packer]]**.\\
 UMF and Mods made with UMF does not re-distribute any code or game files from games or the Unity Engine. Making them both morally and legally safe.\\ UMF and Mods made with UMF does not re-distribute any code or game files from games or the Unity Engine. Making them both morally and legally safe.\\
-Mods made with UMF can also be freely sold/​marketed by the Mod Creator. (Provided they don'​t ​break the UMF License)+Mods made with UMF can also be freely sold/​marketed by the Mod Creator. (Provided they don'​t ​violate ​the UMF License)
 \\ \\
 ---- ----

This topic does not exist yet

You've followed a link to a topic that doesn't exist yet. If permissions allow, you may create it by clicking on “Create this page”.

modcreation.1561656498.txt.gz · Last modified: 2019/06/27 17:28 by umfdev