BuildingScripts: Difference between revisions

From Empires Wiki
Jump to navigation Jump to search
(Created Page.)
 
Line 92: Line 92:
ExplosionAttachment0" "explosion1" // Attachment 0 in the model.<br/>
ExplosionAttachment0" "explosion1" // Attachment 0 in the model.<br/>
ExplosionParticle0" "Explosion_std" // Particle 0 on attachment 0.<br/>
ExplosionParticle0" "Explosion_std" // Particle 0 on attachment 0.<br/>
ExplosionAttachment1" "explosion1" // Attachment 1 in the model.<br/>
ExplosionAttachment1" "explosion1" // Attachment 1 in the model. This attachment can be the same as the previous attachment.<br/>
ExplosionParticle1" "Explosion_std" // Particle 1 on attachment 1.<br/>
ExplosionParticle1" "Explosion_std" // Particle 1 on attachment 1.<br/>



Revision as of 04:39, 9 May 2010

Empires Scripting Documentation
Scripting Overview | Vehicle Script Overview | Vehicle Handling Script Overview | Weapon Script Overview | Armor Script Overview | Building Script Overview | Infantry Script Overview | Hint Messages | Loading Screen Script Overview | Tutorials



Overview

Chassis Scripts have quite a few variables, many of them pertaining to the model, and what shows up in the Vehicle Customization Menu. The Chassis Script has all the control over how the turret and cannon handle, as well as armor defines. The Vehicle Chassis has at least 4 subkeys, defining world weapon model position, and the locations of different items in the Vehicle Creation menu. There can be any number of Weapon Slot sub keys, depending on how many weapons the vehicle has.

Building Properties

name
spotted name
model
model2
model4
model8
model16
model32
cost
max health
starting health
damaged model
damaged threshold
destroyed model
vehicle physbox
recycle time
carcass removal time
touchmessageid

Building Resistances

Buildings are able to have several resistances. A resistance is calculated using the following formula:

Damage = Damage - (Damage * Resistance)

This means that the higher a resistance attribute, the more damage that will be absorbed. A resistance attribute can lie between 0 and 1 and is defined as a floating-point variable.

The type of damage a weapon does can be set in the Damage Type attribute of a weapon.

List of resistances:

  • GeneralPhysicsResist - General Physics Tree Damage
  • GeneralChemistryResist - General Chemistry Tree Damage
  • GeneralMechanicalResist - General Mechanic Tree Damage
  • GeneralElectricResist - General Electric Tree Damage
  • GeneralBiologicalResist - General Biological Tree Damage


  • KineticResist - Railguns, Standard Cannons, Anything that is just force
  • ExplosiveResist - HE, Nukes, anything that explodes
  • BioResist - Has the bio effect


  • BulletResist - Non Armor damaging
  • APBulletResist - Armor Damaging
  • BulletExplosiveResist - Bullets that Explode


  • MissileResist - Generic Missile type of damage
  • MissileExplosiveResist - Explosive type.
  • MissileBioResist - Bio Missiles. Different than Bio?


  • KineticArtResist - Kinetic Artillery
  • ExplosiveArtResist - Explosive Artillery
  • BioArtResist - Bio Artillery


  • AircraftMissileResist - Aircraft Missiles
  • AircraftGroundMissleResist - Aircraft Missiles to hit ground targets
  • AircraftBulletResist - Aircraft to Aircraft bullets
  • AircraftAPBulletResist - Aircraft Bullets to hit ground targets
  • AircraftBombResist - Bombs
  • AircraftBombBioResist - Bio Bombs?


  • InfantryGrenadeResist - Player Thrown Grenades
  • InfantryMineResist - Player Tossed Mines
  • InfantryMissileResist - Gren Missiles
  • InfantryMortarResist - Gren Mortars
  • InfantryStickyResist - Sticky Grenades
  • InfantrySeismicResist - Seismic Grenades
  • InfantryBulletResist - Infantry Bullets
  • InfantryUtilityResist - Concussion nades, various infantry stuff that does special things but no damage


  • ExtraType1Resist - Anti Building weapons
  • ExtraType2Resist
  • ExtraType3Resist

Boundary Vectors

The boundary vectors are the boundary vectors used to calculate the "footprint" that a building makes. There are two vectors: Min and Max. They use the following attributes.

  • MinColBoundX
  • MinColBoundY
  • MinColBoundZ


  • MaxColBoundX
  • MaxColBoundY
  • MaxColBoundZ

Particle Attachments

Using these attributes, you can have up to 10 different particles on a single model show when the building is destroyed. The attributes go from 0-9. You must always state both attributes.

WRONG:

ExplosionAttachment0" "explosion1" // Attachment 0 in the model.
ExplosionParticle0" "Explosion_std" // Particle 0 on attachment 0.
ExplosionParticle1" "Explosion_std" // Particle 1 on attachment 0.

CORRECT:

ExplosionAttachment0" "explosion1" // Attachment 0 in the model.
ExplosionParticle0" "Explosion_std" // Particle 0 on attachment 0.
ExplosionAttachment1" "explosion1" // Attachment 1 in the model. This attachment can be the same as the previous attachment.
ExplosionParticle1" "Explosion_std" // Particle 1 on attachment 1.

  • ExplosionAttachmentX - This attribute contains the model attachment, which is where the particle will be created.
  • ExplosionParticleX - This attributes contains the name of the particle that will be created.