Fractal Softworks Forum

Please login or register.

Login with username, password and session length

Author Topic: Animated beam weapon rendering issue  (Read 1363 times)

Machine

  • Commander
  • ***
  • Posts: 114
    • View Profile
Animated beam weapon rendering issue
« on: September 11, 2015, 03:25:57 PM »


As the picture shows the weapon doesn't change its color to the one set in the shipsystem file.

The modded ship is nothing special and it's actually using vanilla phase displacer ship system.
The weapon has "specClass":"beam" a customized script (which I believed was the culprit) and it is animated with "numFrames":24, "frameRate":30

After making some tests and discarding it was any attached script or my own mod, found that changing the specClass fixes the issue, removing the animation also fixes the issue, so the ship glows normally during displacing.

So I proceeded to see if I could replicate this in vanilla. The only modified asset is chaingun.wpn. Added the modified code below.


Code
{
"id":"chaingun",  # this id must match what's in the spreadsheet
#"specClass":"projectile",

"specClass":"beam",
"type":"ENERGY",

"size":"MEDIUM",
#"turretSprite":"graphics/weapons/assault_chaingun_turret_base.png",
#"turretGunSprite":"graphics/weapons/assault_chaingun_turret_recoil.png",
#"hardpointSprite":"graphics/weapons/assault_chaingun_hardpoint_base.png",
#"hardpointGunSprite":"graphics/weapons/assault_chaingun_hardpoint_recoil.png",
#"visualRecoil":4.0,  # the gun sprites are only used if this is non-0
#"renderHints":[RENDER_BARREL_BELOW],
"turretSprite":"graphics/weapons/rotary/rotary_cannon_turret_base00.png",
"hardpointSprite":"graphics/weapons/rotary/rotary_cannon_hardpoint_base00.png",
"numFrames":4,
"frameRate":20,
"turretOffsets":[18, 0],
"turretAngleOffsets":[0],
"hardpointOffsets":[29, 0],
"hardpointAngleOffsets":[0],
"barrelMode":"ALTERNATING", # or LINKED.  whether barrels fire at the same time or alternate.
"animationType":"MUZZLE_FLASH",  # NONE, GLOW, MUZZLE_FLASH, SMOKE
"muzzleFlashSpec":{"length":35.0,   # only used if animationType = MUZZLE_FLASH
   "spread":5.0,
   "particleSizeMin":6.0,
   "particleSizeRange":14.0,
   "particleDuration":0.15,
   "particleCount":11,
   "particleColor":[255,240,165,200]},
"projectileSpecId":"chaingun_shot",  # projectile that will be fired
#"fireSoundOne":"chaingun_intro",
"fireSoundTwo":"chaingun_fire",


"fringeColor":[215,85,25,255],
"coreColor":[255,255,255,255],
"glowColor":[255,165,100,150],
"darkCore":false,
"width":25.0,
"textureType":ROUGH,
"textureScrollSpeed":292.0,
"pixelsPerTexel":5.0,
"pierceSet":[PROJECTILE_FF,PROJECTILE_NO_FF,PROJECTILE_FIGHTER,MISSILE_FF,MISSILE_NO_FF],

}
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24114
    • View Profile
Re: Animated beam weapon rendering issue
« Reply #1 on: September 11, 2015, 03:54:40 PM »

Thank you - fixed.
Logged