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 8:42 pm
All times are UTC + 0
Long range weapon and short range KillDriver
Moderators: Ares Support Team at PPM, Global Moderators, Red Alert 2 Moderators
Post new topic   Reply to topic Page 1 of 1 [14 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
TAK02
General


Joined: 28 Jun 2015
Location: It was Damascus.

PostPosted: Sat Sep 08, 2018 5:33 am    Post subject:  Long range weapon and short range KillDriver
Subject description: Splitting up into Primary and Secondary doesn't work because no switch
Reply with quote  Mark this post and the followings unread

I currently have the problem of a VehicleType not switching between long-ranged Primary and short-ranged Secondary.
Similarily, the tank won't switch between short-ranged Primary and long-ranged Secondary.
It sticks to whatever is listed under its Primary, regardless of what it is.

What I was trying to get at is how to make a vehicle switch between a regular weapon with long range, and one with short range, but with KillDriver=yes attached to the Warhead.
I am unaware of how to achieve a high-damage KillDriver warhead via AttachAnim or other work-arounds, assuming those are even possible. If they are, please elaborate.

I was using Ares 18.243.1246 (outdated?), tho I'm pretty sure this is a problem from the vanilla. Either that or I messed up. Tho with how straight forward the code is, there's no way to do that outside of typos.

Test codes:
Code:
[TestM60]
Damage=10
ROF=6
Range=5.75
Projectile=InvisibleLow
Speed=100
Warhead=MSA
Report=GIAttack
Anim=MGUN-N,MGUN-NE,MGUN-E,MGUN-SE,MGUN-S,MGUN-SW,MGUN-W,MGUN-NW
OccupantAnim=UCFLASH

[Test105mm]
Damage=200
ROF=45;85
Range=10 ;;5.75
Projectile=NCannonInviso
Speed=50
Warhead=GRIZAPE
Report=GrizzlyTankAttack
Anim=GGUNFIREG
Bright=yes
AttachedParticleSystem=CannonBulletSys
IsRailgun=yes
MinimumRange=5.76

EDIT: the reason why I'm not using InitialPayload here is because the vehicle I'll be using the KillDriver for is planned to not have a turret and shoot only to the front.

_________________
One and only developer of the Command & Conquer Dune "C&C D" mod.
m7 wrote:
I tend to release things I create so that assets are never lost to hard drive problems, accidental deletion, or me having to pretend to care about rippers taking things from my project when it is done. #Tongue

Back to top
View user's profile Send private message Send e-mail Visit poster's website ModDB Profile ID YouTube User URL Twitter Channel URL Skype Account
Starkku
Cyborg Commando


Joined: 28 Dec 2007
Location: Finland

PostPosted: Sat Sep 08, 2018 5:49 am    Post subject: Reply with quote  Mark this post and the followings unread

Game does not have Range-based condition for switching weapons in the first place, so if your Primary weapon can fire at all targets, Secondary never gets used.

_________________

Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID Twitter Channel URL
TAK02
General


Joined: 28 Jun 2015
Location: It was Damascus.

PostPosted: Sat Sep 08, 2018 6:05 am    Post subject: Reply with quote  Mark this post and the followings unread

Starkku wrote:
Game does not have Range-based condition for switching weapons in the first place

That explains a lot.

What I'm looking for is combining a long range weapon that barely but still does damage to tanks with a short-range, high-damage weapon (that sends the tank into red) that kills the driver.
I assume KillDriver.KillBelowPercent= should be used?
Is there any way of having Damage being applied as a percentage to which the overall health of the enemy is reduced to?

Back to top
View user's profile Send private message Send e-mail Visit poster's website ModDB Profile ID YouTube User URL Twitter Channel URL Skype Account
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Sat Sep 08, 2018 7:22 am    Post subject: Reply with quote  Mark this post and the followings unread

Primary=Test105mm
Secondary=TestM60
should work. MinimumRange on Test105mm prevents it from being fired when too close, thus forcing the unit to switch to secondary TestM60 for close targets.

_________________
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
Virgil
Stealth Laser Trooper


Joined: 22 Jul 2018

PostPosted: Sat Sep 08, 2018 9:15 am    Post subject: Reply with quote  Mark this post and the followings unread

Ares 0.E has added relative damage weapon like the RA1 M.A.D. tank, maybe this is what you want.
http://ares-developers.github.io/Ares-docs/new/warheads/relativedamage.html

KillDriver.KillBelowPercent= is used to prevent target's driver get killed when its strength is higher than this percent(if it doesnt has ProtectedDriver=yes or that veteran ability),not to kill its driver and do this percent damage.

Back to top
View user's profile Send private message
BaRaka
Medic


Joined: 09 Jun 2014

PostPosted: Sat Sep 08, 2018 9:35 am    Post subject: Reply with quote  Mark this post and the followings unread

Use Gattling logic.

Code:

IsGattling=yes
Gattling.Cycle=yes
TurretCount=1
WeaponCount=6  
Primary=TestM60
Secondary=none ; or define a dummy weapon
Weapon1=TestM60
Weapon2=none ;
Weapon3=Test105mm
Weapon4=none ;
Weapon5=TestM60
Weapon6=none ;
WeaponStages=3
Stage1=1
Stage2=1
Stage3=1
RateUp=1
RateDown=1

And remove MinimumRange from Test105mm.
Now, it should fire it's machine gun until the cannon reloads, fire the cannon and then use again the MG.

Also, I'm pretty sure you can lose weapon 5 and 6, Stage 3, and leave it with WeaponCount=4; I have multiple units using multiple weapons against targets, but never got to test a gattling with only 4 weapons.

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


Joined: 28 Jun 2015
Location: It was Damascus.

PostPosted: Sat Sep 08, 2018 12:48 pm    Post subject: Reply with quote  Mark this post and the followings unread

Lin Kuei Ominae wrote:
Primary=Test105mm
Secondary=TestM60
should work. MinimumRange on Test105mm prevents it from being fired when too close, thus forcing the unit to switch to secondary TestM60 for close targets.

Nope. Forcing the test vehicle up close and personal makes it stop shooting the Primary and when a target is manually set the tank will back off until it's out of the MinimumRange.
Or the tank will back off on its own.
Similarily, switching the two around yields the same result: Secondary is never used, even when the target is far off. The tank simply closes in.

@Virgil: thanks, that's what I needed. Tho not quite sure how'd one go about and reduce a tank down to red with one shot.
RelativeDamage.Vehicles=50 ? or 100 - whatever the value for ConditionRed is?

BaRaka wrote:
it should fire it's machine gun until the cannon reloads, fire the cannon and then use again the MG.

Not what I wanted.
The issue is forcing the Techno to change the weapon after the player forces it close, not the vehicle driver suddenly getting smarter and going in.
How'd one go about getting him back out exactly the way he came from?

That could mean more micromanagement than necessary, and I'd rather avoid going there for the vehicle I have this in mind for.

EDIT: the switching doesn't work here either.
EDIT2: not even when swapping the positions/numbering of the test weapons

In any case, seeing as how it might be impossible, I can either sacrifice the trivial damage I had in mind (and use Ares' Verses hacks), or request to add Range as a condition for weapon switching.
Unless someone has other ideas?

What about AttachEffect? Can't it be used to turn a 'harmless' weapon's warhead into a driver-killer?
AttachEffect can already handle damage increase/decrease and MOre (just look at MO), who is to say it can't handle switching/altering warheads at small ranges via InitialPayload?
(InitialPayload would then add the problem of 'inviso Infantry' should I decide to re-work the vehicle into a transport of sorts, but I'll swallow that if it gets things running.)

Back to top
View user's profile Send private message Send e-mail Visit poster's website ModDB Profile ID YouTube User URL Twitter Channel URL Skype Account
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Sat Sep 08, 2018 1:05 pm    Post subject: Reply with quote  Mark this post and the followings unread

TAK02 wrote:
Lin Kuei Ominae wrote:
Primary=Test105mm
Secondary=TestM60
should work. MinimumRange on Test105mm prevents it from being fired when too close, thus forcing the unit to switch to secondary TestM60 for close targets.

Nope. Forcing the test vehicle up close and personal makes it stop shooting the Primary and when a target is manually set the tank will back off until it's out of the MinimumRange.
Or the tank will back off on its own.
Similarily, switching the two around yields the same result: Secondary is never used, even when the target is far off. The tank simply closes in.

Both weapons need the same warhead!
Otherwise one warhead will be more suitable than the other, thus resulting in your described behaviour.

I did the same during my various weapon tests for TI and it worked perfectly fine there. I doubt RA2 is a lot different in this case.

_________________
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
Starkku
Cyborg Commando


Joined: 28 Dec 2007
Location: Finland

PostPosted: Sat Sep 08, 2018 1:25 pm    Post subject: Reply with quote  Mark this post and the followings unread

Lin Kuei Ominae wrote:
I doubt RA2 is a lot different in this case.


That is where you are wrong. I already stated this in my first post in this thread, but this type of logic does not exist in RA2/YR.

_________________

Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID Twitter Channel URL
TAK02
General


Joined: 28 Jun 2015
Location: It was Damascus.

PostPosted: Sat Sep 08, 2018 1:44 pm    Post subject: Reply with quote  Mark this post and the followings unread

Lin Kuei Ominae wrote:
Both weapons need the same warhead!

Please don't shout, no-one told me the engine would/could take the warheads themselves into account when switching weapons. I only know of the FS Juggernaut doing it via ROF (tho not sure how well that'd work in RA2, with or without Ares).

In any case, I tested it to be sure, and Starrku is right: switching ain't happening.
If it helps: I get the "attack out of range" cursor when the target is in range of M60, but the 105mm is used as Primary.
It's like the M60 doesn't even exist.

Back to top
View user's profile Send private message Send e-mail Visit poster's website ModDB Profile ID YouTube User URL Twitter Channel URL Skype Account
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Sat Sep 08, 2018 1:50 pm    Post subject: Reply with quote  Mark this post and the followings unread

In that case, you can still switch to modding TS. #Tongue

_________________
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: Sat Sep 08, 2018 1:55 pm    Post subject: Reply with quote  Mark this post and the followings unread

Lin Kuei Ominae wrote:
In that case, you can still switch to modding TS. #Tongue

No offense, but TS is a little out-dated and the UI unsuitable/frustrating when you're used to Emperor's/RA2's sidebar #Tongue
JK, I can get around the wacky UI, it's just a bit frustrating 'til you get used to it.
That, and it doesn't have Ares #Tongue

Back to top
View user's profile Send private message Send e-mail Visit poster's website ModDB Profile ID YouTube User URL Twitter Channel URL Skype Account
TAK02
General


Joined: 28 Jun 2015
Location: It was Damascus.

PostPosted: Sat Sep 08, 2018 2:52 pm    Post subject: Reply with quote  Mark this post and the followings unread

Dbl-posting is fun.
For reference, I'm trying to re-create the "melee" bit from the first Iron-Blooded Orphans episode here: https://youtu.be/XsuzL6GYk3c?t=1080
The shots pretty much rendered the 'tank' unusable, but only when shot up close, not far off.
Notice how he said "Their armor's thick. I have to close in [...]"

Last edited by TAK02 on Sun Feb 23, 2020 6:07 pm; edited 1 time in total

Back to top
View user's profile Send private message Send e-mail Visit poster's website ModDB Profile ID YouTube User URL Twitter Channel URL Skype Account
Virgil
Stealth Laser Trooper


Joined: 22 Jul 2018

PostPosted: Sat Sep 08, 2018 3:07 pm    Post subject: Reply with quote  Mark this post and the followings unread

IIRC the vanilla game show a red health bar when its health is below 25%, so set it to 75 should make sure the target is damaged into red condition-though it may also be destroyed when it doesnt have so much hp,and if multiple such units is attacking the same target then it will surely be destroyed #Tongue
I guess you can use a warhead with -50 and a cluster weapon with another -50 warhead to achieve the same red condition without target being destroyed.

As for switching weapon, secondary will only be used when the primary one cannot attack the target desinated (except for NoAmmoWeapon, but that thing has other drawbacks) ,so you cannot have two weapon firing at the same target just by range.

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [14 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.1666s ][ Queries: 11 (0.0100s) ][ Debug on ]