Customization and Upgrades
Table of Contents
Overview
RCCP includes a comprehensive vehicle customization and upgrade system. Vehicles can be painted, fitted with different wheels, equipped with spoilers, decorated with decals, illuminated with neon underglow, and upgraded with performance parts. All customizations are saved automatically and persist across sessions.
The customization system is managed by RCCP_Customizer, which coordinates several specialized manager components on each vehicle.
Customization Types
Paint
Change the vehicle's body color using the RCCP_VehicleUpgrade_PaintManager. Supports full RGB color selection through UI sliders or preset color buttons.
// Apply a paint color via script
vehicle.Customizer.PaintManager.Paint(Color.red);
Wheels
Swap the vehicle's wheels from a registry of available wheel models defined in RCCP_ChangableWheels (loaded from Resources). Each wheel model includes the mesh, material, and collider radius.
// Change wheels by index
vehicle.Customizer.WheelManager.UpdateWheel(wheelIndex);
Spoilers
Add or change rear spoilers from a collection of spoiler prefabs. Each spoiler model is a child prefab that gets instantiated on the vehicle.
Decals
Apply sticker/decal textures to the vehicle body. The decal placement system allows positioning and rotating decals on the vehicle surface through the RCCP_UI_DecalSetLocation UI component.
Neon Lights
Underglow neon lighting with customizable colors. Neon lights are placed under the vehicle body and emit colored light onto the ground surface.
Sirens
Emergency/police light effects with multiple siren patterns. Uses the RCCP_PoliceLights component for light animation.
Performance Upgrades
Performance upgrades improve vehicle capabilities through a 5-level progression system. Each level increases the relevant parameter by a multiplier.
Upgrade Types
| Upgrade | Component | Effect |
|---|---|---|
| Engine | RCCP_VehicleUpgrade_Engine | Increases maximum torque via efficiency multiplier (1.15x to 2.0x) |
| Speed | RCCP_VehicleUpgrade_Speed | Increases maximum speed |
| Handling | RCCP_VehicleUpgrade_Handling | Improves steering response and cornering |
| Brake | RCCP_VehicleUpgrade_Brake | Enhances braking power |
Upgrade Levels
Each upgrade type has 5 levels. The upgrade manager tracks the current level and applies the appropriate multiplier:
| Level | Typical Multiplier |
|---|---|
| 0 | 1.0x (stock) |
| 1 | 1.15x |
| 2 | 1.3x |
| 3 | 1.5x |
| 4 | 1.75x |
| 5 | 2.0x |
Applying Upgrades via Script
// Upgrade engine to level 3
vehicle.Customizer.UpgradeManager.UpgradeEngine(3);
// Upgrade brakes to level 2
vehicle.Customizer.UpgradeManager.UpgradeBrake(2);
Customization Managers
Each customization type has a dedicated manager component:
| Manager | Responsibility |
|---|---|
RCCP_VehicleUpgrade_PaintManager | Paint color application and storage |
RCCP_VehicleUpgrade_WheelManager | Wheel model swapping |
RCCP_VehicleUpgrade_SpoilerManager | Spoiler installation |
RCCP_VehicleUpgrade_DecalManager | Decal placement and management |
RCCP_VehicleUpgrade_NeonManager | Neon light configuration |
RCCP_VehicleUpgrade_SirenManager | Siren type selection |
RCCP_VehicleUpgrade_UpgradeManager | Performance upgrade progression |
RCCP_VehicleUpgrade_CustomizationManager | Overall coordination and save/load |
Save and Load
Customizations are automatically saved using PlayerPrefs with a per-vehicle save name. When a vehicle loads, its customization manager reads saved data and applies all previously configured customizations.
Deleting Saved Customizations
// Reset a vehicle's customization to defaults
vehicle.Customizer.Delete();
The UI includes a delete button (RCCP_UI_DeleteCustomization) that resets all saved customization data for the current vehicle.
Customization UI
RCCP includes a complete customization UI system with panels for each customization type:
| UI Component | Purpose |
|---|---|
RCCP_UI_Customizer | Main customization menu controller |
RCCP_UI_Color | Color preset buttons |
RCCP_ColorPickerBySliders | RGB slider color picker |
RCCP_UI_Wheel | Wheel selection buttons |
RCCP_UI_Spoiler | Spoiler selection |
RCCP_UI_Decal | Decal selection |
RCCP_UI_DecalSetLocation | Decal position/rotation editor |
RCCP_UI_Neon | Neon color customization |
RCCP_UI_Siren | Siren type selection |
RCCP_UI_Upgrade | Performance upgrade purchase UI |
Editable in Lite
The customization system works fully at runtime in Lite. All paint, wheel, upgrade, and cosmetic changes function normally. The customization inspector editors have some parameters locked, but the runtime UI and API provide full access to all customization features.
Next Steps
- 10_UISystem.md — UI system and dashboard
- 11_SceneManagement.md — Vehicle spawning and management