Sky Demon
16 years ago
I knew there would be problems adding the avenger into C&C Generals, but this is stupid. There are large sections of code in the FactionUnit that prevent the game from using the turret. It's hard to explain verbally throught text, but the image gives away the physical ingame problem I am having😞.

You will notice that even though the avenger has no anti-air turret, they have veterancies. This is because the weapondamagetype (STATUS) in the weapon.ini for the "lasing" weapon (the blue one that is supposed to tag enemies to allow for patriots to shoot at them from great distance and rocket men to fire faster etc etc) isn't allowed.
Basically as I said, it has been accidentally turned into an anti-everything weapon as I tried to get around the problem in the weapon.ini by changing the damagetype to "UNRESISTABLE".


I know this forum is a desert in which replies are rare, but if I were to post the mod as it is... could someone possibly take a look and tell me what they think can be done (short of leaving the Avenger out alltogether!).

Thanks!   TurretLessAvenger.bmp (1,407kb) downloaded 11 time(s).
Sponsor
krit
  • krit
  • 100% (Exalted)
  • Commander in Chief
16 years ago
One thing for certain is that can you at least upload images in JPG format next time? They're much more smaller, does the job and doesn't require us to do any clicking to see them...
UserPostedImage 
CommieDog
16 years ago
There's really no way to get the Avenger's target designator weapon working in vanilla Generals.
UserPostedImage 
CommieDog: Because someone has to do your dirty work for you
Sky Demon
16 years ago
Okay. I have no problem with scrubbing the designator weapon, I never much cared for it anyway.
How's about sacrificing the designator weapon to get the anti-air turret working? Is there any way you can see to make it work that way?

Additional:
Sorry about the .bmp format uploads. I forgot the format generals takes with F12 screenshots. I will remember to print screen and paste into .jpg format in the future. My bad 😞
krit
  • krit
  • 100% (Exalted)
  • Commander in Chief
16 years ago
Would've been easier to just continue using F12 but convert them to JPG later...

But anyway:

Isn't that just simple turret coding? If all else fails, give it something along the lines of an Overlord tank with the Gattling Cannon upgrade. I don't know the specifics so better wait for an actual coder to confirm things.
UserPostedImage 
Sky Demon
16 years ago
Sorry, I forgot to post the mod and then the website wouldn't let me edti->upload it to the post, so I will add it in this one.

Here is the mod if you are interested in trying to get the anti-air part of the avenger working. Thank you.

**EDIT**
Unable to upload the mod file. It is 11MB, I split the file into two. A 4MB and a 6MB and the forum still gave me some form of server error after hanging for ages when uploading.
What is the upload limit on this website?

How else can I get my mod to you? Mail... ?
Sky Demon
16 years ago
I took your advice

give it something along the lines of an Overlord tank with the Gattling Cannon upgrade

and added this to the avengers factionunit.ini code

  Behavior = ObjectCreationUpgrade ModuleTag_24
    UpgradeObject = OCL_AirF_AmericaTankAvengerLaserTurret
    TriggeredBy   = Upgrade_InfantryCaptureBuilding
;    ConflictsWith = Upgrade_ChinaOverlordPropagandaTower Upgrade_ChinaOverlordBattleBunker
  End

The result is shown in the below screenshots. After building the infantry capture upgrade the turret appeared on the avengers and worked, well it shot at airbourne targets.
Although the turret didn't turn and I couldn't order the avenger to "attack" any airbourne targets.
  NoTurret.JPG (349kb) downloaded 4 time(s).   Turret&LaseringAirTargets.JPG (327kb) downloaded 5 time(s).
krit
  • krit
  • 100% (Exalted)
  • Commander in Chief
16 years ago
If I remember correctly, I think the Avenger also had an air targeting dummy weapon much like that of the Combat Chinook and Battle Bus.
UserPostedImage 
Sky Demon
16 years ago
No such luck i'm afraid. I took this from the "Object AirF_AmericaTankAvengerLaserTurret" in FactionUnit.ini

  WeaponSet
    Conditions = None 
    Weapon = PRIMARY AvengerAirLaserOne
    Weapon = SECONDARY AvengerAirLaserTwo
  End
I double checked with the weapon.ini and found both of the two weapons accounted for with all of there requirements (such as FX's etc) in the other respective locations.
CommieDog
16 years ago
Of course the turret doesn't have the dummy weapon. It's the Avenger that the turret is attached to that is supposed to have the dummy weapon.
UserPostedImage 
CommieDog: Because someone has to do your dirty work for you
Sky Demon
16 years ago
Sorry to say your wrong CommieDog. I took this from the "Object AirF_AmericaTankAvenger" in FactionUnit.ini

  WeaponSet
    Conditions = None 
    Weapon = PRIMARY AvengerTargetDesignator
  End
I see no dummy weapon 😞
krit
  • krit
  • 100% (Exalted)
  • Commander in Chief
16 years ago

  WeaponSet
    Conditions = None 
    Weapon = PRIMARY AvengerTargetDesignator
    Weapon = SECONDARY AvengerAirLaserDummy
  End

That was under Object AmericaTankAvenger
UserPostedImage 
Sky Demon
16 years ago
Damn, that's wierd. Why would EA leave it out of the airforcegenerals avenger?
Anyways I will add it in and add the airlaser dummy weapon and see what happens.

Thanks. I will reply back with an Edit soon.

**EDIT**
Ahh damn it. You must have a patched version of ZH or something. Because I have been taking these files straight of the ZH disks.

I can't find anything along the lines of "AvengerAirLaserDummy" in the ZH weapon.ini
Krit could you please provide the weaponcode? Thanks again.
krit
  • krit
  • 100% (Exalted)
  • Commander in Chief
16 years ago

Weapon AvengerAirLaserDummy 
  PrimaryDamage = 0.0001 
  PrimaryDamageRadius = 0.0 
  AttackRange = 175.0 
  DamageType = SMALL_ARMS 
  DeathType = NORMAL 
  WeaponSpeed = 999999.0 
  ProjectileObject = NONE 
  RadiusDamageAffects = ALLIES ENEMIES NEUTRALS 
  DelayBetweenShots = 200 
  ClipSize = 0 
  ClipReloadTime = 0 
  AntiAirborneVehicle = Yes 
  AntiAirborneInfantry = No 
  AntiGround = No 
  ProjectileCollidesWith = ENEMIES STRUCTURES WALLS SHRUBBERY 
End

UserPostedImage 
Sky Demon
16 years ago
the code you provided works perfect as expected. But you mentioned a combat chinook air dummy. Please could you provide that as well.

Thanks
krit
  • krit
  • 100% (Exalted)
  • Commander in Chief
16 years ago
It uses the Chinese Listening Outpost dummy weapon
UserPostedImage 
Sky Demon
16 years ago
Well it doesn't allow for the chinook to "attack" air targets. 😞 Wierd huh?

**EDIT**
Also do you know of an "upgrade" the players always starts with by default. I need one so that the avenger gets the turret everytime it is built. It's unnacceptable to have to actually build an upgrade for the avenger to get the turret.

The closest I found was some unused radar upgrades:
Upgrade_AmericaRadar

Upgrade_GLARadar

Upgrade_CostReduction
None of these worked.
krit
  • krit
  • 100% (Exalted)
  • Commander in Chief
16 years ago
Odd, I remember being able to target air units with the Chinooks... Must be something that was fixed in a patch. As for the auto upgrade... No, not really.
UserPostedImage 
Sky Demon
16 years ago
Ahh damn it. Things look worse and worse.
You know I wanted this entire mod done by Sunday, then Monday, then today. It seems like these problems are gonna keep dragging the deadline on and on. I have many other things I want to do, in fact I got a list. At the top is "Finish AirForceGeneral mod". I don't want any loose ends when I move onto the lower items, one after the other I tell myself.

At this rate, it will be christmas before things are working. Personnally at this point, I don't think this avengers gonna work. THe overlord upgrade things it's best hope of working ingame, but without a starting upgrade, it's stupid.
Perhaps if I made a "dummy" upgrade with a buildtime of 0.1 and a cost of 0 and then added to skirmish and multiplayer scripts to start building the upgrade regardless of map setup. It might work?
krit
  • krit
  • 100% (Exalted)
  • Commander in Chief
16 years ago
At least you didn't have a mod that's been stuck in development for... 4 or 5 years now? Damn, I'm losing count.
UserPostedImage