🏒
Puck
  • Welcome!
  • GETTING STARTED
    • Development environment setup
    • Using the Puck API
    • Testing your mod
    • Development optimizations
  • PUBLISHING
    • SteamWorkshopUploader
    • Publishing to the Steam Workshop
  • Puck API
    • Singletons
    • Harmony
    • Referencing the source
Powered by GitBook
On this page
  1. Puck API

Referencing the source

PreviousHarmony

Last updated 8 days ago

Using singletons and performing Harmony patching is great, but how do you actually figure out what singletons are available to you and what methods within those singletons or other classes can be patched?

dnSpy

dnSpy is a great tool which allows you to inspect the contents of an assembly. It offers a lot more than just inspecting assemblies, but for our purposes, this is all we need.

  1. Download & extract dnSpy to a directory of your choosing

  2. Launch the dnSpy.exe

  3. At the top left, click on File, then Open and open a Puck.dll in your libs folder of your mod.

You can now look through the Puck.dll and observe all types and classes used by Puck. Not only that, but you can also see a minimally obfuscated representation of the Puck source code. Having understanding of the code that runs Puck will be beneficial in creating more advanced mods which change some core logic of the game.