Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.97a is out! (02/02/24); New blog post: Simulator Enhancements (03/13/24)

Author Topic: MIRV style Point Defense Missiles will not track enemy missiles.  (Read 2414 times)

Wind Tempest

  • Ensign
  • *
  • Posts: 19
    • View Profile

If this was posted in the wrong place, I apologize.

A while back in the general modding questions thread, I tried to make a missile weapon that would be able to target and track enemy missiles, fly near them and release a bunch of flares.  However if I used both the MIRV scripting and Point Defense rules, the mirv missile will not fire nor track incoming enemy missiles.  I was told that I would need to build a custom script to do this, but PD missiles works and MIRV missiles work, but when combined, PD MIRV missiles do not work.

Here is the line in the csv:
Ember Missile Rack,ember_rack,1,300,1000,,200,,10,5,6,30,0.2,,ENERGY,0,,0,2,1,,0,0,0,0,,900,100,6,35,"PD,DO_NOT_AIM",9

Here is the weapon I was using:
Spoiler
{
   "id":"ember_rack",
   "specClass":"projectile",
   "type":"MISSILE",
   "size":"SMALL",
   "turretUnderSprite":"graphics/weapons/cmc_s_emberrack_turret_base.png",
   "turretSprite":"graphics/weapons/cmc_s_emberrack_turret.png",
   "hardpointSprite":"graphics/weapons/cmc_s_emberrack_hardpoint.png",   
   "hardpointOffsets":[12, 0, 12, 2, 12, -2, 12, 0],
   "turretOffsets":[2, 0, 0, 2, -2, 0, 0, -2],
   "hardpointAngleOffsets":[0, 0, 0, 0],
   "turretAngleOffsets":[0, 0, 0, 0],
   "barrelMode":"ALTERNATING",
   "animationType":"SMOKE",
   #"renderHints":[RENDER_LOADED_MISSILES],
   "interruptibleBurst":false,
   "displayArcRadius":300,
   "smokeSpec":{"particleSizeMin":10.0,
             "particleSizeRange":16.0,
             "cloudParticleCount":3,
             "cloudDuration":0.9,
             "cloudRadius":8.0,
             "blowbackParticleCount":4,
             "blowbackDuration":1.1,
             "blowbackLength":20.0,
             "blowbackSpread":10.0,
             "particleColor":[170,160,150,130]},
   "projectileSpecId":"ember_shot",
   "fireSoundTwo":"harpoon_fire",
}
[close]

Here is the initial projectile:
Spoiler
{
   "id":"ember_shot",
   "specClass":"missile",   
   "missileType":"MIRV",
   "sprite":"graphics/missiles/cmc_ember.png",
   "size":[5,11],   
   "center":[3,6],
   "collisionRadius":10,
   "collisionClass":"MISSILE_NO_FF",
   "explosionColor":[255,100,10,255],  # purely visual, will get a white additively blended core on top of this color
   "explosionRadius":0, # purely visual
   "engineSpec":{"turnAcc":180,
              "turnRate":90,
              "acc":1500,
              "dec":1000},
   "engineSlots":[{"id":"ES1",
               "loc":[-13, 0],
                #"style":"MISSILE_HIGH_TECH",
                "style":"CUSTOM",
               "styleSpec":{
                  "mode":"QUAD_STRIP", # PARTICLES or QUAD_STRIP, determines which params are used
                  "engineColor":[255,150,100,255],
                  "contrailDuration":2,
                  "contrailWidthMult":1,
                  "contrailWidthAddedFractionAtEnd":2.5,  # can be negative. makes trail spread out/narrow at the end
                  "contrailMinSeg":5, # min segment length, in pixels
                  "contrailMaxSpeedMult":0.5f,
                  "contrailAngularVelocityMult":0.5f,
                  "contrailColor":[255,150,100,100],
                  "type":"GLOW" # GLOW or SMOKE; additive or regular blend mode
               },
                "width":5.0,
                "length":15.0,
                "angle":180.0}],
   "behaviorSpec":{"behavior":"MIRV",
               "splitRange":100,
               "minTimeToSplit":1,
               "numShots":4,
               "damage":10,
               "emp":100,
               "damageType":ENERGY,
               "hitpoints":1,
               "arc":270,
               "spreadSpeed":325,
               "projectileSpec":"flare_standard",
               #"emptySpec":"type_1_mirv_empty",
               "smokeSpec":{"particleSizeMin":20.0,
                         "particleSizeRange":20.0,
                         "cloudParticleCount":11,
                         "cloudDuration":1.0,
                         "cloudRadius":20.0,
                         "blowbackParticleCount":0,
                         "blowbackDuration":0,
                         "blowbackLength":0,
                         "blowbackSpread":0,
                         "particleColor":[175,100,50,200]}
               }
               
}
[close]

And I just used the flare_standard.proj as the submunition I copied from the vanilla data folder(along with the graphics needed to run it)
Logged

Tartiflette

  • Admiral
  • *****
  • Posts: 3529
  • MagicLab discord: https://discord.gg/EVQZaD3naU
    • View Profile
Re: MIRV style Point Defense Missiles will not track enemy missiles.
« Reply #1 on: October 27, 2016, 01:46:02 AM »

And the answer is the same, the vanilla MIRV AI isn't coded to support such edge case. You'll need to create your own custom AI, or use the SWP's Flare Missile Launcher instead.
Logged
 

Wind Tempest

  • Ensign
  • *
  • Posts: 19
    • View Profile
Re: MIRV style Point Defense Missiles will not track enemy missiles.
« Reply #2 on: October 27, 2016, 09:56:04 AM »

I am aware of that.  However, I am bringing it up here in case this Edge Case was something Alex wanted to fix.
Logged