Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
Offline discripter  
#1 Posted : Sunday, January 3, 2021 2:23:57 PM(UTC)
discripter
Private
Joined: 1/3/2021(UTC)
Posts: 6

How to make the PointDefenseLaserUpdate an upgradable option for a specific unit?

Quote:
Behavior = PointDefenseLaserUpdate ModuleTag_28
;TriggeredBy = Upgrade_AmericaAirplaneArmor <--- This is doesn`t work
WeaponTemplate = AirF_RaptorPointDefenseLaser
PrimaryTargetTypes = BALLISTIC_MISSILE SMALL_MISSILE
ScanRate = 10
ScanRange = 200.0
PredictTargetVelocityFactor = 2.0
End
Sponsor
Offline Annihilationzh  
#2 Posted : Monday, January 4, 2021 12:03:07 AM(UTC)
Annihilationzh
General
Joined: 8/2/2008(UTC)
Posts: 1,779
United Kingdom

Thanks: 26 times
Was thanked: 475 time(s) in 331 post(s)
Code:
PointDefenseLaserUpdate
	WeaponTemplate = [entry from Weapon.INI]
    	PrimaryTargetTypes = [KindOf]
    	SecondaryTargetTypes = [KindOf]
    	ScanRate = [integer, millisecond. Limit 2000]
    	ScanRange = [integer]
    	PredictTargetVelocityFactor = [real number]
End

This is from a module list. It tells you everything you can do with a module and there's no upgrade option.

There are workarounds, however. Drones and overlord addons can be triggered with upgrades and they can both have lasers. And those objects don't have to be visible either, so there'll be no signs of what's actually going on behind the scenes.

Edited by user Monday, January 4, 2021 12:05:11 AM(UTC)  | Reason: Not specified

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.
Offline discripter  
#3 Posted : Monday, January 4, 2021 3:21:34 PM(UTC)
discripter
Private
Joined: 1/3/2021(UTC)
Posts: 6

Originally Posted by: Annihilationzh Go to Quoted Post

This is from a module list. It tells you everything you can do with a module and there's no upgrade option.


yes.
And That`s why I am writing this topic...

Originally Posted by: Annihilationzh Go to Quoted Post

There are workarounds, however. Drones and overlord addons can be triggered with upgrades and they can both have lasers. And those objects don't have to be visible either, so there'll be no signs of what's actually going on behind the scenes.


I've already tried to implement this feature within the drone module.

Quote:


Object AmericaJetRaptor

...............


Behavior = HelixContain ModuleTag_29
AllowInsideKindOf = PORTABLE_STRUCTURE
End


Behavior = ObjectCreationUpgrade ModuleTag_LPD
TriggeredBy = Upgrade_AmericaAirplaneArmor
UpgradeObject = OCL_RaptorLPDDrone
End

...............
End

; -----------------------------------------------------------------------------
ObjectCreationList OCL_RaptorLPDDrone
CreateObject
Offset = X:0 Y:0 Z:0
ObjectNames = RaptorLPDDrone
IgnorePrimaryObstacle = Yes
ContainInsideSourceObject = Yes
Count = 1
RequiresLivePlayer = Yes
End
End

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

Object RaptorLPDDrone

Draw = W3DDependencyModelDraw ModuleTag_01
DefaultConditionState
Model = None
End
End

Side = Generic
EditorSorting = SYSTEM
RadarPriority = NOT_ON_RADAR
KindOf = PRELOAD PORTABLE_STRUCTURE CAN_ATTACK CLICK_THROUGH IGNORED_IN_GUI

Body = HighlanderBody ModuleTag_02
MaxHealth = 1000
InitialHealth = 1000
End

ArmorSet
Conditions = None
Armor = AirRadarDroneArmor
DamageFX = None
End

Behavior = AIUpdateInterface ModuleTag_03
End

Locomotor = SET_NORMAL RaptorLPDDroneLocomotor

Behavior = PhysicsBehavior ModuleTag_04
Mass = 50.0
KillWhenRestingOnGround = Yes
AllowBouncing = No
End

Behavior = PointDefenseLaserUpdate ModuleTag_Laser_One
WeaponTemplate = Raptor_PointDefenseLaser
PrimaryTargetTypes = SMALL_MISSILE BALLISTIC_MISSILE
ScanRate = 4
ScanRange = 200.0
PredictTargetVelocityFactor = 1.0
End

Behavior = PointDefenseLaserUpdate ModuleTag_Laser_Three
WeaponTemplate = Raptor_PointDefenseLaser
PrimaryTargetTypes = SMALL_MISSILE BALLISTIC_MISSILE
ScanRate = 14
ScanRange = 100.0
PredictTargetVelocityFactor = 1.0
End


Behavior = SlavedUpdate ModuleTag_07
GuardMaxRange = 1 ;How far away from master I'm allowed when master is idle (doesn't wander)
GuardWanderRange = 1 ;How far away I'm allowed to wander from master while guarding.
AttackRange = 1 ;How far away from master I'm allowed when master is attacking a target.
AttackWanderRange = 1 ;How far I'm allowed to wander from target.
ScoutRange = 1 ;How far away from master I'm allowed when master is moving.
ScoutWanderRange = 1 ;How far I'm allowed to wander from scout point.
StayOnSameLayerAsMaster = Yes
End

Behavior = DestroyDie ModuleTag_08
DeathTypes = ALL
End



Geometry = CYLINDER
GeometryMajorRadius = 5.0
GeometryMinorRadius = 5.0
GeometryHeight = 5.0
GeometryIsSmall = No
End



But came across another problem.
The Apache Laser Point Defence module (invisible drone) conflicts with the machine gun turret.
And It also conflicts with the Chinook transport module.

Perhaps you could advise me, how to implement the LaserPointDefence object so that it does not conflict with other modules of helicopters and aircrafts?
Offline Annihilationzh  
#4 Posted : Tuesday, January 5, 2021 5:08:09 AM(UTC)
Annihilationzh
General
Joined: 8/2/2008(UTC)
Posts: 1,779
United Kingdom

Thanks: 26 times
Was thanked: 475 time(s) in 331 post(s)
Your drone is a strange hybrid between an overlord addon and a drone. The OCL puts it inside the raptor, which the HelixContain will then take. The HelixContain has no mention of slots either, which is concerning.

This hybrid could cause odd effects and make debugging a pain. Your OCL needs to be a drone's OCL and the HelixContain needs removing too.

Quote:
The Apache Laser Point Defence module (invisible drone) conflicts with the machine gun turret.

I can't think of a reason why that would happen. The comanche's cannon is just a weapon governed by the AI module. Addons and drones are entirely unrelated.

I would say something else has likely broken it.

Quote:
It also conflicts with the Chinook transport module.

You can't have two contain modules. The chinook supply collecting may also clash with a HelixContain. Better to use a drone.
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.
Offline discripter  
#5 Posted : Wednesday, January 6, 2021 2:42:22 PM(UTC)
discripter
Private
Joined: 1/3/2021(UTC)
Posts: 6

Originally Posted by: Annihilationzh Go to Quoted Post
Better to use a drone.


Could you please give me a documentation link that describes the drone module? Or give some examples.
I need the laser point defense object (triggered by upgrade), placed inside a Chinook, Apache, etc, and not conflict with the transport module, etc...

Edited by user Thursday, January 7, 2021 9:39:59 AM(UTC)  | Reason: Not specified

Offline haggis  
#6 Posted : Thursday, January 7, 2021 2:01:30 AM(UTC)
haggis
Private
Joined: 12/9/2020(UTC)
Posts: 37

Thanks: 20 times
Originally Posted by: discripter Go to Quoted Post

;TriggeredBy = Upgrade_AmericaAirplaneArmor <--- This is doesn`t work


Do note that the semicolon (;) marks a comment which will make whatever follows it in the same line not work. This is known as "commenting out" in programming, when you want to delete something but keep the option of re-adding it later quickly.


Offline Annihilationzh  
#7 Posted : Thursday, January 7, 2021 4:21:27 AM(UTC)
Annihilationzh
General
Joined: 8/2/2008(UTC)
Posts: 1,779
United Kingdom

Thanks: 26 times
Was thanked: 475 time(s) in 331 post(s)
Quote:
Could you please give me a documentation link that describes the drone module?

There isn't one. Unless you mean the ModuleList:

Code:
SlavedUpdate
	GuardMaxRange = [integer]
	GuardWanderRange = [integer]
	AttackRange = [integer]
	AttackWanderRange = [integer]
	ScoutRange = [integer]
	ScoutWanderRange = [integer]
	StayOnSameLayerAsMaster = [Yes/No]
	DistToTargetToGrantRangeBonus = [integer] 
	RepairRange = [integer]
	RepairMinAltitude = [real number]
	RepairMaxAltitude = [real number]
	RepairRatePerSecond = [integer]
	RepairWhenBelowHealth% = [percent]
	RepairMinReadyTime = [integer, milliseconds]
	RepairMaxReadyTime  = [integer, milliseconds]
	RepairMinWeldTime = [integer, milliseconds]
	RepairMaxWeldTime = [integer, milliseconds]
	RepairWeldingSys = [entry from ParticleSystem.INI]
	RepairWeldingFXBone = [bone name]
End


Here's what you do:

Make a clone of the hellfire drone. All you have to do is copy the whole thing, paste it at the bottom of the file, and rename it. Then create an OCL, again cloning the hellfire's OCL and renaming.

Then give your clone a PDL and make sure it works in-game. Then customize it and test again. Then when you've done everything else, make it invisible. If you make it invisible too early, and something goes wrong, you may never know what's actually broken.
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.
Offline discripter  
#8 Posted : Thursday, January 7, 2021 9:42:21 AM(UTC)
discripter
Private
Joined: 1/3/2021(UTC)
Posts: 6

Originally Posted by: haggis Go to Quoted Post
Originally Posted by: discripter Go to Quoted Post

;TriggeredBy = Upgrade_AmericaAirplaneArmor <--- This is doesn`t work


Do note that the semicolon (;) marks a comment which will make whatever follows it in the same line not work. This is known as "commenting out" in programming, when you want to delete something but keep the option of re-adding it later quickly.


Yep, I know that :)

I am familiar with programming and know about 5 languages.
I only showed my question.
I want to make laser countermeasures after the upgrade.

Offline discripter  
#9 Posted : Thursday, January 7, 2021 10:07:52 AM(UTC)
discripter
Private
Joined: 1/3/2021(UTC)
Posts: 6

Originally Posted by: Annihilationzh Go to Quoted Post
Make a clone of the hellfire drone. All you have to do is copy the whole thing, paste it at the bottom of the file, and rename it. Then create an OCL, again cloning the hellfire's OCL and renaming.

Then give your clone a PDL and make sure it works in-game. Then customize it and test again. Then when you've done everything else, make it invisible. If you make it invisible too early, and something goes wrong, you may never know what's actually broken.



Thanks for the advice.

I've already done something like you advised:

Code:

ObjectCreationList OCL_LPDDrone
  CreateObject
    Offset = X:0 Y:0 Z:0
    ObjectNames       = LPDDrone
    IgnorePrimaryObstacle = Yes
    Disposition = LIKE_EXISTING
    Count = 1
    RequiresLivePlayer = Yes
  End
End

Object LPDDrone
  Side = Generic
  EditorSorting = SYSTEM
  RadarPriority = NOT_ON_RADAR
  KindOf = CLICK_THROUGH DRONE IGNORED_IN_GUI CAN_ATTACK PRELOAD NO_COLLIDE INERT

  Body = HighlanderBody ModuleTag_02
    MaxHealth = 100
    InitialHealth = 100
  End

  ArmorSet
    Conditions = None
    Armor = AirRadarDroneArmor
    DamageFX = None
  End

  Behavior = AIUpdateInterface ModuleTag_03
  End

  Locomotor = SET_NORMAL LPDDroneLocomotor

  Behavior = PhysicsBehavior ModuleTag_04
    Mass = 50.0
    KillWhenRestingOnGround = Yes
    AllowBouncing = No
  End

  Behavior = PointDefenseLaserUpdate ModuleTag_Laser_One
    WeaponTemplate        = Raptor_PointDefenseLaser
    PrimaryTargetTypes    = SMALL_MISSILE BALLISTIC_MISSILE 
    ScanRate              = 4
    ScanRange             = 200.0
    PredictTargetVelocityFactor = 1.0
  End

  Behavior = PointDefenseLaserUpdate ModuleTag_Laser_Three
    WeaponTemplate        = Raptor_PointDefenseLaser
    PrimaryTargetTypes    = SMALL_MISSILE BALLISTIC_MISSILE 
    ScanRate              = 14
    ScanRange             = 100.0
    PredictTargetVelocityFactor = 1.0
  End

  Behavior = SlavedUpdate ModuleTag_07
    GuardMaxRange = 1 ;How far away from master I'm allowed when master is idle (doesn't wander)
    GuardWanderRange = 1 ;How far away I'm allowed to wander from master while guarding.
    AttackRange = 1 ;How far away from master I'm allowed when master is attacking a target.
    AttackWanderRange = 1 ;How far I'm allowed to wander from target.
    ScoutRange = 1 ;How far away from master I'm allowed when master is moving.
    ScoutWanderRange = 1 ;How far I'm allowed to wander from scout point.
    StayOnSameLayerAsMaster = Yes
  End

  Behavior = DestroyDie ModuleTag_08
    DeathTypes = ALL
  End

  Geometry            = CYLINDER
  GeometryMajorRadius = 5.0
  GeometryMinorRadius = 5.0
  GeometryHeight      = 5.0
  GeometryIsSmall     = No

End

Locomotor LPDDroneLocomotor
  Surfaces = AIR
  Speed = 450                ; in dist/sec
  MinSpeed = 0             ; in dist/sec
  TurnRate = 999             ; in degrees/sec
  Acceleration = 450         ; in dist/(sec^2)
  Lift = 120                 ; in dist/(sec^2)
  Braking = 999              ; in dist/(sec^2)
  MinTurnSpeed = 0          ; in dist/sec
  PreferredHeight = 140
  AllowAirborneMotiveForce = Yes
  ZAxisBehavior = RELATIVE_TO_HIGHEST_LAYER
  Appearance = HOVER
  Apply2DFrictionWhenAirborne = Yes
  AirborneTargetingHeight = 20
  CirclingRadius = 1
End


And inside the Unit:

Quote:
Behavior = ObjectCreationUpgrade ModuleTag_LPD
TriggeredBy = Upgrade_AmericaAirplaneArmor
UpgradeObject = OCL_LPDDrone
End




I received an invisible drone flying randomly around the helicopter.
But I would like laser particle shooting directly from the bottom of the helicopter model.
how to do that?

Edited by user Thursday, January 7, 2021 10:09:36 AM(UTC)  | Reason: Not specified

Offline Annihilationzh  
#10 Posted : Thursday, January 7, 2021 5:11:17 PM(UTC)
Annihilationzh
General
Joined: 8/2/2008(UTC)
Posts: 1,779
United Kingdom

Thanks: 26 times
Was thanked: 475 time(s) in 331 post(s)
Quote:
I want to make laser countermeasures after the upgrade.

Literally? Making countermeasures with a laser attack should actually work lol.

Quote:
I received an invisible drone flying randomly around the helicopter. But I would like laser particle shooting directly from the bottom of the helicopter model.
how to do that?
Well *censored*. My memory is failing me. I thought the slavedupdate with a range of 1 would keep it from wandering. Sorry about that.

You can mess around with the slaved modules. There is another one to try:
Code:
MobMemberSlavedUpdate
	MustCatchUpRadius = [integer]
	NoNeedToCatchUpRadius = [integer]
	Squirrelliness = [real number]
	CatchUpCrisisBailTime = [integer]
End


Also PhysicsBehaviour. All it will do is cause collision, which isn't something you want. I'm 90% sure you can remove it - with the caveat that this might break the locomotor (I can't remember).
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.
Offline discripter  
#11 Posted : Friday, January 8, 2021 12:28:18 PM(UTC)
discripter
Private
Joined: 1/3/2021(UTC)
Posts: 6

Originally Posted by: Annihilationzh Go to Quoted Post

You can mess around with the slaved modules. There is another one to try:
Code:
MobMemberSlavedUpdate
	MustCatchUpRadius = [integer]
	NoNeedToCatchUpRadius = [integer]
	Squirrelliness = [real number]
	CatchUpCrisisBailTime = [integer]
End


What does that param`s mean?
What should I write there?
Offline Annihilationzh  
#12 Posted : Saturday, January 9, 2021 3:26:06 AM(UTC)
Annihilationzh
General
Joined: 8/2/2008(UTC)
Posts: 1,779
United Kingdom

Thanks: 26 times
Was thanked: 475 time(s) in 331 post(s)
It's the angry mob slaves. The parameters tell them to rush if they don't stay close to the center, and gives them a timer to kill them if they fail. I don't know if it will work, it's just another potential option that might keep the drone close.

This is the angry mob code:
Code:
  Behavior = MobMemberSlavedUpdate ModuleTag_04
    MustCatchUpRadius   = 40
    NoNeedToCatchUpRadius = 15
    Squirrelliness = 0.05 
    CatchUpCrisisBailTime = 30; this is in calls to this update, not in frames
  End


Another alternative is messing around with laser countermeasures and seeing if you can get something visually satisfying.
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.
Offline beng  
#13 Posted : Sunday, November 7, 2021 8:39:00 PM(UTC)
beng
Captain
Joined: 4/8/2009(UTC)
Posts: 57
Location: In a house

Thanks: 5 times
Was thanked: 5 time(s) in 3 post(s)
In my Laser Demo Nuke mode the Lazer general's commanches have a similar ability. What it is is an upgrade that loads a sniper inside them. This sniper can fire out of them and can snipe incoming missiles. It is not using overlord, just normal transport contain, like for humvees.
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.