User Tools

Site Tools


4rpl:commands:geternportalefficiency

Index
Core Units

GetERNPortalEfficiency

GetERNPortalEfficiency(<-upgrade) ->efficiency

Description

Gets the efficiency of a given upgrade on the ern portal. The returned efficiency is a floating point number between 0 and 1 inclusive. The ERN portal has 6 possible upgrades and when and ERN is installed in a slot, the efficiency will go from 0 to 1 over time. A slot without an ERN installed has an efficiency of 0. The upgrade that is passed in should be a number from 0 to 5 inclusive. Each number represents one of the upgrades in the ERN portal.

  • UPGRADE_ENERGY_PRODUCTION = 0;
  • UPGRADE_MINE_PRODUCTION = 1;
  • UPGRADE_BUILD_SPEED = 2;
  • UPGRADE_MOVE_SPEED = 3;
  • UPGRADE_FIRE_RANGE = 4;
  • UPGRADE_FIRE_RATE = 5;

You can learn about how ERN portal efficiency normally affects units in the Player Unit Data page, this can help you figure out how much of a boost to give your custom unit.

Examples

GetERNPortalEfficiency(0) ->energyProductionUpgradeEfficiency

Index

4rpl/commands/geternportalefficiency.txt · Last modified: 2022/03/22 22:24 by Grabz