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


The time now is Thu Mar 28, 2024 9:20 am
All times are UTC + 0
Weapons w/ altered trajectories versus some targets [ARES]
Moderators: Global Moderators, Red Alert 2 Moderators
Post new topic   Reply to topic Page 1 of 1 [11 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
Millennium
Commander


Joined: 09 Mar 2008
Location: Osaka (JP)/Hong Kong/Germany

PostPosted: Thu Mar 19, 2015 3:04 pm    Post subject:  Weapons w/ altered trajectories versus some targets [ARES] Reply with quote  Mark this post and the followings unread

Remember the ECM tank's feature that would prevent it from being hit by guided missiles in Generals? The following tutorial should explain how a similar effect can be re-created in YR (with Ares), protecting a building, vehicle, aircraft or infantry from missiles.  
(In my example, I will use guided missiles as an example, but this method can theoretically work with any other type of projectile)

Before we start, a disclaimer!
There are a few limitations and drawbacks to this method:
1) Projectiles cannot be deflected twice - once they bounce off one shielded unit, they may hit another unit nearby, even if that unit is shielded.
2) Units that fire deflectable projectiles will have to sacrifice both their Primary and Secondary weapon slots to implement this feature and so cannot have additional weapons beyond their missile launcher.
3) Unlike in Generals, this method will ONLY protect the shielded unit itself, if fired upon. It will not create an "aura" around the unit in which missiles are deflected, even if fired upon other units.

Let's get to business!

First, we need to create new armor types.
Go to your "ArmorTypes" section (or create one), and define the armor type (or types) that will protect your desired units from missiles. You can define them in any way you like, flak/medium/steel is just an example.  
Code:

ECMPerson=flak
ECMVehicle=medium
ECMBuilding=steel


(Your ID's can all be whatever you like, what matters is that they are consistent)

Set these armors on all the units/buildings that you want to have protected from guided missiles, eg:

Code:

[H4X0R]
Name=Hacker
Armor=ECMPerson


Next, let's look at the units that should fire deflectable missiles. Say, you have this little Missile Guy and you want his missiles to be deflected when attacking your shielded hacker:

Code:

[MISLGUY]
Name=Missile Guy
[b]Primary=MissileLauncher[/b]
[b]Secondary=MissileLauncherDeflected[/b]


Let's look at his weapons, next:

Code:

[MissileLauncher]
; Nothing special here...
Projectile=HeatSeeker ; or whatever you like, as long as it hits.
Warhead=MissileWH


Code:

[MissileLauncherDeflected]
Damage=0
Warhead=DummyWarhead2
Projectile=DeflectedMissile
ProjectileRange=X ; set this to something reasonable, smaller than your Range=, possibly 50% of it.


Note that all stats that I'm silent on can be set to whatever you like.

Next, we define the warheads, referencing our armortypes from before:

Code:

[MissileWH]
Versus.ECMPerson=0%
Versus.ECMVehicle=0%
Versus.ECMBuilding=0%


and

Code:

; There are a few others you could use for this which are already in the code
[DummyWarhead2]
Verses=1%,1%,1%,1%,1%,1%,1%,1%,1%,1%,1%


So that the unit will be unable to attack shielded targets with [MissileLauncher], but has to resort to [MissileLauncherDeflected] instead.

Next, we look at the projectile for the 'deflected' version of the weapon:
Code:

; Missile bouncing off when striking ECM shield
[DeflectedMissile]
Image=; to make sense, this should be set to the same as on the projectile used by [MissileLauncher]
Splits=yes
Cluster=1
AirburstWeapon=MissileLauncher
RetargetAccuracy=X% ; set this higher or lower according to just how much protection you would like for your shielded units. This determines the chance of a missile NOT being deflected, and striking the shielded unit.
AroundTarget=yes


When firing [MissileLauncherDeflected] on a shielded target, the projectile "splits" instead of striking the target, spawning a single instance of "MissileLauncher" that is going to strike a cell or target around the shielded target.

So there you have it!


Key Words: #Tutorials #Modding #RedAlert2 #YurisRevenge #Ares #Rules.INI 

Last edited by Millennium on Thu Mar 19, 2015 4:00 pm; edited 2 times in total

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


Joined: 16 Aug 2006
Location: Germany

PostPosted: Thu Mar 19, 2015 3:29 pm    Post subject: Reply with quote  Mark this post and the followings unread

I'm not sure if this is really the best solution, but you explain well the steps you have done and also the needed keys. So as a tutorial it's quite nice.

Though imo it's not really a shield.
a) You just give a certain unit a weapon that is unable to shoot on a certain armortype. And a secondary weapon which can shoot the armortype but has some kind of inaccuracy.
b) it needs a lot of code for just 1 special unit that has the special protection and one other special unit with the weapon that is vulnerable to the protection. It is not usable for any general protection that works against all missiles.
c) it uses up Primary and Secondary, thus many units like the Apocalypse tank would be unable to use this logic and their homing missiles would still hit.
d) It's not really a shield that can be depleted/destroyed or activated/deactivated on command like a unit deploy feature

Visually a solution like Kenosis has shown here seems to work much better imo.
http://www.ppmsite.com/forum/viewtopic.php?t=38742&start=66

Millennium wrote:
[MissileLauncherDeflected]
ProjectileRange=X ; set this to something reasonable, smaller than your Range=, possibly 50% of it.

It in fact needs to be 0. Else it can happen that the first stage MissileLauncherDeflected hits the close by target and then spawns on that point the next stage. This looks bad ingame like a jumping missile.


So i would suggest renaming the topic into
"Weapons with special behaviour against certain ArmorTypes"
or something like that

_________________
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
Millennium
Commander


Joined: 09 Mar 2008
Location: Osaka (JP)/Hong Kong/Germany

PostPosted: Thu Mar 19, 2015 3:46 pm    Post subject: Reply with quote  Mark this post and the followings unread

Sorry, I was going for a catchy name. You are of course right that there are better naming options. And of course there are also much cooler shield options, this is just a proxy to the specific effect seen in Gen/ZH.

As for the thread you pointed me at, please correct me if I'm wrong, but that seems to be an ARES feature request... of course it would be nice if we had that feature, but so far it is not available.

As for b), that's not correct - once you have the armor and warheads set up, you can create multiple units that fire inaccurately on "missile-protected" targets. All you need to re-do each time is create a "deflected" clone of their weapon/projectile. This method is not limited to just one unit.

Edit:
Having a "shield" that simply destroys incoming projectiles is of course also possible with my method - just give the 'deflected' weapon the warhead of the original weapon and skip the AirburstWeapon, so the missiles will detonate in mid-air before striking their target, as if destroyed.

_________________
Mao Zedong wrote:

Our mission, unfinished, may take a thousand years.  

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


Joined: 16 Aug 2006
Location: Germany

PostPosted: Thu Mar 19, 2015 4:36 pm    Post subject: Reply with quote  Mark this post and the followings unread

The gifs Kenosis has shown are ingame, so he found a way using Ares. The feature request was to have something like Kenosis has shown +  the effect of hitpoints on the shield so it can be drained.

Millennium wrote:
As for b), that's not correct - once you have the armor and warheads set up, you can create multiple units that fire inaccurately on "missile-protected" targets. All you need to re-do each time is create a "deflected" clone of their weapon/projectile. This method is not limited to just one unit.

You're right.
Though you have to create a Secondary for every other unit that should get the effect. Not always is this possible and then you soon end up ingame with one unit hitting and other firing deflected missiles, while for the user there is not really a difference visible between the missiles. So it can become confusing quite fast, which missiles are deflected and which aren't.
In addition do all already existing warheads need to be edited to have the Verses of the new armors included, which can be quite a lot of work.

Millennium wrote:
Edit:
Having a "shield" that simply destroys incoming projectiles is of course also possible with my method - just give the 'deflected' weapon the warhead of the original weapon and skip the AirburstWeapon, so the missiles will detonate in mid-air before striking their target, as if destroyed.

Airburst makes the missile fly over the target.
You would see that the missile isn't really trying to hit the target but a point above it. The gif Kenosis has shown, shows the missiles are intercepted in their flight directly towards the target, thus giving a very good impression of some invisible barrier that blocks the projectiles.

Your tutorial is like a special case of a unit using Primary cannons vs tanks and Secondary missiles vs infantry. It's just not a completely different weapon, but one that looks similar and just behaves a bit different.


Topic title is better now. thx Smile

_________________
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
Millennium
Commander


Joined: 09 Mar 2008
Location: Osaka (JP)/Hong Kong/Germany

PostPosted: Thu Mar 19, 2015 4:50 pm    Post subject: Reply with quote  Mark this post and the followings unread

Lin Kuei Ominae wrote:
The gifs Kenosis has shown are ingame, so he found a way using Ares. The feature request was to have something like Kenosis has shown +  the effect of hitpoints on the shield so it can be drained.

I believe, but I'm not sure, that this was an exe hack he did himself. I don't think anything like that is possible in the official Ares releases yet... but if it was, that would be awesome, I will ask in that thread.

Quote:

In addition do all already existing warheads need to be edited to have the Verses of the new armors included, which can be quite a lot of work.

Because of the way Ares handles new ArmorTypes, you only have to edit the ones that should be deflected. For all the other warheads, they will default to the values of the ArmorType that the new type has been defined as. So for example:
Code:

ECMPerson=flak

will mean that ALL warheads which DO NOT have Versus.ECMPerson= defined, will treat ECMPerson as if it was the ArmorType "flak". So you'd only have to define the new Verses. values for those warheads that are needed by "deflectable" weapons.

Quote:

Airburst makes the missile fly over the target.

AirburstWeapon is also the tag that defines what weapon a "Splits=yes" projectile splits into. So if I say "skip AirburstWeapon", I mean to leave it out (if possible), or set it to a dummy weapon, so that the stage 1 missile will just disappear when detonating.

All other points you mentioned are correct. Especially needing both Primary and Secondary is a dealbreaker for many things.

Back to top
View user's profile Send private message
ApolloTD
Commander


Joined: 19 Nov 2003

PostPosted: Thu Mar 19, 2015 5:31 pm    Post subject: Reply with quote  Mark this post and the followings unread

Millennium wrote:
Lin Kuei Ominae wrote:
The gifs Kenosis has shown are ingame, so he found a way using Ares. The feature request was to have something like Kenosis has shown +  the effect of hitpoints on the shield so it can be drained.

I believe, but I'm not sure, that this was an exe hack he did himself. I don't think anything like that is possible in the official Ares releases yet... but if it was, that would be awesome, I will ask in that thread.


The GIF is NOT from Ares and was actually from different 'patch' project regards the ECM effects, the bad thing about it was, it blocked also friendly missiles as not have owner.

Back to top
View user's profile Send private message
kenosis
Commander


Joined: 19 Aug 2009
Location: Moscow State University

PostPosted: Thu Mar 19, 2015 5:45 pm    Post subject: Reply with quote  Mark this post and the followings unread

ApolloTD wrote:

it blocked also friendly missiles as not have owner.


Well that can be avoided using other methods

_________________
Tired of grabbing my random SHP conversions? Why not learn to create SHPs for yourself?

Back to top
View user's profile Send private message Send e-mail Visit poster's website Skype Account Yahoo Messenger Account
Millennium
Commander


Joined: 09 Mar 2008
Location: Osaka (JP)/Hong Kong/Germany

PostPosted: Thu Mar 19, 2015 6:38 pm    Post subject: Reply with quote  Mark this post and the followings unread

Lin Kuei Ominae wrote:

Millennium wrote:
[MissileLauncherDeflected]
ProjectileRange=X ; set this to something reasonable, smaller than your Range=, possibly 50% of it.

It in fact needs to be 0. Else it can happen that the first stage MissileLauncherDeflected hits the close by target and then spawns on that point the next stage. This looks bad ingame like a jumping missile.


Ah, I just researched this a little and it's not possible - almost any firing unit will have a very low altitude on FLH, and at a distance of 0-1 cells, the projectile will not have gained much altitude yet. Because the initial vector of a projectile spawned by Splits is downward, that means that a missile which splits at cells 0-1 will have its split weapon simply drop into the ground.

This is not the case for all units - aircraft or units with a very high FLH (such as large missile launcher vehicle voxels, or mechs, or buildings) do not have this issue, because their missiles spawn at high altitude and have time to align towards their target. Projectile Speed-to-ROT ratio also influences whether the missiles will align before hitting the ground.
I guess this is just another limitation of this system.

A quick fix I can think of to prevent the "jumping missile" is to have a minimum range equal to the distance the missile needs to gain enough altitude to split succesfully (this usually isn't much, like 1 or 2 cells).

Edit:
I also just realized that one can load the WH given as DummyWarhead2 above with various interesting effects to simulate an actual shield... for example, it can have an animation like IRONFX, representing a negated or deflected projectile.
Or you can actually give it a wide CellSpread and make it give a shield-like AttachEffect.Animation to all units/structures nearby that are of the type that deflects the projectile, representing a shield activating...
there are many possibilities.

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


Joined: 16 Aug 2006
Location: Germany

PostPosted: Thu Mar 19, 2015 8:05 pm    Post subject: Reply with quote  Mark this post and the followings unread

In TS Splits 2nd stage also starts vertical down, but there are several ways to use ProjectileRange=0 fine.
a) give the 2nd stage projectile a low acceleration. It will start with speed=0 and with the slow accel. it has enough time to rotate
b) give the 2nd stage a high ROT. ROT=20 is in many cases already enough, but with ROT=100 you can be sure it never drops on the ground.

In RA2 there are surely also other nice ways to prevent an early drop on ground.
e.g. use CourseLockDuration and a ProjectileRange of 2-3 to make the first stage gain enough height without having to fear it hits anything. Then at the highest point let it split.

_________________
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
Millennium
Commander


Joined: 09 Mar 2008
Location: Osaka (JP)/Hong Kong/Germany

PostPosted: Thu Mar 19, 2015 9:09 pm    Post subject: Reply with quote  Mark this post and the followings unread

a) and b) work well, I will go with those

CourseLockDuration on something that is already pointing downward will prevent it from adjusting its direction, so that wouldn't be helpful

edit:
oh nvm, you mean CLD on the FIRST stage?

_________________
Mao Zedong wrote:

Our mission, unfinished, may take a thousand years.  

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


Joined: 16 Aug 2006
Location: Germany

PostPosted: Thu Mar 19, 2015 11:53 pm    Post subject: Reply with quote  Mark this post and the followings unread

Millennium wrote:
oh nvm, you mean CLD on the FIRST stage?

correct

_________________
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
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [11 Posts] Mark the topic unread ::  View previous topic :: View next topic
 
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.1652s ][ Queries: 11 (0.0120s) ][ Debug on ]