Skip to content
Menu
SteamAH
  • Cheat
  • Guide
  • Tips
  • Game Lists
  • Privacy Policy
  • Abuse
SteamAH

Farthest Frontier How to Create Your Own Mod with MelonLoader

Posted on August 28, 2022

For Farthest Frontier players, since this is a unity game, so it has the possibility to be modded with MelonLoader and this guide will explain how.

 

Step 1 : Downloading required tools

You need to download 3 things :

  • MelonLoader [github.com]
  • Il2CppDumper [github.com]
  • Visual Studio 2022 (with .NET Framework 4.7.2) any edition (community edition is enough)

The first tool will help us to load our mod into Farthest.
The second tool will dump some DLLs we need to have from Unity.
The last one will compile our mod into DLL format file. (I will not detail here how to install Visual Studio 2022, there are many videos on YT for you :))

Step 2 : Installing MelonLoader

So now, we have to install our tools. For MelonLoader, you should have downloaded the installer from previous step.
Launch the installer and you shoud see that :

Farthest Frontier How to Create Your Own Mod with MelonLoader

Now click on “Select” button and open your exe file :

Farthest Frontier How to Create Your Own Mod with MelonLoader

Click on “Install”.
You should see now a bunch of new folders/files into your main folder :

Farthest Frontier How to Create Your Own Mod with MelonLoader

Congrats ! You installed the loader for mods !

Step 3 : Dumping Unity Dlls

Now we absolutely need to get those DLLs to reference them in our modding project in Visual Studio.
So, extract zip folder of “Il2CppDumper” and open the “Il2CppDumper.exe”:

Farthest Frontier How to Create Your Own Mod with MelonLoader

You should have a console opened asking you to open a file :

Farthest Frontier How to Create Your Own Mod with MelonLoader

Open the “GameAssembly.dll” file as shown above. The program will ask you to open a second file. This second one is located in “Farthest Frontier\Farthest Frontier_Data\il2cpp_data\Metadata” and is called “global-metadata.dat”. After this second file opened, the program should have extracted the DLLs:

READ:  Farthest Frontier How to Get More Builders

Farthest Frontier How to Create Your Own Mod with MelonLoader

Note : You !!! WILL HAVE TO REPEAT THIS STEP TO KEEP YOUR MOD UPDATED !!!
A new folder has been created in “Il2CppDumper.exe” folder called “DummyDll”

Farthest Frontier How to Create Your Own Mod with MelonLoader

This folder contains all DLLs we need for Visual Studio :

Farthest Frontier How to Create Your Own Mod with MelonLoader

Step 4 : Making mod

First thing we need to do is to create our modding project with Visual Studio :

Farthest Frontier How to Create Your Own Mod with MelonLoader

Be sure you selected DLL with . NET Framework, it won’t work otherwise !
You now have a new sample project with basic class :

Farthest Frontier How to Create Your Own Mod with MelonLoader

Let’s add DLLs from MelonLoader + dumped from Farthest.
To do that, right click on “References” and add the following DLLs :

  • Assembly-CSharp
  • MelonLoader
  • UnityEngine
  • UnityEngine.CoreModule
  • UnityEngine.InputLegacyModule

Farthest Frontier How to Create Your Own Mod with MelonLoader

Those DLLs are located at :

  • Assembly-CSharp : inside folder named “DummyDll” (Step 3 : Dumping Unity Dlls)
  • MelonLoader : inside folder named “MelonLoader” (Step 2 : Installing MelonLoader)
  • UnityEngine : inside folder named “DummyDll” (Step 3 : Dumping Unity Dlls)
  • UnityEngine.CoreModule : inside folder named “DummyDll” (Step 3 : Dumping Unity Dlls)
  • UnityEngine.InputLegacyModule : inside folder named “DummyDll” (Step 3 : Dumping Unity Dlls)

You have to add at least those 5 Dlls to your mod project. Notice that there are more Dlls in “DummyDll”. Here the most important is “Assembly-CSharp”. It contains most data of your game. Of course, you can add other Dlls if you want to add specific things related to Unity.

Now expand the “Properties” with icon tool above “References”. It contains a file named “AssemblyInfo.cs”. Open it and add this :

using System.Reflection;
using System.Runtime.InteropServices;
using MelonLoader;
using ModTuto;
// …
[assembly: MelonInfo(typeof(Class1), “Test”, “0.0.0”, “ϞϢϘ”) ]//MelonInfo(typeof(ClassOfMod), “Game Mod Name”, “Version”, “Author”)
[assembly: MelonGame(“Crate Entertainment”, “Farthest Frontier”)] //MelonGame(“Studio”, “Game”)]

Farthest Frontier How to Create Your Own Mod with MelonLoader

Now add some sample features in our mod :

READ:  Farthest Frontier How to Fix Black Screen

Farthest Frontier How to Create Your Own Mod with MelonLoader

using UnityEngine;
using MelonLoader;
namespace ModTuto
{
    //The class called by MelonLoader. This class has to inherit of MelonMod main class
    public class Class1 : MelonMod
    {
        public override void OnUpdate()
        {
            //This is one of Melon API function we can use to add features : https://melonwiki.xyz/#/modders/quickstart
            //Here only a key to exit the game and another to spawn a villager on cursor position
            if (Input.GetKeyDown(KeyCode.T))
            {
                Application.Quit();
            }
            if (Input.GetKeyDown(KeyCode.V))
            {
                MelonLogger.Msg(“V pressed”);
                GameManager gameManager = GameObject.Find(“GameManager”).GetComponent<GameManager>();
                if (gameManager != null)
                {
                    Vector3 mousePosition = Input.mousePosition;
                    Vector3 terrainWorldPointUnderScreenPoint = gameManager.terrainManager.GetTerrainWorldPointUnderScreenPoint(mousePosition);
                    gameManager.villagerPopulationManager.SpawnVillagerImmigration(terrainWorldPointUnderScreenPoint, true);
                }
            }
        }
    }
}

Let’s install our mod ! Build the Dll file and drop it into “Mods” folder :

Farthest Frontier How to Create Your Own Mod with MelonLoader

Now you can press ‘T’ to leave the game or ‘V’ to spawn villager on cursor position !
If you wanna explore what you can do, you will have to search inside “Assembly-CSharp” !

READ:  Farthest Frontier Field and Farming Guide

 

 

 

That’s all we are sharing today in Farthest Frontier How to Create Your Own Mod with MelonLoader, if you have anything to add, please feel free to leave a comment below, you can also read the original article here, all the credits goes to the original author ϞϢϘ

MORE GAME GUIDES FOR YOU

Related Posts:

  • Farthest Frontier Extended Camera Mod Guide
  • Farthest Frontier How to Get More Builders
  • Farthest Frontier How to Fix Black Screen
  • Farthest Frontier Field and Farming Guide

5 thoughts on “Farthest Frontier How to Create Your Own Mod with MelonLoader”

  1. Vinay Choudhary says:
    October 10, 2022 at am3:48

    Hi.
    Thanks for great tutorial.

    I am just trying it out and wanted to get building objects. How can we get an building object?

    Reply
  2. Toastgeraet says:
    October 16, 2022 at pm1:57

    Hi,

    thanks for your cool tutorial. Unfortunately i get an error, which i have been trying to debug and research for a few hours now.

    My Project wont build:
    Error CS0012 The type ‘Object’ is defined in an assembly that is not referenced. You must add a reference to assembly ‘System.Private.CoreLib, Version=6.0.0.0, …

    The error is for the Method from the Unity dll files… I have installed and uninstalled all kinds of .NET Framework (2.0.0 – 6.0.0) and rebooted. I have installed the new Unity and the Visual Studio plugin. I have tried so many things…

    I even tried Visual Studio Community 2017 as suggested elsewhere.

    I would appreciate it tons, if u had any insight regarding this. Thanks again for your efforts to share this tutorial with us!

    Reply
    1. Toastgeraet says:
      October 16, 2022 at pm11:18

      I found out what the issue was. I accidentally downloaded the .net-6-release of IL2CPP, which generates the undesired dll files. Once i chose the correct release, everything went fine.

      Thanks again for your tutorial. Worked like a charm.

      Reply
  3. Toastgeraet says:
    October 17, 2022 at am11:12

    I have had another problem. Again with the DLL Files created by IL2CPP. They seem to not generate all the necessary symbols.

    For instance they generate the field ResourceManager.fishingShacksRO. But that is not usable. A MethodIsMissingException is thrown at runtime when trying to access that. Your example code worked with the DLLs though!

    But fortunately the whole IL2CPPDumper process is not necessary, because MelonLoader already dumps and generates all the necessary DLL files and places them under:
    …Steam\steamapps\common\Farthest Frontier\MelonLoader\Managed
    and
    …Steam\steamapps\common\Farthest Frontier\MelonLoader

    With these DLL files i was able to create an advanced Mod that puts event listeners on fishingShacks to be notified for depletion of resources. My next step is to figure out how to turn that into an ingame notification.

    Without your tutorial i would not have gotten this far, though.

    Thanks

    Reply
    1. a says:
      February 23, 2023 at am5:03

      What version of IL2CPPDumper did you download? I also downloaded net6 version and it gave me errors, I have tried win version and still getting errors.

      Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Disclaimer

All content cited is derived from their respective sources. If you think we have used your content without permission, Please go to the Abuse Page to contact us and we will be taking it seriously.

Recent Posts

  • Resident Evil 4 How to the Sound Stutters during Cutscenes and Gameplay
  • Blacksmith Weapon Merchant 100% Achievement Guide
  • Resident Evil 4 All Keycard Locations Guide
  • Have a Nice Death All Artifact Locations Guide
  • Deflector How to Unlock Spark
©2023 SteamAH | Powered by SuperbThemes & WordPress