logo   login
right
Home Forums Downloads Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Forum Info
Forum Members: 18,677
Total Threads: 8,798
Posts: 95,842

Administrators:
DeeZire, Redemption

There are currently 35 users online.
Partner Links

Free Credit Repair

Learn the Ticket Broker Secrets
Advertisements

DeeZire Online > Editing Community > Command and Conquer Editing > Generals & Zero Hour Editing » Coding Mistakes and useless things in inis by EA Games

Generals & Zero Hour Editing Discuss any modding related issues to do with Generals and Zero Hour here.

Reply
 
LinkBack Thread Tools
Old 08-10-2008, 07:26 AM   #101 (permalink)
Senior Member
 
Join Date: Jan 2008
Posts: 777
Default

W3D Model Direction Bugs

If you have ever used the AVrepairDr model, you will notice that it's tire bones don't rotate correctly. Instead of rolling on their rims like normal wheels, they spin sideways.

If you have ever tried using UVPowTruck.W3D and tried launching a projectile object that uses MissileAIUpdate from it's MuzzleFX bone, you will have noticed that it shoots out backwards and goes through the POW truck instead of going forwards towards the target.

If you have ever tried to move the aircraft carrier, you will have found that it moves backwards, with the wake particlesystems streaming out forwards in the direction of travel instead of going backwards like normal ship wakes.

If you have tried to make the ambulance gun pitch with TurretPitch = TURRETEL, you will have noticed that instead of pitching up or down, it rolls over on it's side.

If you have ever tried launching projectile objects that use MissileAIUpdate, using a weapon, from the WeaponA* or Missile* bones on the AVWarthog model, you will have seen that the projectiles fly out sideways.

If you have ever tried making the technical gunner able to pitch his gun up or down, you will have noticed that it pitches in the opposite direction, so that when firing at targets above him, he points his gun into the ground, and when firing at targets below him, he points his gun into the air.

The cause of all these bugs is to be found in the direction of pivots and/or bones/sub-objects in the W3D models.

When whoever made those models made them, they must have drawn them facing the wrong direction. In some cases, like with the tires on the AVRepairDr or the Missiles on the AVWarthog, they then rotated the sub-objects to face the right direction, but forgot to set their pivots to the world directions. In other cases, like the aircraft carrier and technical gunner, they didn't even rotate them.

Because of this EA games had to make special provisions in their game engine so that the following could be done:

For the technical gunner, the draw module takes TurretArtAngle to be able to cope with the model being rotated 180 degrees backwards, to make the gunner face the target instead of turning his back to it.

An undocumented parameter, TurretArtPitch, is also available, but when used in conjunction with TurretArtAngle, it has unexpected results. You can to some extent fix it using both TurretArtPitch in the Draw module and NaturalTurretPitch in the AI module, but you have to experiment a lot to get it right. I think in the end i managed to get the gunner to pitch and turn in the right direction but his gun was upside down.

For the aircraft carrier, the existence of carrier wake particle systems in ParticleSystems.ini shows that EA games intended for it to be movable. However, they gave up and made it static.

I partially fixed it in a map.ini by declaring the chassis a turret and using turret art angle to rotate it 180 degrees, and making new particle systems that are not attached to the model, but i had to hide all the sub-objects not attached to the chassis as i could not rotate them.

For the A-10 thunderbolt strike, EA games had to make special functions in their game engine so that the OCL for it could launch the missiles without using a weapon. Intead of firing a weapon, the A10 calls the special game engine code that makes the missiles appear at the bones, then makes them move to the OCL drop location, then makes each missile fire a weapon to do the damage - this is the A10 missile weapon in weapon.ini that only does damage and fires no projectiles. This is also why the A10 does not have a missile weapon in it's weaponset, only the gun.

Compare the A10 strike OCL with the SUPERWEAPONNapalmStrike OCL, which makes the jets fire a weapon from their weaponset to launch the napalm missiles.

Instead of going through all that trouble, all EA games needed to do was fire up their 3D model editing software and rotate the bones and pivots to face the right direction. This suggests that their 3D model making team wasn't talking to their game engine team, perhaps some office politics going on there?

In order to fix the tires on the AVRepairDr, the muzzle on the UVPOWTruck, the TurretEL on AvAmbulance, and the sideways firing missiles on the AVWarthog, do this:

Import model into RenX/Gmax (remember to also do this for the damaged state models).

Click the 3rd tab in the right hand pane, the one which says Hierachy when you mouseover it.

Click the "Affect Pivot Only" button under it.

Select each wrongly pivoted bone individually, do not group select, then click the "Align to World" in the Alignment buttons section in the right hand pane.

Re export to W3D. Problem solved.

To fix the technical gunner and aircraft carrier and other models facing the wrong way, select the whole scene, then use the rotate tool in the top button bar, then manually type in 180 into one of the X Y or Z boxes at the bottom until you get the desired effect, then set all the pivots of all objects to align to world, but not those bones that need to face in non-world directions (like aircraft parking bones or movement bones on airfields).

Next, remember to edit the inis to use the new directions.

Last edited by beng; 08-10-2008 at 07:39 AM..
beng is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-10-2008, 10:09 AM   #102 (permalink)
Senior Member
 
Join Date: Jul 2008
Location: Jakarta, Indonesia
Posts: 298
Default

Another bug: helix cannot attack air unit when upgraded with gattling. You can see the attack cursor, and the helix response with attack voice, but it's just sit in his location and not moving to attack the air target. Strangely, it has dummy weapon to attack air and its gattling has anti-air weapon. Why?
n5p29 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-10-2008, 12:03 PM   #103 (permalink)
Senior Member
 
Join Date: Jan 2008
Posts: 114
Default

Quote:
Originally Posted by n5p29 View Post
Another bug: helix cannot attack air unit when upgraded with gattling. You can see the attack cursor, and the helix response with attack voice, but it's just sit in his location and not moving to attack the air target. Strangely, it has dummy weapon to attack air and its gattling has anti-air weapon. Why?
i'm guessing thats for game balance reasons. gattlings shred all aircraft, and since china already have strong aa defences and strong vehicles, beating a china player with extra strong, self repairing (with a prop tower nearby) AA + AG defences would spoil the point of having specialties.
mikeyc is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-10-2008, 12:42 PM   #104 (permalink)
Senior Member
 
Join Date: Jul 2008
Location: Jakarta, Indonesia
Posts: 298
Default

Maybe, but combat chinook had the same problem. Even you load it with missile defenders and attack an air unit the chinook just sits and not moving. The only way to order the passengers to fire is move the chinook manually to closing the distance so the passengers can attack the air unit. For helixes they can attack air because they had the weapon in their weaponset but they are not responding when ordered to attack air or when there are any enemy aircraft nearby.
n5p29 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-10-2008, 01:42 PM   #105 (permalink)
Senior Member
 
Join Date: Jan 2008
Posts: 114
Default

combat chinooks can attack aircraft if rocket infantry are inside, if you go on the zh options menu and enable dbl click guard option. i'd try explain it better but i'm trying to mod and it keeps crashing at the mo :|

i know its in there somewhere though.
mikeyc is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-10-2008, 11:49 PM   #106 (permalink)
Senior Member
 
Join Date: Jan 2008
Posts: 777
Default

The Helix does not have any weapon to attack air targets, not even a dummy weapon. You are thinlking of Overlord tank, which has the anti-air dummy weapon to make it move closer to air targets when you command it to attack them.

The portable structure Helix carries, ChinaHelixGattlingCannon does have an anti air weapon: GattlingBuildingGunAir, so it should attack air targets that are nearby. Maybe the slow turret turn rate of 60 is tooo slow for it to point at fast moving aircraft? But then overlord gattling also turns at 60. I don't know.

HelixContain is buggy anyway, not as good as overlord contain. It does not pass experience from the gattling to the helix. Maybe another bug it has is not to allow attacking air targets? Try changing the helix to use OverlordContain and give the gattling object a contain module like the bunker so it can still carry units like a helix bunker.

Here is another ini coding error: Object ChinaAirfield has this:

Code:
  Draw = W3DModelDraw ModuleTag_02
    DefaultConditionState
      Model           = None
    End
  End
That seems totally pointless to me.
beng is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-11-2008, 08:26 AM   #107 (permalink)
Senior Member
 
Join Date: Jan 2008
Posts: 777
Default

This is not a bug but a suggestion: remove the prerequisites for objects that have the factories that build them as prerequisites. In that case prerequisites are not needed since you cannot build that object without the factory.

Prerequisites are only needed for sciences, and for objects that need other objects that are not the factories that build them (like you need a palace to build rocket buggies but the palace does not build rocket buggies).

Having unnecessary prerequisites makes things unnecessarily more complicated for modders and map makers who want to enable other factions to build things.
beng is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-11-2008, 08:49 AM   #108 (permalink)
Senior Member
 
Join Date: Jul 2008
Location: Jakarta, Indonesia
Posts: 298
Default

Hey, helix had the dummy air weapon after the gattling upgrade purchased, its gattling also have the same weapons as the overlord. And we shouldn't change the helixcontain to overlordcontain, because when the un-upgraded helix loads something the loaded unit model will stick on the helix not being hidden, and after structure upgrade purchased an empty helix can drop/unload its structure.
n5p29 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-11-2008, 09:08 AM   #109 (permalink)
Senior Member
 
Join Date: Jul 2008
Location: Jakarta, Indonesia
Posts: 298
Default

double post: More details about helix bug. Try giving the helix an AA weapon, the result will be same. To orders helix gattling attacks air, build two helixes, upgrade helix1 with gattling, load up helix2 with something, orders helix1 to attack helix2. Helix1 is not responding, unload helix2 and see helix1 gattling attacks helix2.
n5p29 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-11-2008, 04:32 PM   #110 (permalink)
Senior Member
 
Join Date: Jan 2008
Posts: 777
Default

What version of Zero Hour do you have? Mine is 1.04 and in it, the Helix does not have any dummy air weapon ever. It only ever has HelixMinigunWeapon, no matter what upgrade you purchase.
Code:
  WeaponSet
    Conditions          = None 
    ;----------------------------
    Weapon              = PRIMARY     HelixMinigunWeapon
    PreferredAgainst    = PRIMARY     INFANTRY
    AutoChooseSources   = PRIMARY     FROM_PLAYER FROM_SCRIPT FROM_AI
    ;----------------------------
  End

  WeaponSet
    Conditions          = PLAYER_UPGRADE 
    ;----------------------------
    Weapon              = PRIMARY     HelixMinigunWeapon
    PreferredAgainst    = PRIMARY     INFANTRY
    AutoChooseSources   = PRIMARY     FROM_PLAYER FROM_SCRIPT FROM_AI
    ;----------------------------
  End
Be that as it may, even if the helix does not attack, the gattling inside the helix should attack. That it does not suggests a bug with HelixContain not letting passengers attack air units. If you put rocket soldiers in a helix bunker, and put an enemy comanche or shinook near them, will they attack it?

Combat Chinook uses TransportContain so it's passengers can attack anything.

Come to think of it, the fact that the helix second weaponset has the same weapon as the NONE one indicates that EA games intended to give it the dummy air weapon but then discovered that it cannot attack air targets, so they changed it back to HelixMinigunWeapon without removing the second weaponset.

Last edited by beng; 08-11-2008 at 04:40 PM..
beng is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 09:43 PM.


Design By: Miner Skinz.com
Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.