Item - Rogue-Frontier/Rogue-Frontier GitHub Wiki

Items are the tools of gameplay in the hands of players and non-players alike. Some items are installed on ships and stations while other items reside in cargo. There are several types of items.

ItemType

Device

A device is an item that works when installed.

<Armor>

Armor protects the ship from damage and provides hit points.

  • maxHP: The number of hit points on the armor segment when it is fully intact

<Shield>

A shield generator protects the ship from damage and provides regenerating hit points at the cost of power consumption. Some shields are segmented, and each segment has its own number of hitpoints.

  • maxHP: The number of hit points that this shield will have when fully charged
  • hpPerSecond: The number of hit points that the shield will regenerate per second.
  • depletionDelay: If the shield reaches 0 hp, it will be depleted. This is the number of ticks that a depleted shield will wait before regenerating again.

<Weapon>

A weapon launches projectiles to damage other ships.

  • fireCooldown: The minimum interval between each shot, in ticks (1/30th of a second).
  • missileSpeed: The speed of a projectile (assuming stationary source), in units per second.
  • damageType: The damage type (currently unused)
  • damageHP: The amount of damage in HP dealt by the projectile on hit.
  • lifetime: The maximum number of ticks that the projectile will exist for before despawning.
  • omnidirectional: If true, this weapon will auto-aim at nearby targets.
  • char: The character appearance of the projectile
  • foreground: The foreground color of the projectile
  • background: The background color of the projectile
  • <Capacitor>: The capacitor can boost a weapon's firepower or limit its fire rate.
    • dischargePerShot: The amount subtracted from charge upon fire.
    • chargePerTick: The amount added to charge every tick.
    • maxCharge: The maximum amount of charge this weapon can have
    • bonusSpeedPerCharge: The increase in missileSpeed applied for each point of charge when fired
    • bonusDamagePerCharge: The increase in damageHP applied for each point of charge when fired
    • bonusLifetimePerCharge: The increase in lifetime applied for each point of charge when fired

<Reactor>

A reactor provides power to a ship and its devices.

  • battery: If the user's total power consumption is lower than the total max output of non-battery reactors, then battery reactors will automatically refuel by consuming the remaining output. If true, then this reactor is a battery.
  • maxPower: The max power output of the reactor.
  • maxFuel: The maximum amount of fuel the reactor can hold.
  • powerPerFuel: The power generated per unit of fuel. Each tick, the current power usage divided by this number is subtracted from the fuel level.
⚠️ **GitHub.com Fallback** ⚠️