Creating your own 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 creating custom body parts, is a first step in that direction.
The plan
Adding support for player-generated body parts will be a multistage project. The goal of the first stage is:
- An example folder with all files and configuration needed, for each body part type.
- Press 'm' to load and show the content of the example folder into the game
Later stages should include (but no promises):
- 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.
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.
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!