Modding body parts
Introduction
I believe user-generated content is essential for gaming communities to thrive (in particular if the only other source of content is a single person). Ideally, there should be interesting stuff to look at every week or so, which I believe is only possible if creating custom content is so easy nearly anyone can do it. This page, about making changes to existing body parts and creating your own, is a first step in that direction.
How to tweak the statistics of existing body parts
At C:\Program Files (x86)\Steam\steamapps\common\The Sapling\the_sapling_Data\Resources\BodyPartStats
you can find the files where the statistics of body parts are defined. If you feel a statistic should be increased or decreased (buffed or nerfed), you can do it there and test the results in the game. The game imports these files at startup, so you will need to restart to see your changes in game.
How to create your own body parts
At C:\Program Files (x86)\Steam\steamapps\common\The Sapling\the_sapling_Data\StreamingAssets
you can find a moddable example of each body part. Simply edit the files, and hit 'm' in the plant or animal editor to see the effects of your changes. It's been set up in such a way that it's not needed to restart the game.
For all body part types, you can edit:
- The
config.json
file, which contains information about (1) the statistics of the body part and (2) how the body part should be visualized, like the material color. - The
model.txt
file, which is actually a .obj file as exported by 3D modeling software (just change the file extension from .obj to .txt). The model can be relatively simple, as the game will smooth it with 1 iteration of Catmull-Clark subdivision; see this video for low poly modeling techniques! Also, importantly, The Sapling only supports quad faces. If there's a single triangle, nothing will show up in game.
Furthermore, some body part types also have:
- A
texture.png
file. At the moment, this is only used for the image on eyeballs. - An
armature.json
file. This contains information about bones, and bone weights per vertex, to be used by the animation engine. This can, for example, contain information on how the mouth should open, or how a knee should bend. These files can, for example, be generated by a Python script inside a Blender file; for each armature.json, the Blender file it was generated from is included for reference.
For a first-time creator, ears are by far the easiest body part to start with. For inspiration and education, all source files for all vanilla body parts can be found here.
Future plans
Depending on how many players are using it, I might extend this system. Without making promises, these are more features I feel the game needs
- More in-game feedback if a custom body part is not valid.
- Working on more body parts of the same type simultaneously; right now there's only one folder of files to edit per body part type.
- Showing all player-generated creations as a 'list' somewhere in the game, so content consumers can pick from them.
- Tools to easily share creations with other players, like a Steam workshop.
Keep in mind: your creation might be similar to what I'm planning to include
As this is a game in development, it is more than likely that the body parts you create are also on my own wish list; your creations may look similar to what I had in mind already. While I cannot rule out that player-created body parts will inspire my future work, I will create everything from scratch, and thus not share credit.
Stuck? Reach out!
I really want this to work, so if you are confused about something just email me at thesaplinggame@gmail.com. I'm also very interested in seeing/sharing your creations!