1. Start
  2. Forum
  3. Members
    1. Recent Activities
    2. Users Online
    3. Team
    4. Search Members
  4. Gallery
    1. Albums
  5. Calendar
    1. Upcoming Events
  6. Filebase
  7. Blog
    1. Articles
  8. Wiki
  • Login or register
  • Search
Mechanics
  • Everywhere
  • Mechanics
  • Articles
  • Pages
  • Forum
  • Gallery
  • Events
  • Files
  • Lexicon
  • Blog Articles
  • More Options
  1. Urban Assault - Metropolis Dawn
  2. Lexicon
  3. Urban Assault
  4. Gameplay
  5. Mechanics

Energy System & Math

  • Schloss Charlottenburg
  • August 1, 2022 at 10:00 AM
  • October 31, 2025 at 9:55 PM
  • 4,476 times viewed
  • The article about the various energy and power maths, systems, algorithms, and mechanics in the game.

    (This article is currently under construction!)

    1 Overview

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

    2 Official Summary

    Quote

    --------------------------
    4. Energy System
    --------------------------

    4.1 Power Management Tips
    --------------------------

    Power is everything in this game. Here are some helpful points about how
    to get as much of it as possible;

    ** For the fastest energy reload, beam your Host Station directly on top of
    your strongest power station. Beaming to a power station you own does not
    require any beam energy.

    ** If your energy absorption is less than 100%, conquer more sectors first
    to reach 100% efficiency and then build more power stations.

    ** Owning more power stations does NOT guarantee that you absorb more energy
    (see Section 9.4 for details). In some situations -- for example, when you
    do not own a lot of sectors -- the amount of power you absorb can decrease
    if you own too many power stations.

    ** Once your energy absorption reaches 100%, build a power station right
    next to the one you are already on. This way you absorb energy from both
    of them.

    ** You can stop the flow to and from each energy reservoir (the Host Station
    life energy, the creation energy, and the beam energy reservoirs) by
    clicking their respective icons on the Energy Manager. Click the icon again
    to allow a free flow of energy.

    ** Don't forget that power stations can also be used as "free beam points."
    It often makes sense to build a small network of weaker power stations
    (which will not affect your energy efficiency too much), and then use this
    network to beam your Host Station quickly over large distances. Although
    those weak stations are not very useful for energy reload, they serve well
    as outposts from which you can quickly deploy your squads to distant areas
    of the map.


    4.2 Energy Absorption
    ----------------------

    Your energy absorption rate, at the far left on the Energy Manager,
    shows the total amount of energy points you are receiving every 10
    seconds. This rate is based on the following:

    1. Your proximity to a power station.
    2. The strength of that power station.
    3. The efficiency of all your power stations, as indicated by the
    percentage at the far left of your Energy Manager.
    4. The strength of your Host Station, which becomes stronger and absorbs
    more energy as you progress through the mission levels.


    4.3 Efficiency and Sector Ownership
    ------------------------------------

    Each power station requires a certain number of sectors to support it
    before it can work at 100% efficiency. Owning a strong power station
    but few sectors to support it is not very useful.

    Some power stations can emit more energy than others, and this is
    indicated by the number of white boxes in the upper left of each power
    station map sector. To reach 100% efficiency, you must own 16 sectors
    per each white box.

    ----------------------------------------------
    Total No. of White Sectors Required to Reach
    Boxes You Own 100% Efficiency
    ----------------------------------------------
    1 16
    2 32
    3 48
    4 64
    5 80
    6 96
    7 112
    8 128
    Etc. Etc.
    ----------------------------------------------

    For example, if you own two power stations, each with 2 white boxes,
    or one power station with 4 white boxes, you must own 64 sectors to
    reach 100% efficiency.


    4.4 Emissions, Proximity, and Drainage
    ---------------------------------------

    Your power stations emit energy to the nearby sectors you own. The
    closer you are to a power station, the more energy you absorb from it.
    This also means that if you are out of your power station's emission
    area, or if you are within range but are not within one of your own
    sectors, you will not absorb any energy from that station. This applies
    to recharging your units as well as to your Host Station. Power stations
    with more white boxes emit more energy and have a larger emission area.

    The energy absorbed from power stations can be cumulative -- for
    instance, if you are on top of a power station and you are within the
    emission area of another power station, you will receive energy from
    both of them.

    NOTE: Enemy-owned power stations will drain energy away from your units
    and Host Station if you are within these power stations' emission areas
    and are positioned in an enemy sector. The same rules that apply to
    energy absorption also apply to energy drainage: The closer you are to
    the enemy power station, the more energy you lose. Your power stations
    have the same effect on enemy units and host stations.

    Display More

    NOTE: The above text is excerpted from the official summary of the power management and energy system in the official document of the game. It is highly recommended to read it.

    3 Energy Basics

    There are several main components that are directly responsible for calculating the energy system mechanics for the factions and their host stations. This section covers them in details.

    The AI and player host stations in single-player mode also use different mechanics and logics, with players generally having several advantages such as the absence of unit maintenance mechanics or the access to multiple (but smaller) energy batteries. These differences between AI and player host stations will be covered in another section.

    3.1 Power Ratings

    Energy generation structures such as power stations possess their intrinsic power generation capacity, or power ratings. The higher power rating is, the more energy power station can produce in same time. The strength of power ratings of power stations can be identified by the number of 'power boxes' that appear on power station sectors on the Map screen.

    The minimum power rating is 0 (no power generation) and the maximum power rating is 255 (highest power generation) for single structure power stations. The power rating of power stations are also dependent on their structural durability, which means damaged power stations will have reduced power generation capacity directly proportional to their hit points.

    3.2 Energy States

    Power stations with power generation capacity will automatically produce and supply electricity power to all friendly sectors (sectors that share the same ownership as the proprietor of the power station) in its surrounding emission area. The sectors that are supplied electricity from power stations create power grids. Each sector in power grid has its own energy state.

    The energy state in a given sector is defined by the strength of the power sources divided by distances. Each sector distance away from power sources effectively halves the amount of power received on sectors. This resultant energy available on sector determines its energy state, which in turn is applied to all objects that are present in that sector (enemies or allies).

    3.3 Sector Control

    The output of power stations are also limited by the total number of sectors that a faction has control over. Each power station requires certain number of sectors to support them. The amount of sectors required are directly proportional to the power rating values of each power station. Generally, 1 sector is required to support 2 power rating points, from any sources.

    This is the main reason why capturing and controlling as much sectors as possible are so important in the game. Likewise, it is worth noting that constructing or controlling more power stations do not always guarantee a higher energy income to the player if they do not have sufficient sectors to sustain them yet, and can backfire by reducing the power absorption rate.

    3.4 Drak Constant

    Host Stations have their own unique Drak Constant, or Reload Constant parameter values, which determine how much resultant energy a host station can gather from each power rating point (and therefore, from the energy state of the sector it is present in). Drak Constants are usually defined inside the individual level definition files for both AI and player host stations.

    Drak Constant quantises energy that the host station can receive from its current energy state. Host stations can take any energy state between 0 to 255 from its sector, and the resultant energy income formula of the host station from the power absorption rate is the product of Drak Constant 'Conversion Factor' and its energy state divided by its current power efficiency.

    3.5 Conversion Factors

    The Drak Constant values in scripts are further divided before they are applied into the energy equations. These Drak Constant denominator values are 60000 for player and 70000 for AI. For example, the Drak Constant value of 180000 for a player host station will generate +3 point of energy rate for each energy state, with the maximum income of +768 at full efficiency.

    3.6 Efficiency (Output/Input)

    Efficiency is straightforward concept. It is the ratio of the total output of available power and the total input of available power. In other words, the total power ratings of power stations that are controlled by a faction relative to the total number of sectors that are controlled by a faction. Efficiency appears on Power Absorption Rate at the upper-left corner of the screen.

    Efficiency is a global concept. The 100% efficiency means the faction controls enough sectors to support all their power station outputs at maximum generation capacity. Lower efficiency means suboptimal and reduced power generation capacity, especially when excess power stations are dispersed and so a host station cannot fully benefit from local power infrastructures.

    4 Energy Logics

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

    4.1 Script integer values to energy values conversion

    The energy values defined in game data scripts are converted into the game through various modifiers. The actual data script values are also x100 times higher than the in-game display which lowers the displayed numbers. For example, '1000000' energy value for the host stations in the level scripts will translate into 7500 (2500 x 3 Batteries) total energy reservoir for the player, and 10000 (10000 x 1 Battery) total energy reservoir for the AI.

    User host stations have their total energy values divided into 3 separate energy battery categories (Life Battery, Creation Battery, Beam Battery). The missing 1/4 portion of energy for the user is caused by the removed 4th battery that was exclusively designed and used for building construction. In the final version of the game, the 4th battery is not present anymore and its function has been combined with the unit creation battery.

    AI host stations only have 1 battery (System Battery) for performing all kinds of 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 can move their host stations manually. This does not cost energy, but it is much more inefficient and slow compared to the user's teleportation ability. Which renders AI host stations very vulnerable while they are displacing positions (see: Teleportation).

    4.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 possible 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 sources for each sector power state from each energy packet. This energy packet gives income.

    Like the total energy reservoir values, different levels (in both single-player and multiplayer) are assigned with different Drak constant values for each user and AI host stations based on individual level designs. The exact equation for the actual amount of energy that can be gathered from each power packet that is relative to Drak constant values will be covered below.

    4.3 Power Rating and Energy States and Sector Control

    All energy sources (power stations) have their own unique power rating values that determine how much potential power (and therefore, energy) generation capacity they can provide. These values correspond with power strength boxes that appear on power station sectors on the map screen. For example, the Resistance Power Station 1 in single-player mode has 50 power rating values (64 for the multiplayer variant), and the Resistance Power Station 1+ (Power Station 2 in multiplayer) has 128 power rating values.

    Power stations supply energy directly into adjacent power grid matrix components (sectors) that belong to the same faction ownership as the proprietor of the power stations, providing energy to functional objects and components that belong to the same owner faction while draining energy from entities that belong to other factions that are situated on these sectors.

    The collective power rating signals of the adjacent power stations are directly translated into energy status for host stations, which can take values between 0 (no power supply) to 255 (max power supply). Any energy status above maximum will result in a power saturation with no extra absorption benefit, but the total number of power stations will still affect efficiency between controlled sectors.

    Each 1 sector can support 2 power rating points at full efficiency. Calculation and management of these equations are important for maintaining effective and efficient energy generation.

    4.4 Conversion Factors for Drak/Reload Constant to Power Rating/Energy States

    The resultant energy income that a host station can receive from the energy state of a sector is quantised, directly proportional to the current power absorption rate of the host station. The power absorption rate of a host station is calculated via the product of Drak Constant Conversion Factor and the sector's energy state divided by the power efficiency.

    The Conversion Factors for Drak Constant are the Drak Constant values in the scripts further divided by integers. These denominators are 60000 for player and 70000 for AI. Therefore, the actual conversion factor values used in the above energy equations are (Reload_Constant/60000) for player host stations and (Reload_Constant/70000) for AI host stations.

    For example, the Drak Constant value of 180000 in for a player host station will generate exactly +3 point of energy rate from each energy state, and will cap out at exactly +768 income.

    The same conversion factors can be used to calculate both quantised energy income value from energy states, as well as maximum possible energy income for both AI/user host stations.

    4.5 AI-Specific Unit Energy 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 virtually create as much units as they want without any hard restrictions. However, the same is not the case in multiplayer mode, where various types of soft limit and hard limit mechanisms exist to encourage efficient management of units and decision-making based gameplay to counter enemy strategies.

    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 notable 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 equation for calculating the AI host station maintenance/upkeep mechanics for the units is as follows:

    Quote

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

    Or more simply,

    Quote

    K = k*(20+n)/40

    UPDATE: The more authentic equation (rather than heuristically inferred from my initial reverse engineering attempt back in 2017; although still mathematically equivalent) is as following:
    -- Charlotte

    Quote

    K = E * (1 + n * 0.05)

    where E = max_energy

    Where 'K' is the current energy cost of a unit for an AI host station, 'k' is the standard energy cost (energy_max * 2) of a unit, and 'n' is the current number of all units and turrets that an AI host station has control over (this includes the host station components).

    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 field. 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 the reason why AI host stations prefer to construct numerous flak stations around their bases in later missions, where the manufacture costs for their normal units become excessively high to be practical. Nonetheless, 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. The AI host stations will also limit building a maximum of 1 flak station for every 10 sector it controls at a given time.

    It is also worth noting that individual AI host stations possess independent command & control systems. 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 within the same faction that only manage their own units, unless the pre-deployed assets are exhausted.

    4.6 Multiplayer Unit Limits

    See Main Article: Official Multiplayer Notes

    As mentioned above, unlike the AI the player in single-player mode is not subject to any form of dynamic unit cost system mechanics such as unit maintenance/upkeep energy systems. However, there are unit limit systems present in multiplayer mode for both balance and performance reasons during the multiplayer matches.

    In multiplayer mode, there are both soft and hard unit limit systems that are defined per level files, as well as different types of soft unit limits such as Cost Limit and Efficiency Limit. These mechanics are all explained in the official Multiplayer Notes as well as Help files included in the game.

    Quote

    --------------
    4. UNIT LIMITS
    --------------

    There are two types of unit limits that you will encounter in multiplayer
    games. One is the "hard" limit type, for low-bandwidth games (these levels
    are indicated by telephone icons on the Level Selection screen), and the
    other is the "soft" limit type, for high-bandwidth games.


    Hard Limit

    The hard limit is pretty basic. Once you reach the hard limit, you will no
    longer be able to create any additional units until those that have already
    been created are destroyed. The hard limit is used for low-bandwidth levels.


    Soft Limit

    The soft limit works on the idea that the more units you create the less
    efficient your energy absorption rate becomes (see your printed documentation
    and online Help for information on the Energy Manager and resource management).
    Once you reach the soft limit, every unit you create over the limit causes
    your energy efficiency to drop by 5% (you may not notice this if you have
    already had the good fortune to conquer numerous sectors). The way to return
    your energy efficiency back to 100% is to either conquer more sectors or
    destroy your other units.

    Display More

    This is the only case in the game where players will have dynamic unit costs, unlike the AI in single-player mode that are always subject to increasing unit costs based on the unit counts.

    5 Notes

    • It is important to note that the energy mechanics and systems between AI and player host stations are fundamentally designed to be different in numerous ways. For this reason, any unexpected behaviours that could occur in unusual situations such as when the player jumps into AI host stations (via glitching or modding, etc.) do not properly represent what's actually happening when the AI controls the same host stations. This includes cases like the player inadvertently acquiring much higher energy battery sizes upon transfer.

Share

  • Previous entry Energy
  • Next entry Kraftwerk & Power Grid
  • Changelog
  • PDF

Table of Contents

  • 1 Overview
  • 2 Official Summary
  • 3 Energy Basics
    • 3.1 Power Ratings
    • 3.2 Energy States
    • 3.3 Sector Control
    • 3.4 Drak Constant
    • 3.5 Conversion Factors
    • 3.6 Efficiency (Output/Input)
  • 4 Energy Logics
    • 4.1 Script integer values to energy values conversion
    • 4.2 Drak/Reload Constants and the Conversion Factors
    • 4.3 Power Rating and Energy States and Sector Control
    • 4.4 Conversion Factors for Drak/Reload Constant to Power Rating/Energy States
    • 4.5 AI-Specific Unit Energy Maintenance/Upkeep Mechanics
    • 4.6 Multiplayer Unit Limits
  • 5 Notes

Categories

  1. Meta 10
  2. Urban Assault 92
    1. Important 7
    2. Overview 33
    3. Gameplay 33
      1. Single-player 0
      2. Multiplayer 0
      3. Mechanics 24
      4. Interface 4
      5. Strategy & Tactics 2
      6. Tips & Tricks 2
      7. Artificial Intelligence 1
    4. Factions 85
    5. Levels 8
    6. Data & Modification 16
    7. Miscellaneous 7
  3. Playground 900
  1. Privacy Policy
  2. Legal Notice
Lexicon, developed by www.viecode.com
Copyright © Metropolis Dawn. All Rights Reserved.
Powered by WoltLab Suite™