Overview
This project was my first major undertaking as a programmer and spriter. My objective was to create a fully fledged race system for Terraria, taking inspiration from a similar feature in Starbound. I was responsible for spriting and animating races, designing UI, and creating additional assets used in the mod.
Custom Playerlayers
To override the player's appearance, I used Tmodloader's PlayerDrawLayer system. Each of the players' sprite sheets are replaced with custom ones that change appearance based on the player's internal race ID. Certain races have additional playerlayers for special features, such as horns or separately colored underbellies.
Each racial sheet is internally sprited in grayscale, allowing the player to customize their character's palette ingame. To hueshift the racial sheets when color is applied, I used blue colors for darker tones when spriting.
Race Selection UI
When designing the UI for selecting races, my primary goal was making sure it felt natural alongside the rest of Terraria's player creation interface. The final version of the UI is directly integrated into the player creation menu as an additional tab, making it appear seamless within the vanilla game.
Players can select races using a scrolling list that automatically fills itself using the mod's internal list of loaded races. Each race is displayed in the UI using Terraria's UIPlayer, a class that draws and animates a fake player.
Community Race Creation
Other modders can create their own races by deriving a new class from the mod's public race class, a system programmed by Mirsario. Addon races are detected and appended to the mod's internal list of races, automatically adding them to the race selection UI.
To provide modders with an easy starting point for constructing addon mods, I developed an ingame interface for generating a mod skeleton. The generated skeleton contains a racial playerlayer directory and a race class, providing artists with the necessary groundwork for creating, designing and publishing a custom race.
Racial Abilities
Each race is given unique abilities as a compliment to their visual changes. Certain abilities are recolored using the player's color customization values, providing visual cohesion and additional interactivity to each race. I was responsible for designing the visual effects and assets used in each racial ability.
Further Reading
Resources used during project development.