:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::

Do you want to advertise at Project Perfect Mod. Find out how to do it HERE.

The time now is Mon Jun 01, 2020 12:02 am
All times are UTC + 0
 Forum index » Modding Central » Red Alert 2 Editing Forum » Ares (Unofficial Forum)
Help needed with Custom Missiles
Moderators: Ares Support Team at PPM, Global Moderators, Red Alert 2 Moderators
Post new topic   Reply to topic Page 1 of 1 [13 Posts] View previous topic :: View next topic
Author Message
Talthos
Civilian


Joined: 14 May 2014

PostPosted: Wed Apr 01, 2020 8:55 am    Post subject:  Help needed with Custom Missiles
Subject description: Trying to control targeting rules
Reply with quote

What I'm trying to do:

1. Create missile replacements for the V3 Launcher, Dreadnought, and Boomer Sub.


2. Configure the missiles, so that they can only target structures, but will still generate an explosion that's harmful to vehicles and infantry.


3. Retain the explosion effects at normal and Elite veterancy levels (aka, retain the 'mininuke' effect at Elite rank).





The code bits I used for the V3 missile replacement, as an example:
Code:

; the missile itself
[V3MISL]
UIName=Name:V3MISL
Name=V3 Rocket
Image=V3ROCKET
FireAngle=1
Strength=50
Category=AirPower
Armor=special_2
Spawned=yes
MissileSpawn=yes
TechLevel=-1
Sight=1
RadarInvisible=no
Landable=yes
MoveToShroud=yes
Ammo=1
Speed=24
Owner=Russians,Confederation,Africans,Arabs
Cost=50
Points=20
ROT=3
Crewed=no
Explodes=no
GuardRange=30
Explosion=TWLT070,S_BANG48,S_BRNL58,S_CLSN58,S_TUMU60
MaxDebris=2
Locomotor={B7B49766-E576-11d3-9BD9-00104B972FE8}
MovementZone=Fly
ThreatPosed=10
DamageParticleSystems=SmallGreySSys
AuxSound1=V3Attack
ImmuneToPsionics=yes
ImmuneToRadiation=yes
NoShadow=yes
Selectable=no
Trainable=no
DontScore=yes
Missile.Custom=yes
Missile.PauseFrames=0
Missile.TiltFrames=60
Missile.PitchInitial=0.21
Missile.PitchFinal=0.5
Missile.TurnRate=0.05
Missile.RaiseRate=1
Missile.Acceleration=0.4
Missile.Altitude=768
Missile.BodyLength=256
Missile.LazyCurve=yes
Missile.Damage=128
Missile.EliteDamage=256
Missile.Warhead=V3ImpactWH
Missile.EliteWarhead=V3ImpactEliteWH
Missile.Weapon=V3Explosion
Missile.EliteWeapon=V3ExplosionElite


; the structure-only 'impact' warheads
[V3ImpactWH]
CellSpread=1
PercentAtMax=.25
Wall=yes
Wood=yes
Verses=0%,0%,0%,0%,0%,0%,100%,100%,50%,0%,0%
Conventional=yes
Rocker=yes
Deform=10%
DeformThreshhold=300
Tiberium=yes
Sparky=no
Bright=yes
ProneDamage=70%

[V3ImpactEliteWH]
CellSpread=2
PercentAtMax=.5
Wall=yes
Wood=yes
Verses=0%,0%,0%,0%,0%,0%,100%,75%,50%,0%,0%
Conventional=yes
Rocker=yes
Tiberium=yes
Sparky=no
Bright=yes
ProneDamage=70%


; the infantry/vehicle-only 'explosion' weapons
[V3Explosion]
Damage=1
Projectile=InvisibleHigh
Warhead=V3ExplosionWH

[V3ExplosionElite
Damage=1
Projectile=InvisibleHigh
Warhead=V3ExplosionEliteWH


; the warheads used for the aforementioned 'explosion' weapons
[V3ExplosionWH]
CellSpread=1
PercentAtMax=.25
Verses=100%,90%,80%,90%,70%,70%,0%,0%,0%,80%,0%
Rocker=yes
InfDeath=2
AnimList=XGRYSML1,XGRYSML2,EXPLOSML,XGRYMED1,XGRYMED2,EXPLOMED,EXPLOLRG,TWLT070
Deform=10%
DeformThreshhold=300
Tiberium=yes
Sparky=no
Bright=yes
ProneDamage=70%

[V3ExplosionEliteWH]
CellSpread=2
PercentAtMax=.5
Verses=100%,90%,80%,80%,70%,70%,0%,0%,0%,80%,0%
Rocker=yes
InfDeath=2
AnimList=MININUKE
Tiberium=yes
Sparky=no
Bright=yes
ProneDamage=70%




The problem I'm having: I'm unable to make the launchers for the custom missiles obey the structure-only targeting rules.


So, how would I make my custom missiles inherit their targeting rules from the 'structure-only' verses rules (so the launchers can only be ordered to attack structures and not units), while also generating the explosion that would harm infantry/vehicles?

Back to top
View user's profile Send private message
mevitar
Missile Trooper


Joined: 31 Dec 2010

PostPosted: Wed Apr 01, 2020 10:34 am    Post subject: Reply with quote

Custom missiles don't inherit any targeting rules from anything. Targeting is done by the missile launcher unit, not the missiles. You're looking at the wrong unit here.

Back to top
View user's profile Send private message
Talthos
Civilian


Joined: 14 May 2014

PostPosted: Wed Apr 01, 2020 12:00 pm    Post subject: Reply with quote

mevitar wrote:
Custom missiles don't inherit any targeting rules from anything. Targeting is done by the missile launcher unit, not the missiles. You're looking at the wrong unit here.


Would I be creating 3 new 'launcher weapons' with their own warheads for those 3 units, then?

Back to top
View user's profile Send private message
mevitar
Missile Trooper


Joined: 31 Dec 2010

PostPosted: Wed Apr 01, 2020 5:19 pm    Post subject: Reply with quote

Yes, you need new launcher weapons that can only target buildings.

Back to top
View user's profile Send private message
Talthos
Civilian


Joined: 14 May 2014

PostPosted: Wed Apr 01, 2020 5:35 pm    Post subject: Reply with quote

mevitar wrote:
Yes, you need new launcher weapons that can only target buildings.


Okay, should be simple enough. And just to be sure I'm understanding this properly:


1. The 'launcher weapon' is only handling targeting, and not the actual damage-dealing, correct?


2. I still need to make a 'launcher warhead' whose only purpose is to dictate what the launcher is capable of targeting, correct?


3. Assuming that the answer to the above two questions are both 'yes': Does that mean that, even if the missile warheads could damage 'anything', they would still be limited to only targeting and firing upon whatever the launcher weapon warheads were set to (while still being able to inflict 'splash damage' to the other targets)?

Back to top
View user's profile Send private message
Sir Prize
Vehicle Driver


Joined: 27 Mar 2020
Location: AKA WoRmINaToR

PostPosted: Wed Apr 01, 2020 5:36 pm    Post subject: Reply with quote

If all launchers need to behave the same, then simply make one warhead, say [LauncherNoUnit], and assign it Verses=0%,0%,0%,0%,0%,0%,100%,100%,100%,0%,0%.

Then change all your launcher weapons, which I believe are [V3Launcher], [DredLauncher], and [CruiseLauncher] and assign Warhead=LauncherNoUnit.

That would basically be it. And yes, the launcher weapon does no damage, and only determines launch targeting. The warhead which is responsible for dealing the actual damage is determined by tags in [CombatDamage], namely these:
Code:
[CombatDamage]
...
V3Warhead=V3WH       ; this is the warhead on a V3 Rocket
DMislWarhead=DMISLWH ; this is the warhead on a DredMissile
V3EliteWarhead=V3EWH       ; this is the warhead on a V3 Rocket when the launcher is elite
DMislEliteWarhead=DMISLEWH ; this is the warhead on a DredMissile when the launcher is elite
CMislWarhead=CMISLWH ; this is the warhead on a DredMissile
CMislEliteWarhead=CMISLEWH ; this is the warhead on a DredMissile when the launcher is elite

So yes, even though your launcher can only target buildings, as long as you leave these warheads untouched, nothing will change about their damage properties.
_________________
Formerly WoRmINaToR. I've created a new account to update to the name I've been using everywhere else for the last several years.

Back to top
View user's profile Send private message
Talthos
Civilian


Joined: 14 May 2014

PostPosted: Wed Apr 01, 2020 5:48 pm    Post subject: Reply with quote

Sir Prize wrote:
If all launchers need to behave the same, then simply make one warhead, say [LauncherNoUnit], and assign it Verses=0%,0%,0%,0%,0%,0%,100%,100%,100%,0%,0%.

Then change all your launcher weapons, which I believe are [V3Launcher], [DredLauncher], and [CruiseLauncher] and assign Warhead=LauncherNoUnit.

That would basically be it. And yes, the launcher weapon does no damage, and only determines launch targeting. The warhead which is responsible for dealing the actual damage is determined by tags in [CombatDamage], namely these:
Code:
[CombatDamage]
...
V3Warhead=V3WH       ; this is the warhead on a V3 Rocket
DMislWarhead=DMISLWH ; this is the warhead on a DredMissile
V3EliteWarhead=V3EWH       ; this is the warhead on a V3 Rocket when the launcher is elite
DMislEliteWarhead=DMISLEWH ; this is the warhead on a DredMissile when the launcher is elite
CMislWarhead=CMISLWH ; this is the warhead on a DredMissile
CMislEliteWarhead=CMISLEWH ; this is the warhead on a DredMissile when the launcher is elite

So yes, even though your launcher can only target buildings, as long as you leave these warheads untouched, nothing will change about their damage properties.



This will be very useful for me to remember. I appreciate the assistance.


I've been making 'custom clones' of the default missiles anyway though, mostly because I wanted to leave the defaults in place as a 'fallback option'; it helps to have default numbers as a reference point, at least for me.


But yeah. I might just get hooked on Ares-type modding, at this rate. Thank you very much!

Back to top
View user's profile Send private message
Sir Prize
Vehicle Driver


Joined: 27 Mar 2020
Location: AKA WoRmINaToR

PostPosted: Wed Apr 01, 2020 6:02 pm    Post subject: Reply with quote

One quick note as I look closer at your code, a few things stick out:

You have both Missile.Warhead and Missile.Weapon defined. You should only use one or the other. Both are used for the same thing: they are what gets detonated when the rocket hits its target, and are intended to be the thing that actually causes damage.

The Ares documentation doesn't specify which one takes precedence, but I assume the weapon does. This would override your Missile.Warhead and Missile.Damage settings. In your case, I would recommend simply removing the weapon entirely, delete the tag from your missile and delete all of this code as you don't need it:
Code:
; the infantry/vehicle-only 'explosion' weapons
[V3Explosion]
Damage=1
Projectile=InvisibleHigh
Warhead=V3ExplosionWH

[V3ExplosionElite
Damage=1
Projectile=InvisibleHigh
Warhead=V3ExplosionEliteWH


; the warheads used for the aforementioned 'explosion' weapons
[V3ExplosionWH]
CellSpread=1
PercentAtMax=.25
Verses=100%,90%,80%,90%,70%,70%,0%,0%,0%,80%,0%
Rocker=yes
InfDeath=2
AnimList=XGRYSML1,XGRYSML2,EXPLOSML,XGRYMED1,XGRYMED2,EXPLOMED,EXPLOLRG,TWLT070
Deform=10%
DeformThreshhold=300
Tiberium=yes
Sparky=no
Bright=yes
ProneDamage=70%

[V3ExplosionEliteWH]
CellSpread=2
PercentAtMax=.5
Verses=100%,90%,80%,80%,70%,70%,0%,0%,0%,80%,0%
Rocker=yes
InfDeath=2
AnimList=MININUKE
Tiberium=yes
Sparky=no
Bright=yes
ProneDamage=70%


In fact, I would delete your other warheads as well and start from scratch, copying from V3WH and tweaking values to your liking.

And Ares modding is a lot of fun! Hope you get hooked, lots of possibilities Smile
_________________
Formerly WoRmINaToR. I've created a new account to update to the name I've been using everywhere else for the last several years.

Back to top
View user's profile Send private message
Talthos
Civilian


Joined: 14 May 2014

PostPosted: Wed Apr 01, 2020 6:29 pm    Post subject: Reply with quote

Sir Prize wrote:
One quick note as I look closer at your code, a few things stick out:

You have both Missile.Warhead and Missile.Weapon defined. You should only use one or the other. Both are used for the same thing: they are what gets detonated when the rocket hits its target, and are intended to be the thing that actually causes damage.

The Ares documentation doesn't specify which one takes precedence, but I assume the weapon does. This would override your Missile.Warhead and Missile.Damage settings. In your case, I would recommend simply removing the weapon entirely, delete the tag from your missile and delete all of this code as you don't need it:[code]; the infantry/vehicle-only 'explosion' weapons

In fact, I would delete your other warheads as well and start from scratch, copying from V3WH and tweaking values to your liking.


Way ahead of ya there; I removed the redundant entries already.


Sir Prize wrote:
And Ares modding is a lot of fun! Hope you get hooked, lots of possibilities Smile



The mod I'm working on atm, aims to address some of the shortcomings of the vanilla game. Like how units would not auto-target nearby enemy structures, if said structures were unarmed (such as power plants; I actually managed to fix that problem already).


Additionally, the mod aims to crank up the dial on what C&C games did best; massed RTS combat.


With the missile problem solved, there's really only 1 problem left to address: Figuring out how to make Harriers and Black Eagles obey 'attack-move' commands, reducing the amount of sheer micro-management required to get full use out of them.


Not sure if that's an extra feature Ares has added yet (or plans on adding, sometime down the road).


If not, then the only 'workaound' I've been able to think of so far, is making a 'launcher weapon', attaching it to a structure, giving it infinite range, and making it spawn Harriers/Black Eagles. It's the same targeting logic that allows Aircraft Carriers to execute an attack-move command via launching their Hornet drones.

Back to top
View user's profile Send private message
Sir Prize
Vehicle Driver


Joined: 27 Mar 2020
Location: AKA WoRmINaToR

PostPosted: Wed Apr 01, 2020 7:29 pm    Post subject: Reply with quote

Quote:
The mod I'm working on atm, aims to address some of the shortcomings of the vanilla game. Like how units would not auto-target nearby enemy structures, if said structures were unarmed (such as power plants; I actually managed to fix that problem already).

Good stuff, though a word of caution on that: RA2 doesn't have the nice logic like StarCraft et. al. where a unit auto-attacking a structure will stop and target a unit if it comes within range. This can lead to undesired behavior where your units focus on structures and get killed, when they should really be focusing on the units shooting at them. I did this in my mod once upon a time but it got quite annoying after a while so I removed it.
Quote:
With the missile problem solved, there's really only 1 problem left to address: Figuring out how to make Harriers and Black Eagles obey 'attack-move' commands, reducing the amount of sheer micro-management required to get full use out of them.

Unfortunately Ares doesn't have this logic as far as I am aware. Fixes to aircraft behavior like this have been long-requested features since the very early days of 0.1, but they were never implemented due to the sheer volume of other feature requests. Official Ares development has been slow as of version 2.0p1, so I wouldn't hold your breath for this feature. You can ask AlexB though
_________________
Formerly WoRmINaToR. I've created a new account to update to the name I've been using everywhere else for the last several years.

Back to top
View user's profile Send private message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Wed Apr 01, 2020 7:41 pm    Post subject: Reply with quote

Use waypoints and give your aircraft the order to guard along them. Works in TS and should do in RA2 as well.
_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
TAK02
General


Joined: 28 Jun 2015
Location: It was Damascus.

PostPosted: Wed Apr 01, 2020 9:35 pm    Post subject: Reply with quote

Lin Kuei Ominae wrote:
Use waypoints and give your aircraft the order to guard along them.

Waypoints working for Aircraft in RA2, YR and Ares... That'll be the day...

Back to top
View user's profile Send private message Send e-mail Visit poster's website ModDB Profile ID Skype Account
Virgil
Rocket Infantry


Joined: 22 Jul 2018

PostPosted: Thu Apr 02, 2020 12:09 pm    Post subject: Reply with quote

Lin Kuei Ominae wrote:
Use waypoints and give your aircraft the order to guard along them. Works in TS and should do in RA2 as well.

Waypoint does not work for AircraftTypes in RA2 and its expansions anymore.

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [13 Posts] View previous topic :: View next topic
 Forum index » Modding Central » Red Alert 2 Editing Forum » Ares (Unofficial Forum)
Jump to:  
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © phpBB Group

[ Time: 0.3082s ][ Queries: 10 (0.0032s) ][ Debug on ]