NOP
  • NOP
  • 100% (Exalted)
  • Major Topic Starter
14 years ago
Does anyone know if it's possible to have 2 upgrades on the same weapon?

I'm thinking of the Mig for nuke general having both the black napalm upgrade and
the tactical nukes upgrade...

The original ini code displays upgrade cameo for black napalm, as well as tactical nukes, but it has no effect on the weapon set. I want to fix this...
Sponsor
Annihilationzh
14 years ago
You'll have to add the napalm code to the missile instead of the weapon. If you need an example, look at toxin shells, as they do it via the shell instead of the weapon.
If you need help, post in the forum. You'll get help a lot faster than if you send me a PM.

I reject all buddy requests. I don't think 'buddy' needs to be made official. It's not like you're marrying me.
NOP
  • NOP
  • 100% (Exalted)
  • Major Topic Starter
14 years ago
I think I get what you are saying, but after studying the toxin shells, I still cant get my weapon to work; I added a "Fire weapon when dead" to the missile object, but it doesnt fire.
As a test, I just want the missile to leave toxins like toxin shells, except not require an upgrade... Heres the code:

Weapon.ini:
Weapon NEWNuke_MiGMissileWeapon 
  PrimaryDamage               = 100.0            
  PrimaryDamageRadius         = 5.0      
  SecondaryDamage             = 40.0          
  SecondaryDamageRadius       = 30.0  
  DamageType                  = JET_MISSILES ; since creates FireField to do the flame damage
  DeathType                   = EXPLODED
  AttackRange                 = 320.0
  MinimumAttackRange          = 80.0 ; used to be 100.0, but that was too large for mig/missile speed
  ProjectileObject            = NukeGeneralsNapalmMissile
  ProjectileExhaust           = MissileExhaust
  VeterancyProjectileExhaust  = HEROIC HeroicMissileExhaust
  FireFX                      = WeaponFX_NapalmMissile
  FireSound                   = MigJetNapalmWeapon
  RadiusDamageAffects         = ALLIES ENEMIES NEUTRALS NOT_SIMILAR
  AcceptableAimDelta          = 30
  DelayBetweenShots           = 300             ; time between shots, msec
  ClipSize                    = 2                        ; how many shots in a Clip (0 == infinite)
  ClipReloadTime              = 8000               ; how long to reload a Clip, msec
  AutoReloadsClip             = RETURN_TO_BASE                 ; must return to base to reload this weapon
  AntiGround                  = Yes
  ProjectileDetonationFX      = WeaponFX_JetMissileDetonation
;  ProjectileDetonationOCL     = OCL_RadiationFieldSmall
  DamageDealtAtSelfPosition   = Yes
  ProjectileCollidesWith      = STRUCTURES
  AntiAirborneVehicle         = Yes
  AntiAirborneInfantry        = No
  ShowsAmmoPips               = Yes
End

WeaponObjects.ini:
; ---- begin Projectile death behaviors
  Behavior = InstantDeathBehavior DeathModuleTag_01
    DeathTypes = NONE +DETONATED
    ; we detonated normally.
    ; no FX, just quiet destroy ourselves
  End
  Behavior = InstantDeathBehavior DeathModuleTag_02
    DeathTypes = NONE +LASERED
    ; shot down by laser.
    FX         = FX_GenericMissileDisintegrate
    OCL        = OCL_GenericMissileDisintegrate
  End
  Behavior = InstantDeathBehavior DeathModuleTag_03
    DeathTypes = ALL -LASERED -DETONATED
    ; shot down by nonlaser.
    FX         = FX_GenericMissileDeath
  End

  Behavior = FireWeaponWhenDeadBehavior ModuleTag_04
    DeathWeapon   = ToxinShellWeapon
    StartsActive  = Yes   
  End

Any thoughts?
Annihilationzh
14 years ago
Not sure why that doesn't work. I even tried different death modules and it still didn't work.

So, on to workarounds. I made this because workarounds are notoriously hard to explain.

In Weapon.ini

;------------------------------------------------------------------------------
Weapon Nuke_MiGMissileWeapon  ;changed OCL only from the original ZH
  PrimaryDamage               = 100.0            
  PrimaryDamageRadius         = 5.0      
  SecondaryDamage             = 40.0          
  SecondaryDamageRadius       = 30.0  
  DamageType                  = JET_MISSILES ; since creates FireField to do the flame damage
  DeathType                   = EXPLODED
  AttackRange                 = 320.0
  MinimumAttackRange          = 80.0 ; used to be 100.0, but that was too large for mig/missile speed
  ProjectileObject            = NapalmMissile
  ProjectileExhaust           = MissileExhaust
  VeterancyProjectileExhaust  = HEROIC HeroicMissileExhaust
  FireFX                      = WeaponFX_NapalmMissile
  FireSound                   = MigJetNapalmWeapon
  RadiusDamageAffects         = ALLIES ENEMIES NEUTRALS NOT_SIMILAR
  AcceptableAimDelta          = 30
  DelayBetweenShots           = 300             ; time between shots, msec
  ClipSize                    = 2                        ; how many shots in a Clip (0 == infinite)
  ClipReloadTime              = 8000               ; how long to reload a Clip, msec
  AutoReloadsClip             = RETURN_TO_BASE                 ; must return to base to reload this weapon
  AntiGround                  = Yes
  ProjectileDetonationFX      = WeaponFX_JetMissileDetonation
  ProjectileDetonationOCL     = OCL_MiGNapalmSpawner ;OCL_RadiationFieldSmall
  DamageDealtAtSelfPosition   = Yes
  ProjectileCollidesWith      = STRUCTURES
  AntiAirborneVehicle         = Yes
  AntiAirborneInfantry        = No
  ShowsAmmoPips               = Yes
End

;------------------------------------------------------------------------------
Weapon NapalmSpawnerWeapon ;completely new
  PrimaryDamage = 0.0
  PrimaryDamageRadius = 1.0      
  AttackRange = 100.0
  DamageType = EXPLOSION 
  DeathType = EXPLODED
  WeaponSpeed = 99999.0
  ProjectileObject = NONE
  FireFX = WeaponFX_NapalmMissileDetonation
  FireOCL                     = OCL_FireFieldSmall
  RadiusDamageAffects = ALLIES ENEMIES NEUTRALS
  DelayBetweenShots = 0                   ; time between shots, msec
  ClipSize = 1                            ; how many shots in a Clip (0 == infinite)
  ClipReloadTime = 0                      ; how long to reload a Clip, msec
  AutoReloadsClip = No 
  AntiGround = Yes
  DamageDealtAtSelfPosition = Yes

  HistoricBonusTime           = 3000
  HistoricBonusCount          = 8
  HistoricBonusRadius         = 100
  HistoricBonusWeapon         = FirestormSmallCreationWeapon
End

;------------------------------------------------------------------------------
Weapon BlackNapalmSpawnerWeapon ;completely new
  PrimaryDamage = 0.0
  PrimaryDamageRadius = 1.0      
  AttackRange = 100.0
  DamageType = EXPLOSION 
  DeathType = EXPLODED
  WeaponSpeed = 99999.0
  ProjectileObject = NONE
  FireFX = WeaponFX_BlackNapalmExplosion
  FireOCL     = OCL_FireFieldUpgradedSmall
  RadiusDamageAffects = ALLIES ENEMIES NEUTRALS
  DelayBetweenShots = 0                   ; time between shots, msec
  ClipSize = 1                            ; how many shots in a Clip (0 == infinite)
  ClipReloadTime = 0                      ; how long to reload a Clip, msec
  AutoReloadsClip = No 
  AntiGround = Yes
  DamageDealtAtSelfPosition = Yes

  HistoricBonusTime           = 3000
  HistoricBonusCount          = 8
  HistoricBonusRadius         = 100
  HistoricBonusWeapon         = BlackNapalmFirestormSmallCreationWeapon
End

ObjectCreationList.ini

; ----------------------------------------------
ObjectCreationList OCL_MiGNapalmSpawner
 CreateObject
   ObjectNames = MiGNapalmSpawner
   Disposition = ON_GROUND_ALIGNED
 End
End

And object code:

;------------------------------------------------------------------------------
Object MiGNapalmSpawner

  Draw = W3DModelDraw ModuleTag_01
    DefaultConditionState
      Model = NONE
    End
  End
  EditorSorting = SYSTEM
  ArmorSet
    Armor = ProjectileArmor
  End
  VisionRange = 0.0
  KindOf = PROJECTILE
  Body = ActiveBody ModuleTag_02
    MaxHealth = 100.0
    InitialHealth = 100.0
  End
  Behavior = DestroyDie ModuleTag_03
  End
  Behavior = LifetimeUpdate ModuleTag_04
    MinLifetime = 1
    MaxLifetime = 1
  End
  Behavior = FireWeaponWhenDeadBehavior ModuleTag_05
    DeathWeapon   = NapalmSpawnerWeapon
    StartsActive  = Yes
    ConflictsWith = Upgrade_ChinaBlackNapalm
  End
  Behavior = FireWeaponWhenDeadBehavior ModuleTag_06
    DeathWeapon   = BlackNapalmSpawnerWeapon
    StartsActive  = No
    TriggeredBy   = Upgrade_ChinaBlackNapalm
  End
End

If you need help, post in the forum. You'll get help a lot faster than if you send me a PM.

I reject all buddy requests. I don't think 'buddy' needs to be made official. It's not like you're marrying me.
NOP
  • NOP
  • 100% (Exalted)
  • Major Topic Starter
14 years ago
Sorry for the late post, I had to finish something on my war factory and some other stuff, but I implemented your code and it worked perfectly!!!

I've changed a few things now so the missiles on weaponset 1 just explode and then leave radiation instead of flames... The radiation damage is increased by my "Man made isotopes" upgrade, which replaces black napalm as I have converted all "napalm" attacks to "nuclear" for this general... Weaponset 2 fires the tactical nuke which is also affected by the "Man made isotopes" upgrade... So there you have it! 2 weapon upgrades on the same unit!!!

Thank you so much for your time and help, you really made my day!