<aside> <img src="/icons/reorder_gray.svg" alt="/icons/reorder_gray.svg" width="40px" />

Navigation

</aside>

🏠 Home Page

Getting Started

Architecture

Level System

Characters & Vehicles

Run Mechanics

World Objects

Boosters & Modifiers

Progression & Economy

UI

Save & Debugging

Modules

Publishing

Reference

💰 Monetization (Ads & IAP)

<aside> 💡 A pre-run modifier is a percent bonus to one of the three upgrade roles. The player activates it on the start screen for a fixed time with a rewarded video or with gems.

</aside>

Subsystems

modifiers-folder.png

page-modifiers.png

A modifier is not a booster. It has no timed or instant type and no effect on the character. It is a pure stat bonus.

PreRunModifierData fields

Menu: Create → Watermelon → Progression → Pre-Run Modifier.

Field Description
Modifier Type The upgrade role: LauncherPower, VehicleEfficiency or IncomeMultiplier.
Title Name of the modifier.
Icon Icon of the slot.
Bonus Percent Percent that is added to the multiplier of the role.
Duration Real-time duration in seconds.
Gems Cost Price in gems for the activation without an ad.

Included modifiers

Asset Role Bonus Duration Gems
Launcher Power Modifier LauncherPower 25% 600 s 10
Vehicle Efficiency Modifier VehicleEfficiency 25% 600 s 10
Income Multiplier Modifier IncomeMultiplier 25% 600 s 10

Assets are stored in Assets/Project Files/Data/Modifiers/Pre Run Modifiers. The database is Pre Run Modifier Database.asset.

How the bonus is applied

ProgressionController adds the bonus of the active modifier on top of the permanent bonus of the upgrade, additively:

multiplier = upgrade multiplier + modifier bonus percent / 100

The three multipliers are read at the moment of use: LauncherPowerMultiplier by the launcher, VehicleEfficiencyMultiplier when the vehicle behavior is created and IncomeMultiplier when the reward is calculated. A modifier activated before the run is therefore included in that run.

PreRunModifierController API

Member Description
Activate(type) Starts the timer. Activating an active modifier refreshes the timer.
IsActive(type) Checks whether the modifier is active.
GetRemainingTime(type) Seconds left.
GetBonusPercent(type) Bonus of the active modifier, 0 when inactive.
GetModifier(type) The data asset of the type.

The timer runs in real time with Tween.DelayedCall. Modifiers are not saved. A restart of the game clears them.

Activation

The slot of the start screen has two buttons:

While the modifier is active, the slot shows the countdown.

How to change a modifier

  1. Open the modifier asset in Data/Modifiers/Pre Run Modifiers.
  2. Change Bonus Percent, Duration or Gems Cost.

How to add a modifier for a role

The modifier type is the upgrade role. The project has one slot per role. To add another role:

  1. Add a value to UpgradeType.
  2. Add a multiplier getter to ProgressionController that includes PreRunModifierController.GetBonusPercent.
  3. Create a Pre-Run Modifier asset with the new type and add it to the Pre Run Modifier Database.
  4. Add a PreRunModifierSlot with the same type to the UI Pre Run Modifiers prefab.