An object with this ability is able to attack opponents or wild animals.

Example:

   <Actions>
      <Attack
         damage="13"
         crush="0"
         hack="0.5"
         pierce="0.5"
         accuracy="0.8"
         range="5"
         rangemin="1"
         speed="150"
         splashdamage="0.2"
         splashradius="2" 
         bonus=""
         primary=""
         secondary=""
      />
   </Actions>

Accuracy

Not yet implemented. BRIEF DESCRIPTION ::Attack Accuracy.

This specifies the % accuracy of the damage value, in a range from 0 to 1. When an entity attacks, does it land its attack with every attack cycle? If so, the value is 1 (100%). This is typical for melee attacks.

However, ranged units have a chance to miss with their attacks. Archers have the lowest accuracy of the ranged units, followed by Javelinists and Slingers.

Of the siege weapons, the Onager (intended for structures) is more accurate than the Ballista (intended for units).

Damage

BRIEF DESCRIPTION ::Value of Attack.

You could view attack as the value of hitpoint removal from another entity. The higher the value, the greater number of hitpoints are removed.

If the opposing unit's armour exceeds the attacking unit's damage, then by default, it always removes one hitpoint when an attack has landed.

All Citizen Soldiers start out with relatively low attacks and increase their attack strength as they are promoted.

Heroes, Super Units, and Siege Weapons have a higher level attack because they arrive late in the game, and do not gain ranks.

The total value of damage is actually a sum of three damage types (crush, hack, and pierce). The values of the attack types are a percent of the ('total') damage. Here is an example:

Say a unit has these values for Action.Attack :

damage = 11 crush = 10% hack = 60% pierce = 30%

If we calculated the actual damage as it is rationed out to the 3 types, it would be:

Crush = 1.1 Hack = 6.6 Pierce = 3.3

The sum of the percentage of the three attack types may never exceed 100%.

Crush

BRIEF DESCRIPTION ::Percentage of Attack that is crush.

Crush attack is effective against objects that have little or no crush armour. Crush attack is typically associated with attacking structures, siege weapons, or ships.

Hack

BRIEF DESCRIPTION ::Percentage of Attack that is hack.

Hack attack is effective against objects that have little or no hack armour. Hack attack is typically associated with objects that use a melee attack, hand to hand combat, or large blunt weapons.

Pierce

BRIEF DESCRIPTION ::Percentage of Attack that is pierce.

Pierce attack is effective against objects that have little or no pierce armour. Pierce attack is typically associated with objects that use a ranged attack, distance combat, or small pointy weapons.

Range

BRIEF DESCRIPTION ::Range Value for units that may attack from a distance.

Range is the ability of an object to attack from a distance. This is the maximum range of the attack. It usually is smaller or equal to a unit's line of sight. There is an accompanying projectile that is launched from the object, and when that projectile hits another object, it causes damage.

Archers have the greatest range, followed by Slingers, and then Javelinists. As for the siege weapons, the Ballista has the longest range - followed by the Onager.

Range values are based on terrain distance.

RangeMin

Not yet implemented. BRIEF DESCRIPTION ::Object cannot use its ranged attack if its target is less than this value.

Range Minimum is an attribute that will not allow a unit to attack when the opposing entity is very close to the entity. This is intended to make the ranged entities have a more skirmish nature and stop ranged entities from firing arrows/javelins/slings at point blank range.

Range values are based on terrain distance.

Speed

BRIEF DESCRIPTION ::Rate of attack.

This is how fast an entity can attack. Basically this is how fast the attack animation plays. Each time the animation repeats it attacks. The more frequent the attacks, the more hitpoints it can remove at a given time.

SplashDamage

Not yet implemented. BRIEF DESCRIPTION ::What percentage (range 0..1) of the attack damage is inflicted on the area around the damaged opponent?

Note that splash damage could inflict damage upon hitpoint entities that the entity might not normally be able to attack (such as trees).

SplashRadius

Not yet implemented. BRIEF DESCRIPTION ::How wide is the area of splash damage?

Measured as the number of tiles of the radius around the point of impact.

SpecialAttack

Not yet implemented. BRIEF DESCRIPTION ::The entity's weapon performs some special effect in addition to inflicting damage. This is specified by string ID. Options are:

  • Fire: Does additional damage to units (not as much to Structures) by setting them afire and causing hitpoints to degrade for a period of time (unless healed/repaired in a timely manner).

Primary

Not yet implemented. BRIEF DESCRIPTION ::The primary preferred victim of this entity's attack.

Will seek this Id.Type out for attack.

Secondary

Not yet implemented. BRIEF DESCRIPTION ::The secondary preferred victim of this entity's attack.

Will seek this Id.Type out for attack.

Bonus

Not yet implemented. BRIEF DESCRIPTION ::The value of the attack bonus on the secondary and primary victim.

Variable; as the unit's rank get higher, so does its bonus.


http://www.wildfiregames.com/~gamedesign/dd/interactions5.gif

How do we give players an assortment of units that are unique in their own right but at the same time do not overpower one another? We need to maintain balance to make the game not just fair� but the more variety you have, the more strategies and tactics you have. You empower the players with different offensive options, and in turn more options to respond defensively.

We use a system that encourages each unit to have a primary and secondary preferred target. This forces the entities (if left uncontrolled) to fight in an efficient manner. So you don't have the frustration you feel when you leave a swordsman unattended - he attacks a structure while there is a spearman stabbing him in the back.

What this does do is that it singles out what unit they would choose to attack under the control of the AI. The attack priority would be something like this:

  • Attack units you were commanded to attack by the human player
  • Attack units that are attacking you
  • Attack units that you are bonused to attack
  • Attack any enemy in LOS
Last modified 9 years ago Last modified on Feb 23, 2008 3:19:00 AM