Configuration Files

Sub-UnitObj's (6.4)

When a unit has a specific ability beyond just a simple weapon, it needs a separate Obj that is built off the UnitObj. We'll go through each one.

RestoreObj

This Obj must be included in order for a unit to heal. The following bit comes from the Medic's config.

  RestoreObj()
  {
    AddHitPoints(6);
    Distance(24);
    RestoreRadius(12);
    TargetProperties()
    {
      Add("Filter::Biological");
      Add("Filter::Mechanical");
      Add("Filter::MechanicalFlyer");
    }
  }

AddHitPoints - Number of hit points added per heal cycle.

Distance - Maximum range at which it can heal a unit.

RestoreRadius - The "splash" radius of the healing.

TargetProperties - This is where you define what can be healed by the unit you are creating. Each filter type you add will give it the ability to heal all units that have that filter at the beginning of their config. In the case of the Medic, it can heal all biologicals, and mechanicals both on the ground and in the air. This covers every unit currently in the game.

WallObj

A WallObj is needed if a unit is to emit a fence that attaches to other wall posts. Let's look at the wall config from the Guard Tower.

  WallObj()
  {
    //OriginHardPoint("HP-WIRE");
    Range(4);
    //BeamOffset(4.5);
    BeamOffsetPrimary(6.0);
    BeamOffsetSecondary(2.0);
    DeviationMin(1.0);
    DeviationMax(10.0);
    Properties();
  }

OriginHardPoint - Origin for beams.

Range - Number of cells that the laser fence can extend.

BeamOffset - Distance from the Hardpoint (Origin).

BeamOffsetPrimary - Distance from the beam offset for the first beam.

BeamOffsetSecondary - Distance from the beam offset for the second beam.

DeviationMin - Defaults at 1. Don't mess with it.

DeviationMax - The maximum height differential in meters between two posts. So in this case, if a post is placed on a hill that is more than 10 meters above this unit, it will not be able to connect.

Properties - This is where you would place a filter if you wanted the unit to only be able to connect with other walls of a certain type. For example, if you wanted to make a special wall post that was twice as tall as the others and had a much wider beam, you would put a "Filter::Wall::Bigpost" into the properties at the top of the config, and add the same filter to the properties in here. That would prevent the unit from being able to connect with standard wall posts.

TrapObj

This Obj exists specifically for traps. Let's look at the config for the Mine that is layed by the Minelayer.

  TrapObj()
  {
    Distance(12);
    SelfDestruct(1);
    Properties()
    {
      Add("Filter::Biological");
      Add("Filter::Mechanical");
    }
  }

Distance - Maximum proximity at which the trap will detonate when a unit enters.

SelfDestruct - A flag that specifies whether or not the trap destroys itself when it triggers.

Properties - Specifies which types of units can trigger the trap (see RestoreObj).

ChargeTime - Minimum delay between triggerings, assuming the trap does not self-destruct.
TODO: Does this attribute still exist in AMRTS?

TransportObj

Lastly, this Obj handles units that can carry other units. No transport units exist in the base game however. The following is taken from Dark Reign 2's Telepad's config.

  TransportObj()
  {
    Spaces(6);
    Properties()
    {
      Add("Filter::Transportable");
    }
    ChargeTime(90);
    PortalType("jda.building.telepadportal");
    PortalTime(20);
  }

Spaces - How many units can fit inside.

Properties - Specifies which units can enter (see RestoreObj).

Distance - Maximum distance a unit needs to get within before it can enter (used by mobile transports).

NOTE: The following three entries only apply to transports that teleport units:

ChargeTime - Minimum delay between teleports.

PortalType - Refers to the unit that is created on the other end of the teleport, so that units on the other end can pass back through.

PortalTime - Duration that the portal on the other end will exist before disappearing.