FANDOM


Unit blueprint

A unit blueprint viewed with Notepad++

A unit blueprint is a blueprint file used to setup how a unit functions in the game.

Unit Blueprint formatEdit

The following is documentation of the contents of a unit blueprint file. It is valid Lua code. The entire file is a call to UnitBlueprint with a large table. Below is an incomplete list of the fields and their purposes.

AbilitiesEdit

The Abilities section is used to give units buttons of corresponding abilities that can be used to activate abilities.

Abilities = {
{ <Each set of these brackets will allow you to add another ability.>
Blueprint = '<string>', <This is the single ability to be added.>
Some possible strings are as follows:
ACU_Hunker
BombBouncerCharge
BombBouncerMegaBlast
ConvertEnergy
ConvertEnergyId
DisruptorStation
Electroshock
EscapePod
HalfBake
HardenArtillery
KnockbackWeapon
Magnet
MagnetPush
Mobile_Hunker
Overcharge
Point_Defense_Hunker
PowerDetonate
Pullinsmash
RadarOverdrive
RogueNanites
TriArmorHalfSpeed
},
},

AIEdit

The AI section contains certain values that the unit's AI will use in certain situations.

AI = {
Attacker = {
AttackAngle = <n>, <Instead of facing directly at the target, the unit will try to put it self at an angle this many degrees to the left or right of it's target. Generally used to ensure that all weapons can fire at targets.>
IgnoreAlliances = <true/false>,
RelocateToFire = <true/false>,
RequireFiringTrajectory = <true/false>,
},
BeaconName = '<string>',
BeaconRange = <n>,
GuardRadius = <n>,
GuardReturnRadius = <n>,
GuardScanRadius = <n>,
StagingPlatformScanRadius = <n>,
TargetBones = { <When something targets this, it will randomly choose a bone from this list on the model to fire at over just firing at the core of the unit.>
<bone>,
},
},

AirEdit

The Air section is only needed for air units. It controls the aerial movement.

Air = {
AutoLandTime = <n>,
BankFactor = <n>,
BankForward = <true/false>,
BomberSpeedMult = <n>,
BreakOffDistance = <n>,
BreakOffIfNearNewTarget = <true/false>,
BreakOffTrigger = <n>,
CanFly = <true/false>,
CirclingAirSpeed = <n>,
CirclingDirChange = <true/false>,
CirclingElevationChangeRatio = <n>,
CirclingFlightChangeFrequency = <n>,
CirclingRadiusChangeMaxRatio = <n>,
CirclingRadiusChangeMinRatio = <n>,
CirclingRadiusVsAirMult = <n>,
CirclingTurnMult = <n>,
CombatTurnSpeed = <n>,
EngageDistance = <n>,
KLift = <n>,
KLiftDamping = <n>,
KMove = <n>,
KMoveDamping = <n>,
KRoll = <n>,
KRollDamping = <n>,
KTurn = <n>,
KTurnDamping = <n>,
LiftFactor = <n>,
MaxAirspeed = <n>,
MinAirspeed = <n>,
PredictAheadForBombDrop = <n>,
StartTurnDistance = <n>,
TightTurnMultiplier = <n>,
TransportHoverHeight = <n>,
TurnSpeed = <n>,
Winged = <true/false>,
},

AnimSetEdit

The AnimSet section is an area that links animations to their file names.

AnimSet = {
alt_finish_build = '<string>',
alt_reverse_finish_build = '<string>',
attack = '<string>',
build_loop = '<string>',
build_phase_01 = '<string>',
build_phase_02 = '<string>',
build_phase_03 = '<string>',
build_transition_01 = '<string>',
build_transition_02 = '<string>',
close_doors = '<string>',
convert = '<string>',
deploy = '<string>',
finish_build = '<string>',
hunker = '<string>',
hunkerend = '<string>',
hunkeridle = '<string>',
idle = '<string>',
idle_surface = '<string>',
idle_underwater = '<string>',
killed = '<string>',
landing = '<string>',
move_surface = '<string>',
move_underwater = '<string>',
open_doors = '<string>',
pack = '<string>',
retract = '<string>',
reverse_convert = '<string>',
reverse_finish_build = '<string>',
reverse_start_build = '<string>',
start_build = '<string>',
takeoff = '<string>',
transition_to_land = '<string>',
transition_to_sea = '<string>',
transition_to_surface = '<string>',
transition_to_underwater = '<string>',
unpack = '<string>',
walk = '<string>',
},

AnimSetTransformedEdit

The AnimSetTransformed section is an area that links animations to their file names. These animations are only for those taken by a unit in its transformed state.

AnimSetTransformed = {
<The list is the same as AnimSet above.>
},

AnimTreeEdit

The AnimTree is a file that sets up the animation structure and the transitioning..

AnimTree = '<string>', <This will be animation blueprint filename.>

AudioEdit

The Audio section is where all of the unit sounds are linked to their corresponding sound event within the FMOD directory.

AnimSet = { <Every one of these strings will be an FMOD sound event path.>
ActiveLoop = '<string>',
AirUnitWaterImpact = '<string>',
AmbientHover = '<string>',
AmbientMove = '<string>',
AmbientMoveLand = '<string>',
AmbientMoveSub = '<string>',
AmbientMoveWater = '<string>',
AmphibiousFloatingKilledOnLand = '<string>',
BuildPhase01 = '<string>',
BuildPhase02 = '<string>',
BuildPhase03 = '<string>',
ChargeActivate = '<string>',
Close = '<string>',
CaptureLoop = '<string>',
ConstructClose = '<string>',
ConstructLoop = '<string>',
ConstructOpen = '<string>',
DeathExplosion = '<string>',
Deploy = '<string>',
Destroyed = '<string>',
DoneBeingBuilt = '<string>',
EnterWater = '<string>',
FallingLoop = '<string>',
FootFallGeneric = '<string>',
FootFallGenericSeabed = '<string>',
HoverKilledOnWater = '<string>',
Hunker = '<string>',
JumpLoop = '<string>',
Killed = '<string>',
KilledNuke = '<string>',
Knockback = '<string>',
Landing = '<string>',
Load = '<string>',
MagneticLoop = '<string>',
MagnetPull = '<string>',
MagnetPush = '<string>',
MegaBlast = '<string>',
MoveSharpTurn = '<string>',
NuclearLaunchDetected = '<string>',
NukeCharge = '<string>',
OnConvert = '<string>',
OnReclaimed = '<string>',
Open = '<string>',
OverchargeOff = '<string>',
OverchargeOn = '<string>',
Pack = '<string>',
ReclaimLoop = '<string>',
ShieldOff = '<string>',
ShieldOn = '<string>',
Sinking = '<string>',
StartMove = '<string>',
StopMove = '<string>',
StopMoveLand = '<string>',
StopMoveSub = '<string>',
StopMoveWater = '<string>',
SubmergeStart = '<string>',
SurfaceStart = '<string>',
TeleportEnd = '<string>',
TeleportStart = '<string>',
Thruster = '<string>',
TransitionLand = '<string>',
TransitionWater = '<string>',
UISelection = '<string>',
UnHunker = '<string>',
Unload = '<string>',
Unpack = '<string>',
},

AverageDensityEdit

We store average density instead of an absolute mass value (units mass, not economic) so you don't have to change the mass value when the size of the unit changes. The mass is autocalculated via the Size * AverageDensity.

AverageDensity = <n>, <Unit average density in tons / m^3 (Default is 0.49).>

BuildEdit

The Build section is used to define how the unit repairs and builds, but for some reason, not what it builds.

Build = {
AssistMultiplier = <n>,
AttachBone = <bone>,
BuildArmManipulators = {
AimBone = <bone>, <When aiming the repair/build 'weapon', this bone is the (muzzle? or torso? Need to test.).>
AutoInitiateRepairCommand = <true/false>, <Whether or not the unit will automatically repair nearby allies.>
PitchBone = <bone>, <When aiming the repair/build 'weapon', this bone controls the pitch (y-axis movement).>
YawBone = <bone>, <When aiming the repair/build 'weapon', this bone controls the yaw (x-axis movement).>
},
BuildClearsCommandQueue = <true/false>, <Whether or not building will (force the unit to stop?) and lose and queued orders that it had accumulated.>
BuildModifiersExclusionCategory = { <Each extra line allows you to define another category string.>
'<string>',
},
BuildScaffoldUnit = '<string>',
BuildSingle = <true/false>,
BuildSliderBone = <bone>,
BuildSliderX = <n>,
BuildSliderY = <n>,
BuildSliderZ = <n>,
EffectBones = { <Each extra line allows you to define another effect bone.>
<bone>,
},
FinishBuildAnimDelay = <n>,
FinishBuildRolloffDelay = <n>,
ForceMoveToRolloffPoint = <true/false>,
MaxRepairDistance = <n>,
RepairScanRadius = <n>, <If AutoInitiateRepairCommand is set to true, this is the radius at which the unit will begin to repair allies within.>
RepairTargetCheckInterval = <n>, <If AutoInitiateRepairCommand is set to true, this is the interval of time between the unit checking for nearby allies to repair within its repair radius.>
UseBuildMaterial = <true/false>,
},

CategoriesEdit

The Categories section is used to 'tag' units so that other functions can determine whether a unit falls into a certain category or not. For example: if a new unit buffs all nearby tanks, but not every land unit, the category of 'TANK' will be used instead of 'LAND'. Some categories are more direct, as 'UNTARGETABLE' make a unit (usually a drone or unit attached to a different unit) unable to be targeted directly.

Categories = { <These are the categories used by the retail units, but they can store whatever categories they are given. Oh, and alphabetical order here is very nice from an orderly perspective, and makes it faster for when you are searching to see if your unit already has a certain category. For some reason they didn't think to do that for the retail units.>
'<string>', <Each additional line will allow you to add another category.>
},
Here are most of the retail unit categories.
AAUPGRADE
AC1000
AIR
AIRFORTRESS
AIRGANTRYBUILDER
AIRNOMO
AIRSTAGINGPLATFORM
ANTIAIR
ANTIMISSILE
ANTINAVY
ANTISUB
ANTISURFACE
ARTIFACT
ARTILLERY
ATLANTISII
BATTLESHIP
BOMBBOUNCER
BOMBER
BOT
BUILTBYCARRIER
BUILTBYCOMMANDER
BUILTBYESCAPEPOD
BUILTBYFACTORY
BUILTBYMOBILE
BUILTBYTIER2FACTORY
BUILTBYTIER3COMMANDER
BUILTBYTIER3ENGINEER
BUILTBYTIER3FACTORY
BUILDSGUNSHIP
C230STARKING
CANNOTUSEAIRSTAGING
CANTRANSPORTCOMMANDER
CAPTURE
CARRIER
CIVILIAN
COLOSSUS
COMMAND
CONSTRUCTION
COUNTERINTELLIGENCE
CRUISER
CYBRAN
CYBRANNUKEBUILDER
C-REX
DARKENOID
DEFENSE
DIRECTFIRE
DRAGBUILD
ECONOMIC
ENERGYEXTRACTION
ENERGYPRODUCTION
ENGINEER
ESCAPEPOD
EXPERIMENTAL
EXPERIMENTALFACTORY
FACTORY
FATBOYII
FERRYBEACON
FIGHTER
GATE
GIANTTRANSPORT
GROUNDATTACK
GUNSHIP
HIGHALTAIR
HOVER
ILLUMINATE
INDIRECTFIRE
INSIGNIFICANTUNIT
INTELLIGENCE
KINGKRIPTOR
KRAKEN
LAND
LANDGANTRYBUILDER
MASSEXTRACTION
MASSFABRICATION
MASSPRODUCTION
MEGALITHII
MOBILE
MOBILEGANTRYBUILDER
NAVAL
NAVALCARRIER
NEEDMOBILEBUILD
NOFORMATION
NOTVISIBLETORECON
NUKE
OPTICS
OVERLAYANTIAIR
OVERLAYANTINAVY
OVERLAYDEFENSE
OVERLAYDIRECTFIRE
OVERLAYINDIRECTFIRE
OVERLAYMISC
OVERLAYRADAR
OVERLAYSONAR
PARALLELBUILDER
PATROLHELPER
PDUPGRADE
POD
PODSTAGINGPLATFORM
PRODUCTSC2
PULINSMASH
RADAR
RALLYPOINT
REBUILDER
RECLAIM
RECLAIMABLE
RESEARCHSTATION
ROGUENANITE
SC2SCENARIO
SEA
SEAGANTRYBUILDER
SELECTABLE
SHIELD
SHIELDUPGRADE
SHOWATTACKRETICLE
SHOWQUEUE
SILO
SIZE4
SIZE8
SIZE12
SIZE16
SONAR
SORTCONSTRUCTION
SORTDEFENSE
SORTECONOMY
SORTINTEL
SORTSTRATEGIC
SOULRIPPERII
STRATEGIC
STRUCTURE
SUBMERSIBLE
T1SUBMARINE
TACTICALMISSILEPLATFORM
TANK
TECH1
TECH2
TELEPORTATION
TELEPORTATIONTERMINUS
TRANSPORTALLIES
TRANSPORTATION
TRANSPORTENEMIES
TRANSPORTFOCUS
UAA0102
UCL0103
UIB0101
UEF
UIADVANCEDSORTCATEGORY
UIBASICSORTCATEGORY
UNCAPTURABLE
UNITLAUNCHER
UNREPAIRABLE
UNTARGETABLE
UPGRADEMODULE
URCHINOW
UUB0101
UUL0101
UUL0102
UUL0103
UUL0104
UUL0105
UUM0002
VERIFYMISSILEUI
VISIBLETORECON
WILFINDJA

CollisionOffsetXEdit

CollisionOffsetX = <n>,

CollisionOffsetYEdit

CollisionOffsetY = <n>,

CollisionOffsetZEdit

CollisionOffsetZ = <n>,

CollisionSphereOffsetYEdit

CollisionSphereOffsetY = <n>,

CullVolumeScaleZEdit

CullVolumeScaleZ = <n>,

DeathEdit

The Death section handles the death effects of the unit.

Death = {
AirDestructionPlumeEffect = '<string>',
AirDestructionWaterPlumeEffect = '<string>',
AirExplosionEffect = '<string>',
'DoNotWaitForDeathAnim' = <true/false>,
DeathAnimWaitTime = <n>,
DebrisPieces = <true/false>,
DestructionParts = {
AttachBone = <bone>,
Mesh = '<string>',
Meshes = {
'<string>',
},
PivotBone = <bone>,
Projectile = '<string>',
},
ExplosionEffect = '<string>',
ExplosionEffectScale = <n>,
ExplosionTendrils = <true/false>,
Light = <true/false>,
},

DefenseEdit

The Defense section handles the health, shields, and threat levels.

Defense = {
AirThreatLevel = <n>,
AntiMissile = {
AttachBone = <bone>,
Radius = <n>,
RedirectRateOfFire = <n>,
},
ArmorType = '<string>',
EconomyThreatLevel = <n>,
Health = <n>,
MaxHealth = <n>,
RegenRate = <n>,
Shield = {
AllowPenetration = <true/false>, <Supposedly whether or not a projectile can penetrate the shield, but ShieldDamageAbsorb seems to control this in all cases.>
CollisionOffsetY = <n>,
CollisionOffsetZ = <n>,
CollisionShape = '<string>',
ImpactEffects = '<string>',
Mesh = '<string>',
OwnerShieldTextureSet = '<string>',
PanelArray = {
Panel_1 = '<string>',
Panel_2 = '<string>',
},
ShieldDamageAbsorb = <n>, <The percentage of damage that the shield takes from the projectile. The remaining damage is retained by the projectile.>
ShieldMaxHealth = <n>, <The shield's current maximum amount of health/shield power.>
ShieldRechargeTime = <n>, <The amount of time that it takes for an offline shield to come back online.>
ShieldReflectChance = <n>, <Chance to reflect a projectile at a random vector. This still deals damage to the shield and (I am pretty sure) reduces the damage of the projectile via Damage Absorb. 1 is 100%, 0.5 is 50%, etc.>
ShieldReflectRandomVector = <true/false>, <Whether the shield reflects at a random vector or directly back to where from it came.>
ShieldRegenRate = <n>, <The regeneration rate of the shield while it is active.>
ShieldSize = <n>, <The size of the shield's radius.>
ShieldType = '<string>',
SizeX = <n>,
SizeY = <n>,
SizeZ = <n>,
StartOn = <true/false>, <Whether or not the shield starts active.>
},
SubThreatLevel = <n>,
SurfaceThreatLevel = <n>,
},

DescriptionEdit

The Description shows up under the name in the pop-up of the user interface when a mouse cursor is over a unit.

Description = '<string>', <An example: '<LOC UNIT_DESCRIPTION_0081>Fighter' The LOC is to tell the game to attempt to find a localization code in place of the whole string. It looks through the strings_db.lua file of the user's set language. If it finds it, it replaces the string with whatever is linked to it. If it doesn't, it uses whatever text is outside of the LOC code.>

DisplayEdit

The Display section handles how the unit appears in the game visually and what animations it uses.

Display = {
AnimationActivate = '<string>',
AnimationActivateLoop = <true/false>,
AnimationBuild = '<string>',
AnimationDeath = {
{
Animation = '<string>',
AnimationRateMax = <n>,
AnimationRateMin = <n>,
Weight = <n>,
},
},
AnimationDeploy = '<string>',
AnimationIdle = '<string>',
AnimationFinishBuild = '<string>',
AnimationLand = '<string>',
AnimationOnStartBuild = '<string>',
AnimationOpen = '<string>',
AnimationPermOpen = '<string>',
AnimationTakeOff = '<string>',
AnimationUpgrade = '<string>',
AnimationWalk = '<string>',
AnimationWalkRate = <n>,
AnimationWater = '<string>',
AttackReticle = <n>,
BlinkingLights = {
{
BLBone = <bone>,
BLOffsetX = <n>,
BLOffsetY = <n>,
BLOffsetZ = <n>,
BLScale = <n>,
},
},
BlinkingLightsFx = {
Green = '<string>',
Red = '<string>',
Yellow = '<string>',
},
BuildAttachBone = <bone>,
BuildEffectsScale = <n>,
BuildEffectSphereHeight = <n>,
BuildEffectSphereScale = <n>,
BuildPointBones = {
<bone>,
},
BuildSphereScaleMul01 = <n>,
BuildSphereScaleMul02 = <n>,
DamageEffects = {
{
Bone = <bone>,
OffsetX = <n>,
OffsetY = <n>,
OffsetZ = <n>,
},
Layer definitions are only valid on pages of namespace "Layer"

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.