This tutorial covers how to add anything that might have a 3D object representation in game.
- Equipment (Tools, Weapons, Clothes, Armor)
- Walls, Fortifications, Fences (all count as “walls”)
- Pillars (counts as “furniture”)
For most of these items, you can find an example setup in the Unity Project and in the Example Mod contained in the FFModKit. If you’re unsure how to use any of the tools or how it’s supposed to be set up, have a look at these two places and see how it’s done there.
Example Walkthrough on how to make “furniture” objects
1. Make a folder for your asset(s)
In order to use your assets, we will use the Unity FFModKit to compile your 3D models, materials, textures and icons into one
.ffasset file. For this purpose create a folder in the
Resources folder in Unity. One folder will be compiled to one
.ffasset file, no matter what’s in there. This way, you can organize your assets however you like.
2. Make a 3D model
Use blender or any other tool to make a 3D model of your idea. For inspiration and templates, you can have a look at google poly or other places where you can get assets. Make sure to not violate any licenses.
Put your model in the
Resources/MyFurnitureAsset/ folder. This is my simple, yet awesome (programmer art) laser sword workbench:
3. Set up materials
Simply create a new Unity material using the Unity Standard Shader or any Shader in the
For many people, the Standard Shader workflow is the easiest way of coloring your object, because it’s what they’re used to.
We devs often use the “Manual Shader” family so we can quickly set colors for the object in-engine. It basically works by using the objects UV coordinates to assign a color based on the settings in the material. There are some caveats however: If you use
ManualDoubleSided you’ll need to “bake” the material before you can use it ingame. Otherwise, you will not be able to compile the
.ffasset. We don’t recommend this workflow to newcomers and people used to working with the Standard Material. If you do want to know more about it, let me know.
4. Make Icons
Your assets need 2 Icons in order to be visible in the game:
yourFurnitureNameIcon.pngat 128x128 px
yourFurnitureNameIconBig.pngat 512x512 px
You can use any tool you want to make these Icons, but we have set up a special tool called “photoStudio”:
- In Unity, navigate to
Tools/photoStudioand open the photoStudio scene
- Put your object in that scene. You might need to remove whatever example object is already in there
- In the top bar of the “Game” window in Unity, set your resolution to something square, like 512x512
- Find the MainCamera and position it such that your item is clearly visible and icon-ready
- Be sure you always move the “parent camera”, so both camera are always in the exact same location. One camera is for you to look at the object, the other actually takes the picture.
- Start the game
- Enter the name of your object, for example
- Click on “Shoot Photo!”
- The game has now created and saved icons in various sizes in the
5. Add a drop shadow to the icons
Most icons in Founders’ Fortune have a white drop shadow. For most people it’s easiest to just open GIMP and add a white drop shadow themselves.
For our development purposes, we have created an automatic system that can quickly apply drop shadows to hundreds of object. However, this system takes some time to set up. If you’re interested, check the instructions on the FFModKit Readme.
Finally, copy your icon over to your asset folder and check if the settings in Unity are set correctly:
6. Compile the
First, make sure that all of these necessary files are in your
- The 3D objects you want to include
- Any accompaning materials and textures
- The icons, properly named
Next, select this folder in the Unity Hierarchy Panel - not in the tree view, but in the big panel.
Right click on the folder and click “Build Asset Bundle”.
In the folder
FFModKit/BuiltAssetBundles the tool has now created a
MyFurnitureAsset.ffasset file. This is the compiled version of all the work. Copy this folder in your mod folder and the game automatically has access to all the assets contained in it!
7. Configure your
In order to use any new object in the game, you need to tell Founders’ Fortune about it. This is done by writing json files. In this example, we create a configuration file for a furniture object. Put a file called
furniture.json in your mod folder.
For guidance on how to configure your furniture, check the example furniture in the example mod contained in the ModKit. Link to online version here.
For more examples, check the game’s own configuration files. I uploaded them to the ModKit as well.
7.1 How to set up interaction transforms
If your object is not only decorative, you will need to tell the game where your villagers need to stand in order to properly interact with it. This is done through the
interactionTransforms property of the element in
In many cases it’s fine to simply copy the
interactionTransform from a similar piece of furniture in the base game, but there are situations where you can’t find a similar furniture. In this case, check out the InteractionScene in the Scenes folder in Unity. You can find an example colonist working on a workbench. The transform of the workbench is set to (0,0,0) location and (0,0,0) rotation. Now, look at the location and rotation values of the example colonist and copy them over to your
interactionTransforms list. This way, the game knows how the colonist needs to stand relative to the interactable object.
8. Add a name and description for your object
localization.json file in the Example Mod to find out how to add the necessary text for your object. If you want, you can even support different languages
9. Test your object in the game!
Now it’s finally time to test your new object in the game! Once the
MyFurnitureAsset.ffasset files are in your
mods folder, you can start a new game and have a look in the build menu. Depending on the value set in
buildPanelSection you can find it in different places in your build menu (see example mod).
Currently available sections are:
Check if eveything works as intended. If it does, celebrate! Congrats! You made it!
In case anything went wrong…
- check the console output for any errors
- check if you kept your naming consistent. If your 3D model is called
aSpecificName, you will need to call it
furniture.jsonfile and icons need to be called
aSpecificNameIconBig.pngfor the game to find them.
- double check this tutorial if you forgot anything
- check the Example Mod to see if your items are set up the same way
- ask the community and the devs if they might be able to help you out