precision_bomber
11 years ago
http://www.moddb.com/mods/death-label/images/after-a-very-long-break4#imagebox 

The Raptors there are 'drones.'

The thing is the when the Raptors are spawned I spawn 5 once the upgrade is purchased.
Here's the kicker, I can buy the upgrade again after 1 Raptor is dead.

So I can have infinite raptors... Though Spawning them to patrol over your command center is a hefty cost, its still ridiculous to have someone stack the upgrade.

Now for the question:
Is there a way to make it so that you have to take out all 5 Raptors before being able to purchase them? Is so, how?

Things I tried:
1. Making a single drone unit that acts like a Mob Nexus.
Result: The game crashed as soon as I spawned the Mob Nexus Drone.

2. Trying number 1 again
Result: The Upgrade Stays Purchased even if the Mob is destroyed.

3. Drone Controlling Drones...
Result: Drone unable to spawn drones.

4. Buying Drone as a Unit with MaxSimultaneousOfType = 1
Result: It doesn't become a slave anymore.
Death Label:
Reduced back to 3 main factions(and a couple of extras).
Each faction can choose a(or all of them) tech-tree via General's Powers.
Angel Wings: Jets and Anti-Air, Helicopters and Missiles, Hovercraft and Lasers
Red Skulls: Armor Division, Mecha Armada, Drone Swarm
Earth's Saviors: Air Raid, Homeworld Security, Stealth
Sponsor
Rrtaya_tsamsiyu
11 years ago
if there can only be one of your command centers, i would try making it to where you buy the raptors individually, and the max production limit is 5.
one soul at a time
precision_bomber
11 years ago
It uses the drone logic from USA Vehicles.

I'm not sure if producing them as normal units would make them slaved to the command center.
Death Label:
Reduced back to 3 main factions(and a couple of extras).
Each faction can choose a(or all of them) tech-tree via General's Powers.
Angel Wings: Jets and Anti-Air, Helicopters and Missiles, Hovercraft and Lasers
Red Skulls: Armor Division, Mecha Armada, Drone Swarm
Earth's Saviors: Air Raid, Homeworld Security, Stealth
Annihilationzh
11 years ago

Things I tried:
1. Making a single drone unit that acts like a Mob Nexus.
Result: The game crashed as soon as I spawned the Mob Nexus Drone.

Originally Posted by: precision_bomber 


I don't think you should give up on this. I can't think of any reason why this wouldn't work if it's coded properly.
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.
acidbrain
11 years ago
Did some testing yesterday and got the nexus to work properly but im having trouble to remove the upgrade, dont have much experience with nexus, is the nexus killed when you destroy all slaves or not?, added an upgradedie module to the nexus but the upgrade isnt removed when all slaves are killed.
Panem et kirkinses
precision_bomber
11 years ago
Maybe because, Nexus never actually dies, it just gets removed out of existence.
Death Label:
Reduced back to 3 main factions(and a couple of extras).
Each faction can choose a(or all of them) tech-tree via General's Powers.
Angel Wings: Jets and Anti-Air, Helicopters and Missiles, Hovercraft and Lasers
Red Skulls: Armor Division, Mecha Armada, Drone Swarm
Earth's Saviors: Air Raid, Homeworld Security, Stealth
klingondragon
11 years ago
From my experience an upgrade stays forever no matter what
The drones on us vehicles arnt proper upgrades maybe there is something there you could use
Annihilationzh
11 years ago

Did some testing yesterday and got the nexus to work properly but im having trouble to remove the upgrade, dont have much experience with nexus, is the nexus killed when you destroy all slaves or not?, added an upgradedie module to the nexus but the upgrade isnt removed when all slaves are killed.

Originally Posted by: acidbrain 


I could solve this with my most convoluted workaround ever, but I think it's better to try the method Rrtaya_tsamsiyu mentioned first.

From my experience an upgrade stays forever no matter what
The drones on us vehicles arnt proper upgrades maybe there is something there you could use

Originally Posted by: KlingonDragon 


Upgrades for a single unit are called Object upgrades, and the others are called player upgrades.
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.
klingondragon
11 years ago
Yes. But still the drones are slightly different to something like the overlord upgrades
precision_bomber
11 years ago

Yes. But still the drones are slightly different to something like the overlord upgrades

Originally Posted by: KlingonDragon 



Reminds me so much Rrtaya_tsamsiyu's topic of destructible portables.
Death Label:
Reduced back to 3 main factions(and a couple of extras).
Each faction can choose a(or all of them) tech-tree via General's Powers.
Angel Wings: Jets and Anti-Air, Helicopters and Missiles, Hovercraft and Lasers
Red Skulls: Armor Division, Mecha Armada, Drone Swarm
Earth's Saviors: Air Raid, Homeworld Security, Stealth
Annihilationzh
11 years ago

Yes. But still the drones are slightly different to something like the overlord upgrades

Originally Posted by: KlingonDragon 


I don't see much of a difference. The overlord upgrades aren't very different from drones. They're both slaves to their vehicle. The napalm bomb is substantially more different.
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.
klingondragon
11 years ago
It was just the first upgrade I could think of
precision_bomber
11 years ago
I have managed to do what AcidBrain did.

Spawning a Mob Nexus Drone.
And had faced the same problem of the upgrade not disabling itself after 'dying'

I also tried making the Nexus an Actual unit; but still the upgrade still stays purchased.
hmm.
Death Label:
Reduced back to 3 main factions(and a couple of extras).
Each faction can choose a(or all of them) tech-tree via General's Powers.
Angel Wings: Jets and Anti-Air, Helicopters and Missiles, Hovercraft and Lasers
Red Skulls: Armor Division, Mecha Armada, Drone Swarm
Earth's Saviors: Air Raid, Homeworld Security, Stealth
precision_bomber
11 years ago
Next to try: Drone controlling Drones
Death Label:
Reduced back to 3 main factions(and a couple of extras).
Each faction can choose a(or all of them) tech-tree via General's Powers.
Angel Wings: Jets and Anti-Air, Helicopters and Missiles, Hovercraft and Lasers
Red Skulls: Armor Division, Mecha Armada, Drone Swarm
Earth's Saviors: Air Raid, Homeworld Security, Stealth
acidbrain
11 years ago
Well i also got the remove upgrade stuff working now, i spawned a second object with the nexus wich removes the upgrade succesfully but the upgrade can be purchased when the raptors are still alive, added a commandsetupgrade to switch to a commandset without the upgrade button but the new problem is that it's a pain in the azz to switch back to the default commandset, tried to combine it with a few scripts but unsuccesfully...and the testing goes on

*edit*
What if you spawn an object in the commandcenter which has the raptor drones and you give the raptors a FireWeaponWhenDeadBehavior module with a weapon that takes out a 5th of the health from the object you spawned so when 5 raptors are killed the object which spawned the raptors also gets killed and frees the upgrade again, didnt test it yet, just a thought.
Panem et kirkinses
precision_bomber
11 years ago
What complicates this is that the buttons to summon raptors is actually an alternate command set so that I can have more space for Generals Powers and separate the Command Center's Emergency Protocols.
Death Label:
Reduced back to 3 main factions(and a couple of extras).
Each faction can choose a(or all of them) tech-tree via General's Powers.
Angel Wings: Jets and Anti-Air, Helicopters and Missiles, Hovercraft and Lasers
Red Skulls: Armor Division, Mecha Armada, Drone Swarm
Earth's Saviors: Air Raid, Homeworld Security, Stealth
acidbrain
11 years ago
This seems to work, maybe it can be done better so feel free to correct stuff



;--Add this to 'Object AmericaCommandCenter'--

  Behavior = ObjectCreationUpgrade Module_Nex
    UpgradeObject = OCL_AmericaRaptorNexus
    TriggeredBy   = Upgrade_AmericaRaptorNexus
;    ConflictsWith = Up to You
  End

;--------------------------------------------------------------
;--Add 3 new objects--

Object AmericaRaptorNexus 
  
  Draw = W3DModelDraw ModuleTag_01
    OkToChangeModelColor = Yes
    DefaultConditionState
      Model = None
    End
  End

  DisplayName        = OBJECT:RaptorNexus
  Side               = America
  RadarPriority      = NOT_ON_RADAR
  EditorSorting      = VEHICLE
  TransportSlotCount = 0

  WeaponSet
    Conditions = None 
    Weapon = PRIMARY   GLAAngryMobNexusHarmlessWeapon
    Weapon = SECONDARY GLAAngryMobNexusHarmlessWeapon
    Weapon = TERTIARY  GLAAngryMobNexusHarmlessWeapon
  End

  ArmorSet
    Conditions = None
    Armor      = InvulnerableAllArmor
    DamageFX   = None
  End

  BuildCost           = 800
  BuildTime           = 5.0    
  VisionRange         = 150
  ShroudClearingRange = 0

  Prerequisites
;    Object = AmericaAirfield
  End

  ExperienceValue = 5 5 5 5
  IsTrainable     = No

  CommandSet = AmericaJetRaptorCommandSet

  RadarPriority = UNIT
  KindOf        = PRELOAD CAN_ATTACK AIRCRAFT MOB_NEXUS ATTACK_NEEDS_LINE_OF_SIGHT NO_COLLIDE SELECTABLE SCORE DRONE

  Body = ImmortalBody ModuleTag_02
    MaxHealth     = 99999.0
    InitialHealth = 99999.0
  End

  Behavior = AIUpdateInterface ModuleTag_03
    AutoAcquireEnemiesWhenIdle = Yes
  End
  Locomotor = SET_NORMAL RaptorJetLocomotor

  Behavior = PhysicsBehavior ModuleTag_04
    Mass = 50.0
  End

  Behavior = SpawnBehavior ModuleTag_05
    SpawnNumber        = 5
    SpawnTemplateName  = AmericaJetNexusRaptor
    ExitByBudding      = Yes
    InitialBurst       = 5
    OneShot            = Yes
    AggregateHealth    = Yes
    SlavesHaveFreeWill = No
  End

  Behavior = QueueProductionExitUpdate ModuleTag_06
    UnitCreatePoint   = X: 0.0  Y:0.0   Z:20.0
    NaturalRallyPoint = X: 0.0  Y:0.0   Z:20.0
  End

  Behavior = SlavedUpdate ModuleTag_Slave
    GuardMaxRange = 50
  End
    
  Behavior = DestroyDie ModuleTag_08
    DeathTypes = ALL
  End

  Geometry            = CYLINDER
  GeometryMajorRadius = 1.0
  GeometryMinorRadius = 1.0
  GeometryHeight      = 1.0     
  GeometryIsSmall     = Yes 
  Shadow              = SHADOW_VOLUME

End

;------------------------------------------------

Object AmericaJetNexusRaptor

  ; *** ART Parameters ***
  SelectPortrait = SACRaptor_L
  ButtonImage    = SACRaptor
  
  UpgradeCameo1 = Upgrade_AmericaLaserMissiles
  UpgradeCameo2 = Upgrade_AmericaAdvancedTraining
  UpgradeCameo3 = Upgrade_AmericaCountermeasures
  
  Draw = W3DModelDraw ModuleTag_01
    OkToChangeModelColor = Yes
 
    DefaultConditionState
      Model            = AVRaptor
      HideSubObject    = BurnerFX01 BurnerFX02
      WeaponLaunchBone = PRIMARY WeaponA
    End

    ConditionState = JETEXHAUST
      ; exhaust
      ParticleSysBone  = Wingtip01 JetContrail
      ParticleSysBone  = Wingtip02 JetContrail
    End

    ConditionState = JETEXHAUST JETAFTERBURNER
      ; exhaust
      ParticleSysBone  = Wingtip01 JetContrail
      ParticleSysBone  = Wingtip02 JetContrail
      ; afterburner
      ShowSubObject    = BurnerFX01 BurnerFX02
      ParticleSysBone  = Engine01 JetLenzflare
      ParticleSysBone  = Engine02 JetLenzflare
    End

    ConditionState = REALLYDAMAGED
      Model           = AVRaptor_D
      ; damage
      ParticleSysBone = Smoke01 JetSmoke
      ParticleSysBone = Engine01 JetEngineDamagedSmoke
    End
    
    ConditionState = REALLYDAMAGED JETEXHAUST
      Model           = AVRaptor_D
      ; damage
      ParticleSysBone = Smoke01 JetSmoke
      ParticleSysBone = Engine01 JetEngineDamagedSmoke
      ; exhaust
      ParticleSysBone = Wingtip01 JetContrail
      ParticleSysBone = Wingtip02 JetContrail
    End

    ConditionState = REALLYDAMAGED JETEXHAUST JETAFTERBURNER
      Model           = AVRaptor_D
      ; damage
      ParticleSysBone = Smoke01 JetSmoke
      ParticleSysBone = Engine01 JetEngineDamagedSmoke
      ; afterburner
      ShowSubObject   = BurnerFX01 BurnerFX02
      ParticleSysBone = Engine01 JetLenzflare
      ParticleSysBone = Engine02 JetLenzflare
      ; exhaust
      ParticleSysBone = Wingtip01 JetContrail
      ParticleSysBone = Wingtip02 JetContrail
    End

    ConditionState = RUBBLE
      Model           = AVRaptor_D1B
      HideSubObject   = None 
      ShowSubObject   = None
    End

    ConditionState = RUBBLE JETEXHAUST JETAFTERBURNER
      Model           = AVRaptor_D1B      
      HideSubObject   = None 
      ShowSubObject   = None
      ParticleSysBone = Engine01 JetExhaust
      ParticleSysBone = Engine02 JetExhaust
      ; exhaust
      ParticleSysBone = Wingtip01 JetContrail
      ParticleSysBone = Wingtip02 JetContrail
    End

  End

  ; ***DESIGN parameters ***
  DisplayName         = OBJECT:Raptor
  EditorSorting       = VEHICLE
  Side                = America
  TransportSlotCount  = 0
  VisionRange         = 200.0 
  ShroudClearingRange = 400

  Prerequisites
  End

  WeaponSet
    Conditions = None 
    Weapon   = PRIMARY RaptorJetMissileWeapon
  End

  ArmorSet
    Conditions = None
    Armor    = AirplaneArmor
    DamageFX = None
  End

  ArmorSet
    Conditions = PLAYER_UPGRADE
    Armor    = CountermeasuresAirplaneArmor
    DamageFX = None
  End


  BuildCost          = 1400
  BuildTime          = 20   
  ExperienceValue    = 50 50 100 150
  ExperienceRequired = 0 100 200 400
  IsTrainable        = Yes
  CrusherLevel       = 1
  CrushableLevel     = 2
  CommandSet         = AmericaJetRaptorCommandSet

  ; *** AUDIO Parameters ***
  VoiceSelect        = RaptorVoiceSelect
  VoiceMove          = RaptorVoiceMove
  VoiceAttack        = RaptorVoiceAttack
  VoiceAttackAir     = RaptorVoiceAttackAir
  VoiceGuard         = RaptorVoiceAirPatrol
  SoundAmbient       = RaptorAmbientLoop
  SoundAmbientRubble = NoSound
  UnitSpecificSounds
    VoiceCreate      = RaptorVoiceCreate
    SoundEject       = PilotSoundEject
    VoiceEject       = PilotVoiceEject
    Afterburner      = RaptorAfterburner
    VoiceLowFuel     = RaptorVoiceLowFuel
    VoiceGarrison    = RaptorVoiceMove
  End

  ; *** ENGINEERING Parameters ***
  RadarPriority = UNIT
  KindOf        = PRELOAD CAN_CAST_REFLECTIONS CAN_ATTACK SELECTABLE VEHICLE SCORE AIRCRAFT IGNORED_IN_GUI

  Body = ActiveBody ModuleTag_02
    MaxHealth     = 160.0
    InitialHealth = 160.0
  End

  Behavior = ArmorUpgrade ModuleTag_Armor01
    TriggeredBy = Upgrade_AmericaCountermeasures
  End

  Behavior = CountermeasuresBehavior ModuleTag_10
    TriggeredBy           = Upgrade_AmericaCountermeasures
    FlareTemplateName     = CountermeasureFlare
    FlareBoneBaseName     = Flare
    VolleySize            = 3
    VolleyArcAngle        = 90.0
    VolleyVelocityFactor  = 1.0
    DelayBetweenVolleys   = 1000
    NumberOfVolleys       = 3
    ReloadTime            = 0
    EvasionRate           = 30%
    ReactionLaunchLatency = 0
    MissileDecoyDelay     = 200
  End

  Behavior = ExperienceScalarUpgrade ModuleTag_04
    TriggeredBy = Upgrade_AmericaAdvancedTraining
    AddXPScalar = 1.0
  End

  Behavior = JetSlowDeathBehavior ModuleTag_05
    FXOnGroundDeath                = FX_JetOnGroundDeath
    OCLOnGroundDeath               = OCL_RaptorDeathFinalBlowUp
    DestructionDelay               = 99999999
    RollRate                       = 0.2
    RollRateDelta                  = 100%
    PitchRate                      = 0.0
    FallHowFast                    = 110.0%
    FXInitialDeath                 = FX_RaptorDeathInitial
    OCLInitialDeath                = OCL_RaptorDeathInitial
    DelaySecondaryFromInitialDeath = 500
    FXSecondary                    = FX_JetDeathSecondary
    OCLSecondary                   = OCL_RaptorDeathSecondary
    FXHitGround                    = FX_JetDeathHitGround
    OCLHitGround                   = OCL_RaptorDeathHitGround
    DelayFinalBlowUpFromHitGround  = 200
    FXFinalBlowUp                  = FX_JetDeathFinalBlowUp
    OCLFinalBlowUp                 = OCL_RaptorDeathFinalBlowUp
  End

  Behavior = EjectPilotDie ModuleTag_06
    ExemptStatus       = HIJACKED
    GroundCreationList = OCL_EjectPilotOnGround
    AirCreationList    = OCL_EjectPilotViaParachute
    VeterancyLevels    = ALL -REGULAR
  End
  
  Behavior = PhysicsBehavior ModuleTag_07
    Mass = 500.0
  End

  Behavior = TransitionDamageFX ModuleTag_08
    ReallyDamagedParticleSystem1 = Bone:Smoke RandomBone:Yes Psys:SmokeSmallContinuous01
    ReallyDamagedFXList1         = Loc: X:0 Y:0 Z:0 FXList:FX_MIGDamageTransition
  End

  Behavior = JetAIUpdate ModuleTag_09
    OutOfAmmoDamagePerSecond = 10%                                  
    TakeoffDistForMaxLift    = 0%
    TakeoffPause             = 500
    MinHeight                = 5
    ParkingOffset            = 3
    ReturnToBaseIdleTime     = 10000
  End
  Locomotor = SET_NORMAL RaptorJetLocomotor
  Locomotor = SET_TAXIING BasicJetTaxiLocomotor

  Behavior = FlammableUpdate ModuleTag_21
    AflameDuration     = 5000
    AflameDamageAmount = 3
    AflameDamageDelay  = 500
  End

;-----------------------------------------------
;---Nexus Stuff

  Behavior = MobMemberSlavedUpdate Module_Mob
    MustCatchUpRadius     = 40
    NoNeedToCatchUpRadius = 15
    Squirrelliness        = 0.05
    CatchUpCrisisBailTime = 30
  End

  Behavior = FireWeaponWhenDeadBehavior Module_Reset
    DeathWeapon  = ResetRaptorNexusWeapon
    DeathTypes   = ALL
    StartsActive = Yes
  End

;------------------------------------------------
  Geometry            = Box
  GeometryIsSmall     = Yes
  GeometryMajorRadius = 14.0
  GeometryMinorRadius = 7.0
  GeometryHeight      = 5.0
  Shadow              = SHADOW_VOLUME
  ShadowSizeX         = 89

End

;----------------------------------------------------------------------------
;This object frees the upgrade after 5 hits from the ResetRaptorNexusWeapon

Object RaptorNexusReset

  Draw = W3DModelDraw ModuleTag_01
 
    DefaultConditionState
      Model = None
    End
  End

  ; ***DESIGN parameters ***
  Side               = America
  EditorSorting      = VEHICLE
  TransportSlotCount = 0

  ArmorSet
    Conditions = None
    Armor      = ResetRaptorNexusArmor
    DamageFX   = None
  End

  ; *** ENGINEERING Parameters ***
  RadarPriority = LOCAL_UNIT_ONLY
  KindOf =  VEHICLE NO_SELECT UNATTACKABLE

  Body = ActiveBody ModuleTag_02
    MaxHealth     = 250.0
    InitialHealth = 250.0
  End

  Behavior = AIUpdateInterface ModuleTag_03
  End
  Locomotor = SET_NORMAL None

  Behavior = DestroyDie ModuleTag_08
    DeathTypes = ALL
  End

  Behavior = UpgradeDie  ModuleTag_98
    DeathTypes      = ALL
    UpgradeToRemove = Upgrade_AmericaRaptorNexus ModuleTag_99
  End

  Geometry = CYLINDER
  GeometryMajorRadius = 1.0
  GeometryMinorRadius = 1.0
  GeometryHeight      = 1.0
  GeometryIsSmall     = Yes

End

;--------------------------------------

;--Upgrade.ini--

Upgrade Upgrade_AmericaRaptorNexus
  DisplayName = UPGRADE:RaptorNexus 
  Type        = OBJECT 
  BuildTime   = 15 
  BuildCost   = 1500 
  ButtonImage = SACRaptor 
End

;-------------------------------------

;--CommandButton.ini--

CommandButton Command_AmericaRaptorNexus 
  Command          = OBJECT_UPGRADE 
  Upgrade          = Upgrade_AmericaRaptorNexus 
  Options          = NOT_QUEUEABLE
  TextLabel        = CONTROLBAR:RaptorNexus 
  ButtonImage      = SACRaptor 
  ButtonBorderType = ACTION 
  DescriptLabel    = CONTROLBAR:ToolTipRaptorNexus 
End

;-------------------------------------

;--CommandSet.ini--

CommandSet AmericaCommandCenterCommandSet
  1 = Command_ConstructAmericaDozer
  2 = Command_SpectreGunship
  3 = Command_AmericaRaptorNexus
  4 = Command_LeafletDrop
  5 = Command_A10ThunderboltMissileStrike
  6 = Command_Paradrop
  7 = Command_SpyDrone
  8 = Command_EmergencyRepair
  9 = Command_DaisyCutter
 10 = Command_SpySatelliteScan 
 13 = Command_SetRallyPoint
 14 = Command_Sell
End

;-------------------------------------

;--ObjectCreationList.ini--

ObjectCreationList OCL_AmericaRaptorNexus 
  CreateObject 
    Offset                = X:0 Y:0 Z:10 
    ObjectNames           = AmericaRaptorNexus
    IgnorePrimaryObstacle = Yes 
    Disposition           = LIKE_EXISTING 
    Count                 = 1 
    RequiresLivePlayer    = No 
  End
  CreateObject
    Offset                = X:0 Y:0 Z:0
    ObjectNames           = RaptorNexusReset
    IgnorePrimaryObstacle = Yes
    Disposition           = LIKE_EXISTING
    Count                 = 1
    RequiresLivePlayer    = No
  End
End

;-------------------------------------

;--Weapon.ini--

Weapon ResetRaptorNexusWeapon
  PrimaryDamage       = 50.0
  PrimaryDamageRadius = 500.0
  DamageType          = PENALTY 
  DeathType           = EXTRA_2 
  WeaponSpeed         = 99999.0 
  AttackRange         = 9999.0 
  ProjectileObject    = NONE  
  RadiusDamageAffects = ALLIES 
  DelayBetweenShots   = 0 
  ClipSize            = 1 
  ClipReloadTime      = 0 
  AutoReloadsClip     = Yes 
End

;-------------------------------------

;--Armor.ini--

Armor ResetRaptorNexusArmor
  Armor = DEFAULT         0%
  Armor = PENALTY         100%
End

;--Add this line to all the armorsets from factionunits--
Armor = PENALTY           0%


Greetz
Panem et kirkinses