 |
Forum Info
|
 |
Forum Members: 18,537
Total Threads: 8,627
Posts: 94,210
Administrators:
DeeZire, Redemption
There are currently 137 users online.
|
 |
Partner Links
|
 |
 |
Advertisements
|
 |
|
| Generals & Zero Hour Editing Discuss any modding related issues to do with Generals and Zero Hour here. |
02-28-2008, 01:27 AM
|
#1 (permalink)
|
|
Senior Member
Join Date: Jan 2008
Posts: 188
|
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.
|
|
|
02-28-2008, 12:49 PM
|
#2 (permalink)
|
|
Senior Member
Join Date: Jan 2008
Posts: 188
|
The Chinese propaganda centers (for all China generals) have no radar priority. Also it has no death OCL so it does not make pieces of junk when it dies. And it has a useless ArmorUpgrade module, as do all China buildings - they have no upgraded armor set.
Last edited by beng; 02-28-2008 at 01:02 PM.
|
|
|
02-28-2008, 09:10 PM
|
#3 (permalink)
|
|
Junior Member
Join Date: Sep 2007
Posts: 12
|
I think this is a good idea Beng. But things like duplicate stuff I don't think is too important. As long as every thing works & looks good, it probably isn't worth bringing up.
Anyway, the marauder tank turret doesn't turn. I've found that all that needs to be done is pasting the turret code from the scorpion tank in for marauder tank fixes it.
|
|
|
02-29-2008, 01:42 PM
|
#4 (permalink)
|
|
Senior Member
Join Date: Jan 2008
Posts: 188
|
It is important in that the more modules an object has, the more it demands from the CPU. This is why the object CINE_USA04_PARADROP_AmericaInfantryRanger has a lot of modules commented out, with the comment
; - Removed to *hopefully* improve USA04 Framerate.
Because at the start of USA04 there are a load of these objects being dropped by parachute onto the Iranian oil fields, and if they had all their modules they would slow the frame rate down significantly.
Where possible it is good to reduce the number of modules by removing useless ones, and combinig them into single modules that can do the job of 3 or 4 different modules.
For example, all of these 4 modules:
FXListDie
DestroyDie
CreateObjectDie
FireWeaponWhenDead
Can be combined into a single module:
InstantDeathBehavior
FX =
OCL =
Weapon =
You brought up a good point about the Marauder. It is meant to have a turning turret but they forgot to put the Turret code in the AIUpdateInterface module. Adding to that it's jerky locomotor, it makes it waste a lot of time jerking around before it can fire. Also it cannot fire whilst moving, unlike other tanks.
And this is not really that important but have you noticed how when the GLA terrorist explodes by his own action, he does the exploded flailing death animations, but when he is exploded by enemy fire (fire, explosion, or crush type weapons) he does the non-exploded death animations although his dynamite pack goes off?
|
|
|
03-02-2008, 07:49 PM
|
#5 (permalink)
|
|
Super Moderator
Join Date: Feb 2007
Location: USA, although I do not pledge allegiance to it, due to George Bush and his idiot administration.
Posts: 123
|
We left it to Electronic Arts to mess up a good C&C game. This is why I prefered Westwood when they were still the official creators of the series.
__________________
I am not BlueLightning2K6 anymore. I have evolved. The name is now BlueGalactic.
|
|
|
03-02-2008, 10:10 PM
|
#6 (permalink)
|
|
Senior Member
Join Date: Jan 2008
Posts: 188
|
Well it looks like they were pushed for time so they didin't fully test everything before the final release.
Anyway, i found out that the ArmorUpgrade module in Chinese buildings that have no upgrade armor set is not useless after all. It enables the upgrade from standard mines to EMP mines. The Generateminefield behavior is unable to tell the game engine that it needs a second upgrade, so if there is no other module that needs the EMP mines upgrade, it does not let you buy it, saying "conflicting upgrade cannot be purchased".
Another thing i noticed, which is not really a bug, but which does show the concern over having too many modules in objects is the difference between trees in Generals and trees in Zero Hour. In Generals most of the trees can be burnt by fire. In Zero hour only a few types of trees (like the palm trees) can catch fire. Still it looks odd when you drop a fuel air bomb or MOAB in Zero Hour and the buildings are blown to bits and the trees are unaffected.
They cut out some modules from the trees in Zero Hour to try and save frame rate in maps with many trees (hint to map makers: don't put so many trees, just put some to greate a visual effect of a forrest, not an actual forest, like the world builder manual says).
Another thing, i don't know if it is a bug, is that the AmericaInfantryPilot upgrades to a slower locomotor when he has HEROIC veterancy. Maybe the extra rank bar on his uniform is so heavy that it slows down his movement?
|
|
|
03-02-2008, 10:27 PM
|
#7 (permalink)
|
|
Senior Member
Join Date: Jan 2008
Posts: 188
|
In Zero Hour, the AmericaJetCargoPlane (and the corresponding faction versions) the DeliverPayloadAIUpdate module has:
DropDelay = 1000 ; time in between each item dropped (if more than one)
The effect of this is that when you make a map with scripts that do paradrops of reinforcement teams from these planes, they drop their passengers far appart and all over the place and sometimes have to come around several times to try again.
Compare this with the value of 300 for the China and GLA transport planes, which is more sensible. The Generals version of AmericaJetCargoPlane also has DropDelay = 300, i don't know why they changed it for Zero Hour.
Tip for map makers: if making a single player map where Americans do reinforcement team paradrops, you can use a map.ini to mod the American cargo plane to drop at 300ms (or even 150ms) intervals. Otherwise, use a B-52 or a Chinese cargo plane to do the drop.
Last edited by beng; 03-02-2008 at 10:34 PM.
|
|
|
03-02-2008, 11:00 PM
|
#8 (permalink)
|
|
Senior Member
Join Date: Jan 2008
Posts: 188
|
In Zero Hour, in SUUserInterface512.INI, there are two cameo pictures with the same name:
Code:
MappedImage SSRadarVanScan
Texture = SUUserInterface512_004.tga
TextureWidth = 512
TextureHeight = 512
Coords = Left:311 Top:101 Right:371 Bottom:149
Status = NONE
End
MappedImage SSRadarVanScan
Texture = SUUserInterface512_004.tga
TextureWidth = 512
TextureHeight = 512
Coords = Left:249 Top:51 Right:309 Bottom:99
Status = NONE
End
The result is that only the second image (radar van on black background with red circle and green thing) is ever seen in the game. The other image, of a radar van on a black background with blue horizontal circles, is never seen.
To see the images referred to, open English.Big and SUUserInterface512_004.tga in a graphics editor/viewer.
|
|
|
03-04-2008, 08:04 AM
|
#9 (permalink)
|
|
Senior Member
Join Date: Jan 2008
Posts: 188
|
In CommandButton.ini all the buttons associated with firing the particle uplink cannons or laser cannons of the various America generals have two CursorName fields. Only the second one gets used as it overrides the first one.
|
|
|
03-10-2008, 08:29 PM
|
#10 (permalink)
|
|
Senior Member
Join Date: Jan 2008
Posts: 188
|
All the image coords in MappedImage files (the ini files in
\Data\INI\MappedImages\TextureSize_512\ ) are one pixel too great. They started counting from 1,1 as the top left corner instead of 0,0.
As a result, if you look carefully at all the cameo images, you can see either a black strip or a one pixel strip of another image along two edges.
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -4. The time now is 12:53 PM.
|