Jump to content


Patriot Mechanics


  • Please log in to reply
11 replies to this topic

#1 Guest_Razer_*

Guest_Razer_*
  • Guests

Posted 09 August 2006 - 06:51 PM

It's a problem I had before, but I still can't solve it. The Patriot Relay system is one of the most useful systems in the game, but I'm struggling to mimic it in other units. My plan is to create a Patriot Relay Unit, which will allow patriots to fire further out of their range as if they were assisting another Patriot. This would be in the form of a stealthed structure that looks like a crate and would allow the Patriots greater range without revealing themselves. If successful I would then make it a unit, similar to a Chinese Listening Post.

Creating a "Structure" which is stealthed is not hard. Neither is adding it to a force (in my case the Super Weapon General). However, I cannot identify where in the object file I must place a tag or similar that allows the Patriots to recognise that this is an assisting unit.

Any help with this? Thanks.

--Razer

#2 Guest_Razer_*

Guest_Razer_*
  • Guests

Posted 10 August 2006 - 05:11 PM

I've got the code from my initial Patriot Relay, in battle this meets the minor criteria...

= It is stealthed;
= It looks as if it's a crate;
= It is created to the correct cost and speed;
= It also detects stealth because I forgot to remove that.

However it isn't doing it's main function, to extend the range of the Patriots! Despite my efforts the "crate" simply does as a crate does. Nothing...

Object EU_PatriotAssist

 ; *** ART Parameters ***
  SelectPortrait		 = SAMicroPat_L
  ButtonImage			= SAMicroPat
  Draw = W3DModelDraw ModuleTag_01

	DefaultConditionState
	  Model = PMCrates01
	End
  End

  PlacementViewAngle = -45

 ; ***DESIGN parameters ***
  DisplayName	   = OBJECT:SupW_PatriotBattery
  Side			  = AmericaSuperWeaponGeneral
  EditorSorting	 = STRUCTURE
  Prerequisites
	Object = SupW_AmericaPatriotBattery
  End
  BuildCost		= 100
  BuildTime		= 10.0		  ; in seconds
  EnergyProduction = 0
  WeaponSet
	Conditions		  = None 
	Weapon			  = PRIMARY	 SupW_PatriotMissileAssistWeapon
	AutoChooseSources   = PRIMARY	 NONE  
	PreferredAgainst	= PRIMARY	 BALLISTIC_MISSILE AIRCRAFT
	ShareWeaponReloadTime = Yes
  End
  VisionRange	= 360.0		  ; Shroud clearing distance AND targeting range
  ShroudClearingRange = 360
  ArmorSet
	Conditions	  = None
	Armor		   = BaseDefenseArmor
	DamageFX		= StructureDamageFXNoShake
  End
  CommandSet		= SupW_AmericaPatriotBatteryCommandSet
  ExperienceValue	 = 20 20 20 20 ; Experience point value at each level
 ; *** AUDIO Parameters ***
  VoiceSelect = NoSound
  SoundOnDamaged		= BuildingDamagedStateLight
  SoundOnReallyDamaged  = BuildingDestroy

  UnitSpecificSounds
	UnderConstruction	 = UnderConstructionLoop
  End

  UnitSpecificSounds
 ; These have the syntax of SomeNameSomewhereInCode = SomeNameSomewhereInLookupINIs
	TurretMoveStart = NoSound
	TurretMoveLoop = NoSound;These aren't playing properly, will revisit (mp) TurretMoveLoopLoud
  End

 ; *** ENGINEERING Parameters ***
  RadarPriority   = STRUCTURE
  KindOf		  = PRELOAD STRUCTURE SELECTABLE CAN_ATTACK ATTACK_NEEDS_LINE_OF_SIGHT IMMOBILE SCORE FS_TECHNOLOGY POWERED FS_BASE_DEFENSE IMMUNE_TO_CAPTURE EMP_HARDENED
  Body			= StructureBody ModuleTag_04
	MaxHealth	 = 250.0
	InitialHealth = 250.0

	SubdualDamageCap = 250
	SubdualDamageHealRate = 1000
	SubdualDamageHealAmount = 10
  End
 
  Behavior = StealthDetectorUpdate ModuleTag_05
	DetectionRate	 = 500  ; how often to rescan for stealthed things in my sight (msec)
	DetectionRange   =  200;Dustin, enable this for independant balancing!
	CanDetectWhileGarrisoned  = No;Garrisoned means being in a structure that you units can shoot out of.
	CanDetectWhileContained   = No;Contained means being in a transport or tunnel network.
  End

  Behavior = BaseRegenerateUpdate ModuleTag_06
   ;No data
  End 

  Behavior = AssistedTargetingUpdate ModuleTag_08
	AssistingClipSize = 0					  ; How many shots to make when asked by someone of my kind who has a RequestAssistRange weapon
	AssistingWeaponSlot = PRIMARY			  ; And the weapon to use.  Should have huge range and no natural clip.
	LaserFromAssisted = PatriotBinaryDataStream; Stream to draw from the requestor to me
	LaserToTarget = PatriotBinaryDataStream	; Stream to draw from me to the target
  End

  Behavior = DestroyDie ModuleTag_09
   ;nothing
  End
  Behavior			 = FXListDie ModuleTag_10
	DeathFX	   = FX_StructureTinyDeath
  End

  Behavior = FlammableUpdate ModuleTag_12
	AflameDuration = 5000		; If I catch fire, I'll burn for this long...
	AflameDamageAmount = 5	  ; taking this much damage...
	AflameDamageDelay = 500	  ; this often.
  End

  Behavior = ObjectCreationUpgrade ModuleTag_13
	UpgradeObject = OCL_AmericanBattleDrone
	TriggeredBy   = Upgrade_AmericaBattleDrone
	ConflictsWith = SupW_Upgrade_AmericaPointDefenseDrone Upgrade_AmericaHellfireDrone
  End
  Behavior = ObjectCreationUpgrade ModuleTag_14
	UpgradeObject = SupW_OCL_AmericanPointDefenseDrone
	TriggeredBy   = SupW_Upgrade_AmericaPointDefenseDrone
	ConflictsWith = Upgrade_AmericaBattleDrone Upgrade_AmericaHellfireDrone
  End 
  Behavior = ObjectCreationUpgrade ModuleTag_15
	UpgradeObject = OCL_AmericanHellfireDrone
	TriggeredBy   = Upgrade_AmericaHellfireDrone
	ConflictsWith = Upgrade_AmericaBattleDrone SupW_Upgrade_AmericaPointDefenseDrone
  End 
  Behavior = ProductionUpdate ModuleTag_16
	MaxQueueEntries = 1; So you can't build multiple upgrades in the same frame
  End

  Behavior = StealthUpdate ModuleTag_17
	StealthDelay				= 0		  ; msec
	FriendlyOpacityMin		  = 30.0%
	FriendlyOpacityMax		  = 80.0%
	PulseFrequency			  = 500  ; msec
	InnateStealth			   = Yes
	OrderIdleEnemiesToAttackMeUponReveal  = Yes
  End

  Behavior = TransitionDamageFX ModuleTag_20
   ;-------------DESIGNED FOR TINY SIZED FACTION BUILDING TRANSITIONS-------------------
	DamagedParticleSystem1	   = Bone:None RandomBone:No PSys:StructureTransitionTinySmoke
   ;---------------------------------------------------------------------------------------
	ReallyDamagedParticleSystem1 = Bone:None RandomBone:No PSys:StructureTransitionTinySmoke
	ReallyDamagedParticleSystem2 = Bone:None RandomBone:No PSys:StructureTransitionTinyExplosion
	ReallyDamagedParticleSystem3 = Bone:None RandomBone:No PSys:StructureTransitionTinyShockwave
  End

  Geometry			= CYLINDER
  GeometryMajorRadius = 12.0
  GeometryMinorRadius = 1.0
  GeometryHeight	  = 14.0
  GeometryIsSmall	 = No
  Shadow		  = SHADOW_VOLUME
  BuildCompletion = PLACED_BY_PLAYER

End

I'm sure the key here is in the note "How many shots to make when asked by someone of my kind who has a RequestAssistRange weapon" in ModuleTag_08. But how to define "my kind"?

Anyone who spots any major holes, thanks.

--Razer

#3 stack111

stack111

    born with rags, on the road to riches

  • Hosted
  • 464 posts
  • Location:IL USA
  • Projects:Zero Hour Mod Conquer or Die

Posted 14 August 2006 - 05:49 PM

take a look at the airforce general and compare the engineering and design parameters
Posted Image
"The great questions of the day will not be decided by speeches and resolutions but by blood and iron" Otto Von Bismarck

#4 beng

beng
  • Members
  • 93 posts

Posted 24 June 2008 - 04:04 AM

It cannot be done. Assist targeting only works for objects of the same type. You cannot have a different object call an assist from a patriot battery. Only another patriot battery, and not any patriot battery belonging to another american gheneral, but the exact same object type, can call an assist.

A quote from Weapon PatriotMissileWeapon in Weapon.ini:

RequestAssistRange		  = 200   ; when I fire, my object will look around for things of
 ; his type and tell their AssistedTargetingModules to fire a clip if they are free to do so.

Edited by beng, 24 June 2008 - 04:05 AM.


#5 beng

beng
  • Members
  • 93 posts

Posted 24 June 2008 - 07:24 PM

I just thought of a way to do something similar to what you want:

This is similar to this map.ini and test map:
http://www.cncmaps.c...h...t&p=1986838
Where crates create a special object that can be used to call in a carpet bomber.

For your patriot thing, instead of the special object having the OCL special power, it just has vision and a command set with a command button to activate the special power. The special power modules (FireWeaponPower) are given to your patriot battery objects.

In short:

Give the patriots the battleship fire weapon power.

Make the crate create a special object (as per the 2 crusaders crate)

This special opbject has the shortcut control button for the fire weapon power, so the player can use it to call for fire from the patriot batteries.


Edit:

And here is yet another method: Make a new special power based on the superweapon scud storm.

Give the patriot battery objects the OCL special power module for this new special power. Have it call an OCL that fires the long range weapon slot (see the scud storm OCL).

Give the shortcut button for this special power to your crate object. In essence it works similar to the battleship method, just using a different module plus an OCL to do it.

Edited by beng, 24 June 2008 - 07:55 PM.


#6 Guest_migpilot_*

Guest_migpilot_*
  • Guests

Posted 30 October 2008 - 09:35 PM

I just thought of a way to do something similar to what you want:

This is similar to this map.ini and test map:
http://www.cncmaps.c...h...t&p=1986838
Where crates create a special object that can be used to call in a carpet bomber.

For your patriot thing, instead of the special object having the OCL special power, it just has vision and a command set with a command button to activate the special power. The special power modules (FireWeaponPower) are given to your patriot battery objects.

In short:

Give the patriots the battleship fire weapon power.

Make the crate create a special object (as per the 2 crusaders crate)

This special opbject has the shortcut control button for the fire weapon power, so the player can use it to call for fire from the patriot batteries.


Edit:

And here is yet another method: Make a new special power based on the superweapon scud storm.

Give the patriot battery objects the OCL special power module for this new special power. Have it call an OCL that fires the long range weapon slot (see the scud storm OCL).

Give the shortcut button for this special power to your crate object. In essence it works similar to the battleship method, just using a different module plus an OCL to do it.



#7 mig pilot

mig pilot
  • Members
  • 17 posts

Posted 30 October 2008 - 09:41 PM

Sorry about the previous post. Anyway,what if you took a patriot, used an upgrade sot to stealth it and change it to target with an avenger laser while it stayed stealth? It would still be the patroit, but it wouldn't kill anything, stayed stealth and relayed targets all while still being a patroit. :p

#8 beng

beng
  • Members
  • 93 posts

Posted 01 November 2008 - 04:54 AM

Yes that would work.

#9 mig pilot

mig pilot
  • Members
  • 17 posts

Posted 02 November 2008 - 12:27 AM

and i don't know anything about modding... :p

By the by, are you the beng who made the laser mod? (Beng's Laser mod)

Edited by mig pilot, 02 November 2008 - 12:28 AM.


#10 BlitzKrieg

BlitzKrieg
  • Members
  • 55 posts
  • Projects:C&C Generals Destructive Hour; YR: Riot

Posted 15 January 2009 - 12:49 AM

I'm new in this area of modding, but could you just give the "crate" the same kindof tags as the patriot or does it have to be the same unit/structure?

#11 Guest_Guest_*

Guest_Guest_*
  • Guests

Posted 02 May 2009 - 05:58 PM

I tried to do something very similar to this to make SAM sites. I planned to use a huge radar dome object which has several invisible objects inside it(like overlord tank having structures in it) which are relying positions of enemy aircraft to the missile batteries. So that would surely be a SAM site. If you destroy the radar dome, the missile batteries wouldn't work. Also with tihs way, you had to place the patriot batteries close to your radar dome objects so that you wouldn't place those patriot units near your enemy's base. But i couldn't do it. Anyway, i don't understand one thing in Beng's solution. In SCUD storm or Battleship, the targets are fields of areas, not something spesific like an aircraft. So how woluld it be done with Beng's solution not to attack ground but to attack a spesific target.

#12 beng

beng
  • Members
  • 93 posts

Posted 11 August 2009 - 12:35 PM

> By the by, are you the beng who made the laser mod? (Beng's Laser mod)

Yes, the latest version is laser demo nuke mod version 3:
http://www.cncmaps.c...mp;showfile=819

> I'm new in this area of modding, but could you just give the "crate" the same kindof tags as the patriot or does it have to be the same unit/structure?

No, it has to be the exact same object, not same kindof. For example superweapon general patriots and air force general patriots are exactly the same except the name is different, so they will not assist each other.

I tried to do something very similar to this to make SAM sites. I planned to use a huge radar dome object which has several invisible objects inside it(like overlord tank having structures in it) which are relying positions of enemy aircraft to the missile batteries. So that would surely be a SAM site. If you destroy the radar dome, the missile batteries wouldn't work. Also with tihs way, you had to place the patriot batteries close to your radar dome objects so that you wouldn't place those patriot units near your enemy's base. But i couldn't do it. Anyway, i don't understand one thing in Beng's solution. In SCUD storm or Battleship, the targets are fields of areas, not something spesific like an aircraft. So how woluld it be done with Beng's solution not to attack ground but to attack a spesific target.


Just change the command button options to require a target enemy object instead of NEED_TARGET_POS. Download my laser demo nuke mod and try Laser burton's strategy center bombardment button. It is a modified battleship power that fires the strategy center gun at any object on the map that burton tells it to target, including flying helicopters.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users