ModEnc is currently in Maintenance Mode: Changes could occur at any given moment, without advance warning.

Immune G.I. Bug

From ModEnc
Jump to: navigation, search

The Immune G.I. Bug is a bug discovered by Renegade on May 03, 2005 while trying to change radiation to healing. Basically, if you make the G.I. and/or several other "normal" infantrists immune to radiation, they will, when deployed, after a certain amount of time start to shoot next to them for no apparent reason. Currently, the only known way to prevent this, is not to do it. The bug was later confirmed by Mecci100, in a totally unrelated request for help.

Note: If you change ImmuneToRadiation to "no" on the Desolator, he will not shoot at all when deployed.

What follows are unmodified quotes of the key posts by Renegade from the original thread at DeeZire, found here, as well as Mecci100's "accidental" confirmation, here.


Post #1 by Renegade:



Okay kids, you know I only start threads on special occasions, so it's time for you to go "uh-oh" now.
'till about half an hour ago, I've had a weird bug in TD: Whenever I deployed an InfantryType, after exactly 30 seconds game-time (counted by the paradrop's timer), the deployed infantry would start shooting next to it, without any reason to do so. The only exceptions were the GGI and the Desolator. While the former seemed totally unharmed, the latter would not fire at all when deployed.
After an hour of testing today, I realized that ImmuneToRadiation was causing the problem. I had made the Sniper, the GGI and the normal GI ImmuneToRadiation=yes, while the Desolator was "no" now.
After I commented out the flags on the first three and made the Deso "yes" again, everything worked fine.
This suggests:
- ImmuneToRadiation=yes on normal InfantryTypes somehow fucks up the deploy-code, leading to what I dubbed the "Weird Bug".
- ImmuneToRadiation=no on the Deso will prevent him from firing when deployed (note that he does deploy, he just doesn't fire).
- As it still worked fine with immunity, it's probable that the GGI has altered ItR-code as well, perhaps due to the :uncrushability, or because lazy WW copy-pasted some code from the Deso.
Trivia fact: in RULES3, DZ states: "4 - the game is hardcoded to do something if the InfantryType is called DESO but exactly what is not known;". This may be totally unrelated, but given that Deso seems to be the only exclusion, it's interesting nonetheless (note that, while DZ wrote that sentence, YR was not out yet - the GGI didn't exist).


So there. I'd be happy if people could try to varify this discoveries, and I'd like to hear some thoughts on this, as it's pretty #$@! weird, and I don't know what to think of it myself.


More details for those interested:
ImmuneToPsionicWeapons=yes and Assaulter=no were the only other flags I added to the GI/Sniper/GGI. I disabled all of them and reactivated one at a time.
ImmuneToPsionicWeapons=yes
;ImmuneToRadiation=yes ;can NOT be healed
Assaulter=no
works fine, while
ImmuneToPsionicWeapons=yes
ImmuneToRadiation=yes ;can NOT be healed
Assaulter=no
causes the bug. Perhaps it's just a question of combination, but I haven't tried further yet.
Thank you for your attention
Have fun going "wtf?!". Very Happy


Post #2 by Renegade:



I can not. I've changed the radiation to healing - if I can't make certain units immune without breaking them, the change is useless to me.
And I did test just the Deso. It broke as predicted.


Post #3 by Renegade:



If he was not immune, probably. If he shot. Whether he does shoot or not, I will see in a few minutes.
Update: As predicted, DESO stops working as soon as you outcomment ImmuneToRadiation.
Update2: Even more, I've just tried it with a virgin rulesmd, with the only change being that I outcommented ImmuneToRadiation on [DESO]. Same as before. Deploys, but no radiation. It is not my fault. It's not my rules. It's simply bad Westwood-code again.




Post #1 by Mecci100:



Hi All
First time poster.
Recently finished modifing the Rulemd.ini file, and everything seemed to work exactly as was supposed to, except now, after the normal GI unit have been deployed for so long, the seem to open fire on nothing, and just keep shotting at nothing, until undeployed or an enemy wanders by, but carry on shooting unless i interupt.
Thanks in advance.


Post #2 by Mecci100:



DIdn't edit any AI info in rulesmd.ini, and nothing in Art.ini. But here are the GI info.
From Rulesmd.ini file:
; GI ; Allied GI
[E1]
UIName=Name:E1
Name=GI
Image=GI
Category=Soldier
Primary=M60
Secondary=Para
Occupier=yes ; I can Occupy UC buildings
OccupyWeapon=UCPara; The weapon I use while Occupying. Defaults to 0 (Primary)
EliteOccupyWeapon=UCElitePara; The weapon I use while Occupying. Defaults to 0 (Primary)
OpenTransportWeapon=1;defaults to -1 (decide normally) What weapon should I use in a Battle Fortress
Prerequisite=GAPILE
CrushSound=InfantrySquish
Strength=175
Pip=white
OccupyPip=PersonBlue
Armor=none
TechLevel=1
Sight=5
Speed=4
Owner=British,French,Germans,Americans,Alliance
Cost=150
Soylent=100
Points=10
IsSelectableCombatant=yes
VoiceSelect=GISelect
VoiceMove=GIMove
VoiceAttack=GIAttackCommand
VoiceFeedback=GIFear
VoiceSpecialAttack=GIMove
DieSound=GIDie
Locomotor={4A582744-9839-11d1-B709-00A024DDAFD1}
PhysicalSize=1
MovementZone=Infantry
ThreatPosed=10 ; This value MUST be 0 for all building addons
ImmuneToRadiation=yes
ImmuneToVeins=yes
ImmuneToPsionics=yes
Bombable=yes
Deployer=yes
DeployFire=yes
; DeployTime=.022 ; PCG; Unused for now. Was maybe going to make its way in if we did
; a more explicit state machine for deploying b/c of autodeploy.
VeteranAbilities=STRONGER,FIREPOWER,ROF,SIGHT,FASTER
EliteAbilities=SELF_HEAL,STRONGER,FIREPOWER,ROF
Size=1
Crushable=yes
DeploySound=GIDeploy
UndeploySound=GIUndeploy
ElitePrimary=M60E
EliteSecondary=ParaE
IFVMode=2


From Artmd.ini file:
[GI] ; GI
Cameo=GIICON
AltCameo=GIUICO
Sequence=GISequence
Crawls=yes
Remapable=yes
FireUp=2
PrimaryFireFLH=80,0,105
SecondaryFireFLH=80,0,90
[GISequence]
Ready=0,1,1
Guard=0,1,1
Prone=86,1,6
Walk=8,6,6
FireUp=164,6,6
Down=260,2,2
Crawl=86,6,6
Up=276,2,2
FireProne=212,6,6
Idle1=56,15,0,S
Idle2=71,15,0,E
Die1=134,15,0
Die2=149,15,0
Die3=0,1,1
Die4=0,1,1
Die5=0,1,1
Deploy=300,15,0
Deployed=292,1,1
DeployedFire=315,6,6
DeployedIdle=0,0,0
Undeploy=276,2,2
Paradrop=363,1,0
Cheer=364,8,0,E
Panic=8,6,6



(boldness and code-style added for emphazis)


Please note that to achieve the above effect, a deployment like GI must be used. The difference between it and YURI is that UndeployDelay=-1 (which is actually a default behavior) :P

If this Infantry is not [DESO] or has the IsDesolator code provided by Ares (Otherwise, only secondary weapons will be used and there will be some issues) , then its DeployFireWeapon is meaningful, but it does not behave like regular infantry deploy: Infantry will first use their designated weapon to attack, then switch and maintain as a secondary weapon after a period of time. look here

  • Note:This usage method is no longer applicable in Ares 3.0 and later. xD

See Also

DESO

Deployer

DeployFire

UndeployDelay

DeployFireWeapon

ImmuneToRadiation