Undertale Changer Template Bullet Colors: White, Blue, Orange, and Green Explained
The Undertale Changer Template battle system supports exactly four bullet colors—White, Blue, Orange, and Green—defined in the BulletColor enum in BattleControl.cs to drive collision detection and gameplay mechanics rather than purely visual rendering.
The arch-aik/undertale-changer-template repository implements a flexible battle system where bullet colors determine gameplay behavior through the BulletColor enumeration. These colors function as gameplay attributes that influence collision logic, damage calculation, and special effects throughout the battle framework.
BulletColor Enum Definition in BattleControl.cs
The core definition resides in Assets/Scripts/UCT/Control/BattleControl.cs at lines 16-22. This enumeration establishes the four supported bullet color values:
- White: The default neutral bullet color used for standard attacks
- Blue: Typically reserved for ice-type effects or frozen state interactions
- Orange: Often represents fire-type mechanics or high-damage scenarios
- Green: Usually associated with poison-type or status-effect bullets
How Bullet Colors Drive Battle Mechanics
Unlike purely cosmetic properties, these bullet colors control collision behavior and gameplay logic. The BulletController class interprets these values to determine how projectiles interact with player states and apply damage modifiers.
Setting Default Colors in BulletControl Assets
Bullet assets store their default color through the BulletControl ScriptableObject class in Assets/Scripts/UCT/Control/BulletControl.cs. The bulletColor field defaults to White but can be configured to any enum value:
using static UCT.Control.BattleControl;
// Inside a ScriptableObject asset:
public BulletColor bulletColor = BulletColor.White; // Valid options: White, Blue, Orange, Green
Implementing Color-Based Logic in BulletController
The BulletController at Assets/Scripts/UCT/Battle/BulletController.cs (lines 129-134) implements conditional logic based on the BulletColor value:
using static UCT.Control.BattleControl;
public void ApplyBulletLogic(BulletColor color)
{
if (color == BulletColor.White ||
(color == BulletColor.Orange && isCritical) ||
(color == BulletColor.Blue && isFrozen))
{
// Apply special logic for these colors
}
}
Randomizing Colors in Enemy Scripts
Enemy implementations such as Npc1Enemy.cs demonstrate random color assignment during bullet spawning at line 60:
// From Assets/Scripts/UCT/Battle/Enemies/Npc1Enemy.cs
BulletColor randomColor = (BulletColor)Random.Range(0, 4); // Maps 0-3 to White, Blue, Orange, Green
Summary
- The Undertale Changer Template defines exactly four bullet colors—White, Blue, Orange, and Green—in the
BulletColorenum atAssets/Scripts/UCT/Control/BattleControl.cs - These colors function as gameplay attributes that drive collision logic and special effects rather than purely visual styling
- The
BulletControlScriptableObject class stores the defaultbulletColorfield for bullet assets - The
BulletControllerinterprets these values to apply conditional damage and status effects during combat - Enemy scripts utilize
Random.Range(0, 4)cast to(BulletColor)to randomize bullet attributes during spawning
Frequently Asked Questions
What are the four bullet colors available in the Undertale Changer Template battle system?
The battle system supports White, Blue, Orange, and Green bullet colors defined in the BulletColor enum in BattleControl.cs. These values represent gameplay attributes—White serves as the default neutral color, Blue typically handles ice mechanics, Orange represents fire or critical damage, and Green manages poison status effects.
Where is the BulletColor enum defined in the source code?
The BulletColor enumeration is defined at lines 16-22 of Assets/Scripts/UCT/Control/BattleControl.cs within the UCT.Control namespace. This central definition allows consistent color-based logic across the BulletController, BulletControl assets, and enemy implementation scripts.
How do bullet colors affect gameplay mechanics?
Bullet colors determine collision behavior and damage calculation through conditional checks in Assets/Scripts/UCT/Battle/BulletController.cs. The system evaluates the BulletColor value to apply special logic—for example, checking if an Orange bullet should trigger critical damage or if a Blue bullet should interact with frozen states.
Can I add custom bullet colors to the template?
The current implementation restricts bullet colors to the four defined enum values (White, Blue, Orange, Green) in BattleControl.cs. Adding custom colors would require extending the BulletColor enum definition and updating the corresponding logic in BulletController.cs to handle the new color attributes.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →