Sky Demon
16 years ago
The Microwave tanks weapons don't work in anyway like they are supposed to. This is because the "vanilla generals" game engine doesn't support a small pieces of code in both the FactionUnit.ini and the Weapon.ini.
All of the below aren't allowed:

  Behavior = FireWeaponUpdate ModuleTag_22
    Weapon = MicrowaveTankEmitterWeapon
    ExclusiveWeaponDelay = 1000 ; If we fire a real weapon, we turn this module off for this long
  End
USING_WEAPON_C
  DamageType = MICROWAVE
  DamageType = KILL_GARRISONED
  DamageType = SUBDUAL_BUILDING
The final piece of code I mentioned above "DamageType = SUBDUAL_BUILDING" belongs to the "MicrowaveTankBuildingDisabler" weapon, I changed the "DamageType = " to "HACK", just like BlackLotus's vehicle disable weapon uses, but this seemed to do nothing. The Microwave tanks are almost just like my broken avengers, anti-everything weapons.
Instead of clearing out targeted garrisoned buildings, it destroys them at a rate i'd see if I attacked it with 20 rocket men! Meanwhile, a rangers simple "FlashBang" weapon will clear the entire building in one attack.

I find this really bizzare because I changed the "DamageType = KILL_GARRISONED" to the same as the flashbang uses, "SURRENDER". I know my explanation is poor so I hope the attached images will help you understand my problem.

  BrokenMicrowaveTankSS's.zip (2,443kb) downloaded 3 time(s).
Sponsor
CommieDog
16 years ago

The final piece of code I mentioned above "DamageType = SUBDUAL_BUILDING" belongs to the "MicrowaveTankBuildingDisabler" weapon, I changed the "DamageType = " to "HACK", just like BlackLotus's vehicle disable weapon uses, but this seemed to do nothing. The Microwave tanks are almost just like my broken avengers, anti-everything weapons.

Sky Demon wrote:


That's because HACK doesn't have any sort of hard-coded support. Black Lotus doesn't even use the weapon: you can safely delete it with no ill effects.

I find this really bizzare because I changed the "DamageType = KILL_GARRISONED" to the same as the flashbang uses, "SURRENDER". I know my explanation is poor so I hope the attached images will help you understand my problem.

Sky Demon wrote:


Again, SURRENDER doesn't have hard-coded support. The garrison-clearing code is attached to the Flash-bang projectile, not its weapon.
UserPostedImage 
CommieDog: Because someone has to do your dirty work for you
Sky Demon
16 years ago
I tried to add the below to the "MicrowaveDisableStream" in FactionUnit.ini in the hope that it would get the MicrowaveTankBuildingClearer working. It changed nothing.

;  Behavior = DumbProjectileBehavior ModuleTag_05
;    ; To tweak a Bezier path, please see GS
;    FirstHeight                     = 50  ; Height of Bezier control points above highest intervening terrain
;    SecondHeight                    = 150
;    FirstPercentIndent              = 30% ; Percentage of shot distance control points are placed
;    SecondPercentIndent             = 70%
    GarrisonHitKillRequiredKindOf   = INFANTRY
    GarrisonHitKillForbiddenKindOf  = NONE
    GarrisonHitKillCount            = 10  ; ensure that a single grenade clears out all garrisoned buildings.
    GarrisonHitKillFX               = FX_FlashBangGarrisonBuildingHit
;    FlightPathAdjustDistPerSecond   = 0 ; Can allow a max speed this can attempt to follow a target. Units are their velocity we can tag.
  End
CommieDog
16 years ago
You can't add DumbProjectileBehavior to a laser object and expect it to work.
UserPostedImage 
CommieDog: Because someone has to do your dirty work for you
Sky Demon
16 years ago
Please can I forgoe the endless editing of text files, loading of the game and then finding it crashes or doesn't work?

Is there or is there not a way to get ANY of the 3 microwave tanks weapons to work in C&C Generals? If there isn't I will just simply leave the unit out of the game altogether. Although I would prefer it in the game very much 😄
CommieDog
16 years ago
I think that the Microwave Tank's anti-infantry weapon is possible. FireWeaponUpdate should work without the ExclusiveWeaponDelay= line (which you won't need anyway since you can't add the other two weapons).
UserPostedImage 
CommieDog: Because someone has to do your dirty work for you
Sky Demon
16 years ago
You were right. The microwaveemitter weapon does work if the ExclusiveWeaponDelay= is left out. Although there is one more problem with it.

The damagetype microwave isn't allowed and causes the game to crash, so I changed the weapontype to flame. There is no code in the weapon.ini specifying that the weapon can't damage buildings or tanks. So when I park my microwave tank near an enemy structure or unit it cooks them like it does infantry.

The below JPG was taken after the microwave tanks had been there for about 10 to 25 seconds(ish).
  BuildingDamagingMicrowave.JPG (295kb) downloaded 7 time(s).
CommieDog
16 years ago
DamageType=SURRENDER would be a much better fit--the Ranger's flash-bang grenades already use it.
UserPostedImage 
CommieDog: Because someone has to do your dirty work for you
Sky Demon
16 years ago
I am impressed. The MicrowaveEmitterWeapon functions just as it is supposed to ingame, it doesn't cook civilian or enemy buildings/tanks, just men! Thank you CommieDog! 😄
I thought the weapon would never work properly.

However I am still sad to say that in terms of usability the Microwave tank doesn't serve much function ingame unless you were to drive them into the enemies troops. It's almost certain that there is no feasible way to make any of the other two weapons to "work" as they should, which would mean I will have to make it non-buildable 😞
krit
  • krit
  • 100% (Exalted)
  • Commander in Chief
16 years ago

However I am still sad to say that in terms of usability the Microwave tank doesn't serve much function ingame unless you were to drive them into the enemies troops.

Sky Demon wrote:



Long range garrison clearing sounds pretty useful to me, considering it does it outside most infantry's range.

UserPostedImage 
Sky Demon
16 years ago
I am referring in the quoted post to how the Microwaves functionality in "C&C Generals" ("vanilla generals" as it's known) is extremely limited due to technical difficulties regarding "code support".

The result is that in my case, the microwave tanks ONLY weapon that works correctly is the "Emitter" weapon, which kills enemy troops that get to close to the microwave tank.
Sky Demon
16 years ago
I've lost the battle with the games "programming". As long as there is no code support for "Damagetype = Microwave", the other weapons will be either Dummies, doing nothing. Or far to powerfull.

I'm gonna leave the unit out of the games commandsets. Making it non-buildable.
krit
  • krit
  • 100% (Exalted)
  • Commander in Chief
16 years ago
I may have missed this somewhere early on but; why are you porting things to Generals anyway?
UserPostedImage 
Sky Demon
16 years ago
I thank you and CommieDog for your help on this matter, I know CommieDog is working on a much grander mod "The forgotten" for a much more sophisticated game "C&C 3" and that you have a life outside the computer like all of us.


In answer to your question, simply. Because I want to. Because I can't run the full ZH game without such lag it doesn't qualify as a game. I always liked the AirForceGeneral more than the other additions to ZH. If I can't play the full game, then I will bring something from the game I can't play into the game I can play. Why not?
CommieDog
16 years ago

I've lost the battle with the games "programming". As long as there is no code support for "Damagetype = Microwave", the other weapons will be either Dummies, doing nothing. Or far to powerfull.

Sky Demon wrote:



DamageType=SURRENDER would be a much better fit--the Ranger's flash-bang grenades already use it.

CommieDog wrote:


UserPostedImage 
CommieDog: Because someone has to do your dirty work for you
Sky Demon
16 years ago
I did that CommieDog. As I said before, the weapons kill anything they shoot at. Infantry die instantly, and buildings die at the speed you'd only normaly get from a blacknapalm fire from 20 migs.

1 Microwave tank vs 8 crusaders, mine won by far. And belows the code responsible for these doomsday weapons on treads.


Weapon  MicrowaveTankBuildingClearer
  PrimaryDamage         = 1.0 ; Number of passengers to kill with each shot
  PrimaryDamageRadius   = 0.0       ; 0 primary radius means "hits only intended victim"
  AttackRange           = 125.0
  DamageType            = SURRENDER ;KILL_GARRISONED
  DeathType             = NORMAL
  WeaponSpeed           = 999999.0          ; dist/sec (huge value == effectively instant)
  LaserName             = MicrowaveDisableStream
;  LaserBoneName         = WEAPON02
  RadiusDamageAffects   = ALLIES ENEMIES NEUTRALS
  DelayBetweenShots     = 100               ; time between shots, msec
  ClipSize              = 0                    ; how many shots in a Clip (0 == infinite)
  ClipReloadTime        = 0              ; how long to reload a Clip, msec
  AntiAirborneVehicle   = No
  AntiAirborneInfantry  = No
;  FireSound = AngryMobAmbientLoop
;  FireSoundLoopTime = 120                ; loop the firing sound until there's this much delay between shots 
End


Weapon  MicrowaveTankBuildingDisabler
  PrimaryDamage         = 50.0
  PrimaryDamageRadius   = 0.0       ; 0 primary radius means "hits only intended victim"
  AttackRange           = 200.0
  DamageType            = SURRENDER ;SUBDUAL_BUILDING
  DeathType             = NORMAL
  WeaponSpeed           = 999999.0          ; dist/sec (huge value == effectively instant)
  ;WeaponSpeed           = 10.0          ; dist/sec (huge value == effectively instant)
  LaserName             = MicrowaveDisableStream
;  LaserBoneName         = WEAPON02
  RadiusDamageAffects   = ALLIES ENEMIES NEUTRALS
  DelayBetweenShots     = 100               ; time between shots, msec
  ClipSize              = 0                    ; how many shots in a Clip (0 == infinite)
  ClipReloadTime        = 0              ; how long to reload a Clip, msec
  AntiAirborneVehicle   = No
  AntiAirborneInfantry  = No
  FireSound             = MicrowaveWeaponLoop
  FireSoundLoopTime = 120                ; loop the firing sound until there's this much delay between shots 
End
CommieDog
16 years ago
DamageType=SURRENDER was supposed to be for the emitter weapon (the one that can work in Generals), not the other two.
UserPostedImage 
CommieDog: Because someone has to do your dirty work for you
Sky Demon
16 years ago
Sorry I misunderstood, again 😞
Anyways, I left those weapons out and made the Microwave tank unbuildable ingame. After all that work too. Shame, such a waste.

Ahh well what can I do? Short of learn how to program and then break several copyright rules and mod the game engine to allow code support. But I doubt I got time or patience for that.
Sky Demon
16 years ago
The unit is beyond help.

Close topic.
CommieDog
16 years ago
[Topic closed at poster's request]
UserPostedImage 
CommieDog: Because someone has to do your dirty work for you