Renegade Projects Network Forums
Warhead Change - no Auto-Attack anymore - Printable Version

+- Renegade Projects Network Forums (https://forums.renegadeprojects.com)
+-- Forum: Modding (https://forums.renegadeprojects.com/forumdisplay.php?fid=3)
+--- Forum: Red Alert 2 & Yuri's Revenge Editing (https://forums.renegadeprojects.com/forumdisplay.php?fid=8)
+--- Thread: Warhead Change - no Auto-Attack anymore (/showthread.php?tid=1388)



Warhead Change - no Auto-Attack anymore - Guest - 27.10.2009

Hi folks!

I recently changed the Verses in the Warhead of the Guardian GI, from
Verses=20%,20%,20%,100%,50%,100%,10%,10%,10%,100%,100% to Verses=25%,25%,25%,100%,100%,100%,25%,25%,25%,100%,100%.

Since this change, the GGI doesn't autofire anything with light, medium or heavy armor anymore, only infantry. If a group of tanks stands right next to GGIs, the tanks can pick their targets in the very front of them, because only after getting a hit, one fires.

This is a bit strange to me; after having made surely over 50 verses changes, I never got something like this, that a techtype stops autoattacking an specifig armor type (or in this case, 3 armor types).

Thx in Advance


RE: Warhead Change - no Auto-Attack anymore - DCoder - 27.10.2009

Which warhead is this? Primary or Secondary? Show the code for the unit, all its weapons, warheads, etc.


RE: Warhead Change - no Auto-Attack anymore - Guest - 28.10.2009

I'd say, this is the related code.

Code:
[InfantryTypes]
2=GGI        ; Guardian GI

[Warheads]
114=GuardianM60WH   ; Guardian GI Warhead Primary
115=GuardgunWH      ; Guardian GI Warhead Secondary
116=UCGuardgunWH    ; Guardian GI Warhead Occupied Buildings

[GGI] ; Guardian GI
UIName=Name:GuardianGI
Name=Guardian GI
Category=Soldier
OpenTransportWeapon=1
Pip=white
Occupier=yes
OccupyPip=PersonBlue
Primary=GuardianM60
ElitePrimary=GuardianM60E
Secondary=Guardgun
EliteSecondary=GuardgunE
OccupyWeapon=UCGuardgun
EliteOccupyWeapon=UCGuardgunE
Prerequisite=GAPILE
CrushSound=InfantrySquish
Strength=100
Armor=none
TechLevel=1
Sight=5
Speed=3.5
Owner=Americans
AllowedToStartInMultiplayer=no
Cost=400
Soylent=200
Points=10
IsSelectableCombatant=yes
VoiceSelect=GuardianGISelect
VoiceMove=GuardianGIMove
VoiceAttack=GuardianGIAttackCommand
VoiceFeedback=GuardianGIFear
VoiceSpecialAttack=GuardianGIMove
DieSound=GuardianGIDie
Locomotor={4A582744-9839-11d1-B709-00A024DDAFD1}
PhysicalSize=1
MovementZone=Infantry
ThreatPosed=10
ImmuneToVeins=yes
ImmuneToPsionics=no
Bombable=yes
Deployer=yes
DeployFire=yes
VeteranAbilities=STRONGER,FIREPOWER,ROF,SIGHT,FASTER
EliteAbilities=SELF_HEAL,STRONGER,FIREPOWER,ROF
Size=1
Crushable=yes
DeployedCrushable=no
DeploySound=GuardianGIDeploy
UndeploySound=GIUndeploy
IFVMode=16
PixelSelectionBracketDelta=-6

[GuardianM60] ; Guardian GI Primary Standard
Damage=15
ROF=20
Range=4.5
Projectile=GuardianM60Pr
Speed=100
Warhead=GuardianM60WH
Report=GIAttack
Anim=MGUN-N,MGUN-NE,MGUN-E,MGUN-SE,MGUN-S,MGUN-SW,MGUN-W,MGUN-NW
OccupantAnim=UCFLASH

[GuardianM60E] ; Guardian GI Primary Elite
Damage=15
ROF=20
Range=5.5
Projectile=GuardianM60Pr
Speed=100
Warhead=GuardianM60WH
Report=GIAttack
Anim=MGUN-N,MGUN-NE,MGUN-E,MGUN-SE,MGUN-S,MGUN-SW,MGUN-W,MGUN-NW

[GuardianM60WH] ; Guardian GI Primary Warhead (Standard & Elite)
Verses=100%,50%,50%,25%,25%,25%,25%,25%,25%,100%,100%
InfDeath=1
AnimList=PIFFPIFF,PIFFPIFF
Bullets=yes
ProneDamage=50%

[GuardianM60Pr] ; Guardian GI Primary Projectile (Standard & Elite)
Inviso=yes
Image=none
SubjectToCliffs=yes
SubjectToElevation=yes
SubjectToWalls=yes

[Guardgun] ; Guardian GI Secondary Standard
Damage=40
ROF=40
Range=7
Burst=1
Projectile=GuardgunPr
Speed=30
Warhead=GuardgunWH
Report=GuardianGIDeployedAttack
MinimumRange=1

[GuardgunE] ; Guardian GI Secondary Elite
Damage=25
ROF=40
Range=7
Burst=1
Projectile=GuardgunPr
Speed=30
Warhead=GuardgunWH
Report=GuardianGIDeployedAttack
MinimumRange=1
Burst=2

[GuardgunWH] ; Guardian GI Secondary Warhad (Standard & Elite)
Wall=yes
Wood=yes
Verses=25%,25%,25%,100%,100%,100%,25%,25%,25%,100%,100%
Conventional=yes
InfDeath=3
AnimList=XGRYSML1,XGRYSML2,EXPLOSML,XGRYMED1,XGRYMED2,EXPLOMED,EXPLOLRG,TWLT070
ProneDamage=50%
CellSpread=.5
PercentAtMax=.5

[GuardgunPr] ; Guardian GI Secondary Projectile (Standard & Elite)
Arm=2
Shadow=no
Proximity=no
Ranged=yes
AA=yes
AG=yes
Image=DRAGON
ROT=60
SubjectToCliffs=no
SubjectToElevation=no
SubjectToWalls=no

[UCGuardgun] ; Guardian GI Occupied Standard
Damage=40
ROF=40
Range=7
Burst=1
Projectile=UCGuardgunPr
Speed=60
Warhead=UCGuardgunWH
Report=GuardianGIDeployedAttack
MinimumRange=1

[UCGuardgunE] ; Guardian GI Occupied Elite
Damage=50
ROF=40
Range=7
Burst=1
Projectile=UCGuardgunPr
Speed=60
Warhead=UCGuardgunWH
Report=GuardianGIDeployedAttack
MinimumRange=1

[UCGuardgunWH] ; Guardian GI Occupied Warhead (Standard & Elite)
Wall=yes
Wood=yes
Verses=25%,25%,25%,100%,100%,100%,25%,25%,25%,100%,100%
Conventional=yes
InfDeath=3
AnimList=XGRYSML1,XGRYSML2,EXPLOSML,XGRYMED1,XGRYMED2,EXPLOMED,EXPLOLRG,TWLT070
ProneDamage=50%
CellSpread=.5
PercentAtMax=.5

[UCGuardgunPr] ; Guardian GI Occupied Warhead (Standard & Elite)
Arm=2
Shadow=no
Proximity=no
Ranged=yes
AA=yes
AG=yes
Image=DRAGON
ROT=60
SubjectToCliffs=no
SubjectToElevation=no
SubjectToWalls=no



RE: Warhead Change - no Auto-Attack anymore - DCoder - 28.10.2009

Interesting... I'll assume they're deployed when the autotargeting fails? There's an internal flag set after parsing a warhead that indicates if this warhead has 0% verses against medium and steel armors (don't ask me why the fuck that's needed), it seems to only be checked when infantry is picking automatic targets, and will mark non-infantry objects as untargetable. I have no idea why it would trip up here and if it's at all related, but that's the only damn thing I can see that specifically checks medium verses on hardcoding level... Sorry.

I might try to reproduce this over the weekend, when I have time to mess with the code, until then, I have no explanations. Try to revert that medium/100% to 50% and test? Does this can't-target-unit restriction also affect aircraft? Buildings? TDrones? CMisls?