Energy System & Math

You are currently viewing an older version of the Entry. Click here, to view the current version.

  • This article covers the various energy math, systems, algorithms, and mechanics in Urban Assault.

    1 Overview

    The most essential energy system mechanics are already well-documented in the official Urban Assault Help files. Therefore, please refer to the game's Help or readme files first. This article aims to explore more in-depth mechanics and systems.


    2 Official Summary

    NOTE: This is the official summary of power management and energy system from the official readme file of the game. It is highly recommended to read it.


    3 Energy Math

    The information on this section will explain internal mechanics and algorithms of the energy systems, for both the user and the AI algorithms.


    3.1 Script integer values to energy conversion

    The energy values defined in scripts are converted into the game through modifiers. For example, '1000000' energy value for the host stations in the level scripts will translate to 7500 (2500 x 3 Batteries) total energy reservoir for the player, and 10000 (10000 x 1 Battery) total energy reservoir for the AI.


    The missing 1/4 portion of energy for the user is caused by the removed 4th battery that was exclusively used for a building construction. In the final version of the game, this 4th battery does not exist and its functionality has been combined with the unit creation battery.


    AI uses only 1 battery (System Battery) for all tasks. This sole battery functions as its life energy reservoir as well as unit and building creation battery. The AI cannot teleport their host stations, but instead they can move their host station manually. This does not cost energy, but it is much more inefficient compared to the user's teleportation ability, and renders AI host stations very vulnerable while they are displacing into different positions (see: Teleportation).


    3.2 Drak/Reload Constants and the conversion factors

    The Drak constant (or Reload constant) values that are defined in the level scripts determine the packet amount of energy absorption of the user and AI host stations from the power sources. The higher the value, the more energy can be gathered from the power source from each energy packet status.


    Just like the energy values, different levels (both single-player and multiplayer) are assigned with different Drak constant values for each user and AI host stations. The exact math for the actual amount of energy that can be gathered from each power in relative to Drak constant values will be covered below.


    3.3 Power Rating and Power Status

    More coming soon...


    3.4 Conversion Factor Denominator for Drak/Reload Constant to Power Rating/Status conversion

    More coming soon...


    3.5 AI Unit Maintenance/Upkeep Mechanics

    Urban Assault is a quite generous game in regards to unit limits during the gameplay. In single-player mode, the players can create as much units as they wish without restrictions. This is not the case in multiplayer, where both the soft limit and hard limit mechanisms exist to encourage efficiency and decision-making based gameplay.


    However, unlike the human players, the AI players in single-player mode of UA are subject to various hardcoded handicaps and limitations that do not apply to the human players. One noticeable example is the unit maintenance/upkeep mechanics for AI host stations. Basically, unlike the players whose unit creation costs are static regardless of circumstances, the unit creation costs for AI host stations are fully dynamic. For the AI host stations, the energy required to create additional units will change depends on the number of total units (vehicles and turrets) that are currently under the command & control system of each AI host station.


    The math algorithm formula for calculating the AI host station maintenance/upkeep mechanics for the units is as follows:

    Code
    K = (k/2)+(kn/40)


    Or more simply,

    Code
    K = k*(20+n)/40


    Where 'k' is the cost of a unit, and 'n' is the current number for all units and turrets that an AI host station has control over (this includes the host station component itself).


    The result is an arithmetic progression that can be expressed in a linear function with no defined limit, so the unit creation cost for AI host stations will continuously increase without any restrictions as they field more units and flak/radar stations on the battlefield. For example, an AI host station can create its 20th unit (including all individual units and turrets currently present under their control) at a same price as the original unit cost. But the creation cost of its 100th unit will be 300% (+200% higher) of the normal cost. Likewise, its 200th unit creation cost will require 550% (+450% higher) of creation energy than the standard energy value. Which is prohibitively high.


    On the contrary, the construction costs for buildings remain identical for AI in all situations, same as the players. This is why many AI host stations prefer to construct numerous flak stations around their bases in later missions, where their manufacture costs of normal units become excessively high to be practical. Still, the individual flak turrets (and the radar antennae) will contribute to the total number of units under the AI control, which will resultantly affect their attack capabilities in favour of defensive advantages the emplacements offer.


    It is also worth noting that individual AI host stations possess independent command & control system. So when there are multiple AI host stations present for a faction in a level, only one of these AI host stations will be responsible for controlling all pre-deployed squadrons and automated structure components in the level. Which means the energy penalty for this 'master' AI host station will be usually greater than the other AI host stations in the same faction that only manage their own units, unless the pre-deployed assets are exhausted.


    3.6 Multiplayer Unit Limits

    More coming soon...



    This article is currently under construction. I will finish it later, sorry about the inconvenience!

    -- Charlotte

Share