Skip to content

VoxelBarrelOffsetToBarrelEnd

Where a building with a voxel barrel creates its shots.

Specification
Applies to
BuildingType
File
rules.ini
Section
[<ObjectType ID>]
Value
point (x,y,z)
When omitted
Context-dependentNo value is established. A BuildingType whose rules never assign the key keeps whatever the memory it was allocated from held.

Three whole numbers, X,Y,Z, in leptons — 256 to a cell. The offset runs through the same placement the drawn barrel does, so it is measured on the pitched gun: X out along the barrel, Y to its left and Z square to it, with VoxelBarrelScale multiplying all three before the pivot offsets carry it out to the structure. It is the only one of the four offsets that nothing draws.

On a BarrelAnimIsVoxel=yes building it replaces both points that PrimaryFireFLH would otherwise fix: the mounting, where the projectile is created and the firing solution is measured from, and the muzzle, where the fire animation and beam appear. The two are the same point here, so the shot and its flash always leave the barrel together, and both rise as the gun elevates.

rules.ini
[MYARTILLERY] ; a BuildingType registered in [BuildingTypes]
BarrelAnimIsVoxel=yes
VoxelBarrelScale=.75
VoxelBarrelOffsetToBarrelEnd=350,75,0 ; drawn at .75, the muzzle sits 262 leptons out

A Burst weapon alternates: the first shot of a burst uses Y as written and the second mirrors it, giving a pair of muzzles either side of the barrel, while a third shot and any after it are centered on the barrel instead.