The Founders’ Fortune license allows decompiling the Founders’ Fortune source code for the purpose of creating mods and for education. This is how you do it.
1. Download and execute dnSpy
Other programs will work just as well, but dnSpy is a good starting point.
2. Open the Founders’ Fortune code
Using the open dialog in dnSpy, navigate to your Founders’ Fortune install directory, go to
Founders Fortune_Data\Managed\ and open
You should now be able to see and search through all of Founders’ Fortune’s code.
3. Get to know the code
This is a short description of the most important parts of the code. Tell me if you notice that parts of it are out of date. Most things written like
this are class name you can search for in dnSpy.
WorldScriptsgives you access to lots of managing classes handling all kinds of things in the world. For example
HumanAIis the base class for all humanoid creatures.
HumanManagerhandles instances of
HumanAIcontains a lot of informative properties, like
- Simlar to
CanvasHandlergives you access to all kinds of UI stuff via
- AI behavior is defined in
YieldMicroInteraction, though it might be difficult to modify.
- The most important interactable objects in the world are
- Everything people can interact with has an
Interactableobject, which has a reference back to the object. For example, there is
- Most static things in the world are
Furnitureobjects even if they’re not made by humans. For example, trees, crystal, ships, etc. This is a poor naming choice that’s now just part of the code
Modulesubclasses that help define the behavior of the object. For example, a workbench contains a
furniture.jsonfor the definitions which furniture contains which modules.
Make sure you also use the in-game object inspector to traverse the data structures live while playing the game!
4. Ask away!
There is no documentation that will tell you all the things that could be relevant to making your mod. So, after investigating yourself, feel free to ask other community members and us devs for help on how to solve your problem