×
Create a new article
Write your page title here:
We currently have 152 articles on Grow Song of The Evertree Wiki. Type your article name above or create one of the articles listed here!



    Grow Song of The Evertree Wiki

    Modding Grow: Difference between revisions

    Content added Content deleted
    Line 60: Line 60:


    Once you've got all that sorted, it'll look something like this:
    Once you've got all that sorted, it'll look something like this:
    [[File:ModdingDisplayWakeup.png|thumb]]
    [[File:ModdingDisplayWakeup.png|left|frameless|497x497px]]

    Revision as of 01:08, 10 January 2023

    The following limited set of instructions is a copy of those relayed to a user who assisted in the the creation of my ConfigureLimits mod. While a proper guide will eventually be written, I am recording this in the case it may be useful to others.

    Initial Setup of IDE

    1. Like the install instructions on my mod page (ConfigureLimits on NexusMods), I downloaded BepInEx and put it into Grow's root directory in the steam library, then ran the game once to generate all the extra directories/files I'd need

    2. I downloaded and installed Visual Studio community edition, which is free for everyone: https://visualstudio.microsoft.com/vs/community/

    3. Launch Visual Studio and click on 'Create a New Project'

    4. Choose the Class Library (.NET Framework) option, check the box to place solution and project in the same directory, then click Next

    5. Adjust any project or solution names as you see fit (this will be the name attached to the .dll file you create) and make sure that the framework selected is 4.7.2 (this is the version compatible with grow)

    6. Note the directory the project will be created in, then click Next

    7. After a few seconds, the project will be created! Now we can move on to part two...

    Dependencies + Importing References

    1. Now, navigate to the directory for your mod project (usually something like C:\users\<username>\source\repos\<projectname>)

    2. Inside this folder, we'll create a new folder called Libs. This is where we'll put all the reference files we'll need for the IDE to do what it needs to.

    3. Open a new file explorer window, then head to Grow's root directory and dive down into Grow_Data > Managed. Copy the Assembly-CSharp.dll file and paste it into your newly-created Libs folder

    4. Repeat this for the UnityEngine.dll and UnityEngine.CoreModule.dll files in the same directory

    5. Back out to the root directory again, then dive to BepInEx > Core

    6. Copy over the 0Harmony.dll and BepInEx.dll files to the Libs directory as well

    7. Now, return to the Visual Studio window where we've set up your project. On the right-hand Solution explorer pane, you should see properties, references, and your class file.

    8. Expand References, then right click and choose 'Add Reference'.

    9. Click the 'browse' button at bottom right, then navigate to the Libs directory that's full of the .dlls you borrowed. Add each one this way, then click OK after all have been added.

    Now we're ready to start actually coding in part three!

    Adding References + wakeup script

    1. While some 'using xxx;' lines already probably exist at the start of your project, you'll need a few more for Visual Studio to recognize all the code you're going to want to write. These lines essentially say 'bring this function of the .dll into what I'm doing'

    Example: using System; using System.Reflection; using System.Reflection.Emit; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using BepInEx; using BepInEx.Configuration; using HarmonyLib; using HarmonyLib.Tools; using UnityEngine; using UnityEngine.Diagnostics; using BepInEx.Logging;

    Once you've got all that sorted, it'll look something like this:

    File:ModdingDisplayWakeup.png
    Cookies help us deliver our services. By using our services, you agree to our use of cookies.
    Cookies help us deliver our services. By using our services, you agree to our use of cookies.