File overview: proj
Description
The .proj file specifies the particulars of projectiles, such as those defined as firing from weapons in .wpn files. It is formatted in Starsector's somewhat loose JSON schema
Examples
Gun
{
"id":"irpulse_shot",
"specClass":"projectile",
"spawnType":"BALLISTIC_AS_BEAM",
"collisionClass":"RAY",
"collisionClassByFighter":"RAY_FIGHTER",
"length":70.0,
"width":11.0,
"fadeTime":0.25,
"fringeColor":[200,0,0,255],
"coreColor":[255,200,200,200],
"textureType":"SMOOTH",
"textureScrollSpeed":-256.0,
"pixelsPerTexel":1.0
}
Missile
{
"id":"reaper_torp",
"specClass":"missile",
"missileType":"ROCKET",
#"sprite":"graphics/missiles/missile_torpedo.png",
#"size":[16,28],
#"center":[8,14],
"sprite":"graphics/missiles/missile_torpedo_compact.png",
"size":[14,23],
"center":[7,11],
"collisionRadius":20,
"collisionClass":"MISSILE_FF",
"explosionColor":[255,100,100,255], # purely visual, will get a white additively blended core on top of this color
"explosionRadius":350, # purely visual
"explosionSpec":{"duration":0.1f, # not visual
"radius":175,
"coreRadius":75, # full damage within core radius
"collisionClass":HITS_SHIPS_AND_ASTEROIDS,
"collisionClassByFighter":HITS_SHIPS_AND_ASTEROIDS,
"particleSizeMin":5.0,
"particleSizeRange":3.0,
"particleDuration":1,
"particleCount":200,
"particleColor":[255,155,155,255]},
"flameoutTime":3, # total time from flameout to full fadeout
"armingTime":0.5,
"noEngineGlowTime":0.5, # time spent without the engine glow being rendered
"fadeTime":0.5, # fadeout duration
"engineSpec":{"turnAcc":0,
"turnRate":0,
#"acc":35,
"acc":500,
"dec":0},
"engineSlots":[{"id":"ES1",
"loc":[-11, 0],
#"loc":[-14, 0],
#"style":"TORPEDO",
"style":"CUSTOM",
"styleSpec":{
"mode":"QUAD_STRIP", # PARTICLES or QUAD_STRIP, determines which params are used
"engineColor":[255,100,100,255],
"contrailDuration":2,
"contrailWidthMult":1.5,
"contrailWidthAddedFractionAtEnd":1, # can be negative. makes trail spread out/narrow at the end
"contrailMinSeg":5, # min segment length, in pixels
"contrailMaxSpeedMult":0f,
"contrailAngularVelocityMult":0.5f,
"contrailSpawnDistMult":0f, # how far away from engine it starts
"contrailColor":[255,100,100,50],
"glowSizeMult":2.5,
"glowAlternateColor":[255,0,0,255],
"type":"GLOW" # GLOW or SMOKE; additive or regular blend mode
},
"width":10.0,
"length":80.0,
"angle":180.0}]
}
Elements
id
- Unique projectile ID used to reference this projectile in scripts or by projectileSpecId in a .wpn file. String
specClass
- projectile
- missile
spawnType
- BALLISTIC_AS_BEAM
- Basically if any point in the segment touches a Target it will count as a hit regardless of whether it's the front or the back of the projectile. In a practical sense most of the differences are aesthetic but if you're dealing with extremely high velocity projectiles you will typically want to use ballistic as beam to prevent issues like Shield bypassing or no clipping through small targets
- BALLISTIC
- BEAM
- PLASMA
collisionClass
- RAY
- RAY_FIGHTER
- PROJECTILE_NO_FF
- PROJECTILE_FF
- PROJECTILE_FIGHTER
- NONE
collisionClassByFighter
- RAY_FIGHTER
- PROJECTILE_FIGHTER
length
hitGlowRadius
width
fadeTime
- fadeout duration. Number
fringeColor
coreColor
textureScrollSpeed
pixelsPerTexel
bulletSprite
behaviorSpec
- behavior
- PROXIMITY_FUSE, MIRV
- shotRangeVariance
- range
- explosionSpec
textureType
- Applies to BALLISTIC_AS_BEAM
http://fractalsoftworks.com/forum/index.php?topic=5061.msg241132#msg241132
- ROUGH
- SMOOTH
- Custom png
- Can specify a png file, with file path
darkCore
- boolean
onHitEffect
- Denotes a script that will trigger on the frame after the projectile collides
glowRadius
glowColor
Vanilla only uses these ones on missiles
center
- Defined centerpoint of this missile. Cartesian coordinate
size
- Display size of the sprite. If the actual sprite is a different size than this then it will be shrunk or stretched to fit. Height & width in pixels
explosionColor
- Purely visual, will get a white additively blended core on top of this color. RGBA
explosionRadius
- purely visual, related to explosionColor. Number
engineSpec
- turnAcc
- Number
- turnRate
- Number
- acc
- Number
- dec
- Number
engineSlots
- Specifications of the engine(s) on the missile. Array of arrays. Only applies to projectiles with the specClass "missile", and will not be visible on those classed as "projectile"
- id
- Non-global missile specific engine ID for each engine. String
- loc
- Location of this engine. Cartesian coordinate
- style
- Which engine style to use as defined in \data\config\engine_styles.json . Can be CUSTOM, which will use the supplied styleSpec in this .proj file. String
- styleSpec
- If style = CUSTOM then use these style settings.
- mode
- PARTICLES or QUAD_STRIP, determines which params are used
- engineColor
- RGBA
- contrailDuration
- Number
- contrailWidthMult
- Number
- contrailWidthAddedFractionAtEnd
- can be negative. makes trail spread out/narrow at the end. Number
- contrailMinSeg
- min segment length, in pixels. Number
- contrailMaxSpeedMult
- Float
- contrailAngularVelocityMult
- Float
- contrailSpawnDistMult
- how far away from engine it starts. Float
- contrailColor
- RGBA
- type
- GLOW or SMOKE; additive or regular blend mode
- width
- Number
- length
- Number
- angle
- Degrees
missileType
- Which type of missile AI is used. String
armingTime
- Delay before warhead is armed, in seconds. Number (usually decimal)
noEngineGlowTime
- time spent without the engine glow being rendered. Number
flameoutTime
- total time from flameout to full fadeout. Number
maxFlightTime
- Number
collisionClassAfterFlameout
collisionRadius
- Number
---
Return to Modding