Jump to content

Best way to "find" the right methods or instances to modify?


Recommended Posts

I am a fullstack web developer and have been working with the web for the better part of 10 years. Game development is completely foreign to me, but I want to take a stab at building a small mod.

I am curious how you guys go about finding the right instances to mod in the codebase. I am used to having access to dev tools - a simple right click + inspect element in the browser will help me find just about anything in a web codebase. 

How do I "find" what I am looking to mod? What if I want to mod the UI for example? I am digging around with dnSpy at the moment but its like shooting in the dark trying to find the right instance to mod to simply change the color of a menu.

Link to comment
Share on other sites

As a fellow coder, I suggest you take a look at some C# to sharpen (pun intended) your code reading and better identify the functions.

However, the specifics of the modding process are unknown to me. Next commenter might help.

 

Link to comment
Share on other sites

The UI is mostly implemented using Unity prefabs, which are significantly harder to examine.  They're bundled in the assets, not in the code.

 

I suggest using DNSpy's export feature to export the decompiled source to a folder and using Visual Studio to navigate, it has superior searching and navigation tools.

Additionally, it will take some getting used to the code base to figure out what things are.  I have a lot of experience so I am used to these patterns in naming/ways to do things, but when you start, the `STRINGS` namespace is very useful.  You can search for the friendly name in game and get the internal name (in all caps).  Then the internal name should match the class name for whatever controls that.

 

Also consider joining the unofficial discord and looking at the Modding section, we can help with more specific questions a lot faster and more in depth there!  There's also a lot of resources and a couple guides linked.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...