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 Apr 18, 2024 2:57 am
All times are UTC + 0
Vehicles can't repair infantry right?
Moderators: Global Moderators, Red Alert 2 Moderators
Post new topic   Reply to topic Page 1 of 1 [5 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
Agent Z
AA Infantry


Joined: 05 Sep 2013
Location: LocationNotFoundException at RealLife.Location.find() at line: -1

PostPosted: Thu Jul 10, 2014 6:38 pm    Post subject:  Vehicles can't repair infantry right?
Subject description: Then why does this tank do it?
Reply with quote  Mark this post and the followings unread

I am confused.
I was working on a new vehicle which has 2 weapons.
One repairs vehicles, and the other converts enemy infantry into other infantry.
Now ingame, it wouldn't repair friendly vehicles unless forcefired, and would attack once as if FireOnce was set, but it would run to enemy vehicles and repair them instead(still as if FireOnce was set, but they restarted the attack every some frames).
The confusing thing was, it could forcefire on one of my infantry, and actually repair them! (their armor was listed in [Mechanical] warhead)
Normal IFV with engineer still wouldn't repair the infantry, but the new unit could.

I did some experimenting, and got a set of weapons that made a vehicle(and worked also the other way for a conscript) able to repair soldiers and vehicles alike(well, for now Plate armor is a exception)! I do have the newest Ares, but I haven't found anything in the documentation that could have made this happen.

Does anyone have any idea why this happens? (And is this useful for something maybe?) I am pretty sure that I do remember reading several times that its hardcoded that InfantryTypes cannot repair VehicleTypes and the other way. By the way, setting the negative damage to -150 makes this work differently?

Code:

;Weapons:
[DroneRepair2]
Damage=-100    ;If I set this to -150, this whole thing dosen't work
ROF=35
Range=1.5
Projectile=Invisible
Speed=100
Burst=2
Warhead=Mechanical2
Report=IFVRepair
UseSparkParticles=yes
AttachedParticleSystem=WeldingSys

[TestThing]
Damage=100
ROF=35
Range=2.5
Projectile=Invisible
Speed=100
Burst=2
Warhead=TestWH
Report=IFVRepair

;Warheads:
[Mechanical2];Test
Verses=100%,100%,0%,100%,100%,100%,0%,0%,0%,100%,0%
InfDeath=0

[TestWH];Test
Verses=0%,0%,100%,0%,0%,0%,0%,0%,0%,0%,0%   ;Seems neccesary
AffectsAllies=no   ;to not kill own units
InfDeath=0

;Unit code just incase(but the weapons DID work the same when I randomly put them on a conscript, so shouldn't matter):

[TESTUNIT];Unit used for testing
UIName=NOSTR:Experimental Unit
Name=Experimental Unit
Image=GTNK
Prerequisite=GAWEAP,NAWEAP,YAWEAP
Strength=500
Category=AFV
Armor=heavy
Turret=yes
IsTilter=yes
Crusher=yes
TechLevel=2
Sight=8
Speed=6
CrateGoodie=no
Owner=British,French,Germans,Americans,Alliance
Cost=500
Soylent=700
Points=25
ROT=4
AllowedToStartInMultiplayer=no
IsSelectableCombatant=yes
Explosion=TWLT070,S_BANG48,S_BRNL58,S_CLSN58,S_TUMU60
VoiceSelect=GenAllVehicleSelect
VoiceMove=GenAllVehicleMove
VoiceAttack=GenAllVehicleAttackCommand
VoiceFeedback=
DieSound=GenVehicleDie
MoveSound=GrizzlyTankMoveStart
CrushSound=TankCrush
MaxDebris=2
Locomotor={4A582741-9839-11d1-B709-00A024DDAFD1}
MovementZone=Normal
ThreatPosed=15   ; This value MUST be 0 for all building addons
DamageParticleSystems=SparkSys,SmallGreySSys
VeteranAbilities=STRONGER,FIREPOWER,SIGHT,FASTER
EliteAbilities=SELF_HEAL,STRONGER,FIREPOWER,ROF
Accelerates=false
ImmuneToVeins=yes
Size=3
OpportunityFire=yes
BuildTimeMultiplier=0.5

;Relevant:
Primary=DroneRepair2
ElitePrimary=DroneRepair2
Secondary=TestThing
AttackCursorOnFriendlies=yes   ;helpful


I would like to know why this is all happening, so I can remove this completely for my new unit, so that the weapons behave as they should.
(Or are units with both repair and combat weapons not possible?)

Last edited by Agent Z on Sat Feb 25, 2017 11:42 am; edited 1 time in total

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


Joined: 19 Nov 2003

PostPosted: Thu Jul 10, 2014 9:03 pm    Post subject: Reply with quote  Mark this post and the followings unread

Can't really have repair and then offensive weapon jointly, IFV only works due to single slot style.

When you add offensive weapon, the repair behaviour is lost and it rather considers using the repair like as if its a weapon to kill enemy with despite it heals and thus it can 'attack infantry'

Thus why the bizarre behaviour. Technically this is a math thing on the game to choose either friendly targeting for repair or offensive and your case its totally offensive now.

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


Joined: 24 Jul 2010
Location: Liyue

PostPosted: Thu Jul 10, 2014 10:57 pm    Post subject: Reply with quote  Mark this post and the followings unread

The behavior isn't bizarre. It's an attack weapon doing negative damage. The healer logic runs off of negative warhead verses and only works on the same TechnoType. Nothing strange about the former... moreso about the latter.

_________________
KGR | AT
AZUR
Discord: theastronomer1836
Steam

Back to top
View user's profile Send private message Skype Account
Agent Z
AA Infantry


Joined: 05 Sep 2013
Location: LocationNotFoundException at RealLife.Location.find() at line: -1

PostPosted: Fri Jul 11, 2014 6:11 am    Post subject: Reply with quote  Mark this post and the followings unread

ApolloTD wrote:
Can't really have repair and then offensive weapon jointly, IFV only works due to single slot style.

When you add offensive weapon, the repair behaviour is lost and it rather considers using the repair like as if its a weapon to kill enemy with despite it heals and thus it can 'attack infantry'

Thus why the bizarre behaviour. Technically this is a math thing on the game to choose either friendly targeting for repair or offensive and your case its totally offensive now.

Thanks for the clarification, this is helpful!
I now understood why changing the damage makes it behave different!
(If total damage on both weapons is less than 0, it thinks its repair, but if its more than 0, its offence right?)

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


Joined: 24 Jul 2010
Location: Liyue

PostPosted: Fri Jul 11, 2014 7:09 am    Post subject: Reply with quote  Mark this post and the followings unread

If you use negative numbers for Damage, it does negative damage, which grants hit points. It's still damage. According to the engine, it's only repair/heal when you use negative warhead verses.

_________________
KGR | AT
AZUR
Discord: theastronomer1836
Steam

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