View Single Post
Old 02-28-2008, 01:27 AM   #1 (permalink)
beng
Senior Member
 
Join Date: Jan 2008
Posts: 708
Default Coding Mistakes and useless things in inis by EA Games

Just thought i would start a thread where we can collate a list of coding mistakes in EA games ini files so we can fix them in mods. I am referring to things like duplicate modules within the same object, bad module tags with spaces in them, duplicate KindOf flags, useless modules with unworkable parameters and so on.

To start the ball rolling, in Zero Hour, DemoGeneral.ini see the bottom of the Demo_GLABarracks object's code block. There are 2 modules that are useless for this object there, they are taken from a GLA worker and in the worker they serve to switch command sets, but the barracks never uses them, so they just sit there wasting CPU cycles checking to see if the user has switched command sets when he will never use them.

Also, Demo_GLAInfantryWorker has a lot of useless modules making him do weaponset upgrades etc in a vain attempt to make him get the terrorist suiciding ability when there is no provision to give him a command to trigger the suicide weapon. There is a Demo_GLAWorkerCommandSetUpgrade in CommandSet.ini but this is not enabled in the worker object code.

Actually a lot of the Demo General's buildings have that useless suicide power, which has a weapon whose radius of damage is so small that it cannot kill any enemies unless theiy are in the middle of the building. Demo_FakeGLACommandCenter for example, uses FakeStructureDetonationWeapon as it's death weapon, and the primary damage radius of that is only 50, whereas the structure is 65 in radius, so the enemy will at most get the secondary damage, which is only 50.

Im Zero Hour FactionBuilding.ini - GLASneakAttackTunnelNetworkStart There are two IMMUNE_TO_CAPTURE flagsin the KindOf list.

In Generals FactionUnit.ini, ChinaTankGattling has two AiUpdateInterface modules and AmericaInfantryRanger has a ProductionUpdate module when it doesn't produce anything. AmericaVehicleHumvee has an AIUpdateInterface as well as a TransportAIUpdate module, the former is redundant.

In Generals and ZH CivilianUnit.ini, Humvee1 and UNSoldier both are lacking the KindOf flag ATTACK_NEEDS_LINE_OF_SIGHT, which makes them shoot through buildings and hills. There is also MilitiaTank which similarly lacks that KindOf, although because it fires projectiles, the shells will hit the obstacles in the way.

CivilianVehiclePTBoat is missing an ExtraPublicBone statement, which results in the Technical gunner being drawn at the object origin rather than attached to the Dum_Turret bone on the deck as it should be.

IN ZH, AmericaVehicleTomahawk, Lazr_AmericaVehicleTomahawk, SupW_AmericaVehicleTomahawk, and AirF_AmericaVehicleTomahawk, all have a CreateCrateDie module whose module tag is "ModuleTag SalvageData" with a space in it. As a result, the game interpretes the module tag as "ModuleTag" and ignores what comes after the space.

AirF_AmericaJetRaptor has two PointDefenseLaserUpdate modules, the second one has the ScanRate = 0

All the American faction aircraft that have CountermeasuresBehavior have
FlareBoneBaseName = Flare
When i have so far not found any aircraft models which have bones named Flare*

The various ScudStormDamageWeapon weapons in weapon.ini all forgot to add NOT_SIMILAR to the RadiusDamageAffects = line, which results in the scud storm projectiles damaging each other as they explode. This usually is ok since they gave the projectiles a very high health, but in mods where i have decreased the health to make the scud storm missiles shootable, they blow each other up.

Last edited by beng; 02-28-2008 at 01:29 AM.
beng is offline   Reply With Quote