Log inGet started
Package

turretsKit.package

README.md

turretsKit.turretStyle

The data contract a turret look style is checked against. A style paints every turret (material and colour per part slot, a few shape switches) and picks the projectile look (from projectileKit.looks) each kind of shot uses. The kit ships three in turretsKit.package/styles/: scifi, medieval and toy.

A Turret component picks a style with its style field ("auto" follows the world default set by turretsKit.api.setStyle). Add a style by adding a .data file with contract: turretsKit.turretStyle, or from code with turretsKit.api.defineStyle(id, def, base).

Fields

FieldTypeDefaultMeaning
idstringrequiredName used by style fields and setStyle.
labelstringrequiredDisplay name.
descriptionstring""One-paragraph description.
tagslist of strings[]Tags for filtering and picking: listed with the look by TK.styles(), and TK.styles(tag) filters by one.
bodyMaterialplastic metal glow stone woodmetalMaterial of body parts.
trimMaterialsamemetalMaterial of trim parts.
baseMaterialsamemetalMaterial of the base.
bodycolor#c8ccd4Body colour.
trimcolor#33363dTrim colour.
basecolor#55595fBase colour.
glowcolor#33ddffGlowing accent colour.
bodyFromTurretnumber 0..10How far body colour is blended toward the turret type's own color.
glowFromTurretnumber 0..11How far glow colour is blended toward the turret type's color.
roundedbooleanfalseBox parts use the rounded-box mesh.
base_shapeplate tower blockplateBase the turret stands on.
crenellationsbooleanfalseBattlements on a tower base.
bannerbooleanfalseA banner on the base (and on walls).
scalenumber ≥ 0.21Multiplies every turret's model size (on top of the tier's scale).

stone and wood currently render as tinted plastic.

shots (struct): projectile look per shot slot

SlotDefaultUsed for
bullettracerMachine gun bullets
shellshellCannon shells
mortarshellMortar shells
missilemissileMissiles
missileTrailsmokePuffs dropped behind missiles
beamlaserRedLaser beam
arcarcCyanTesla lightning
frostfrostFrost shots
poisonpoisonPoison shells in flight
cloudpoisonPoison cloud puffs
snipersnipeTrailSniper trail
flameflameFlame spray puffs
blastblastExplosions where shells and missiles land
muzzlemuzzleMuzzle flash
ringshockRingDeclared ring slot (aura and poison rings currently use fixed looks)

Each value is a look name from projectileKit.looks; projectileKit.api.defineLook adds new ones.