Welcome Guest ( Log In | Register )

IPB
15 Pages V   1 2 3 > »   
Reply to this topicStart new topic
> Coding Mistakes and useless things in inis by EA Games
Rating 5 V
Yayo01
post Jan 28 2009, 04:16 PM
Post #1
Sergeant 1st Class
Group Icon
Group: Members
Posts: 125
Joined: 24-January 09
Member No.: 3,811
Since DeeZire.net will get shutted down forever (i hope not). I will try to salvage all the things beng, me and the others posted on the board at DZ. 
Original thread before it disappears: http://www.deezire.net/forums/generals-zer...s-ea-games.html


Guys, help me out salvaging this interesting bug list thread made for ZeroHour.

QUOTE (beng)
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.



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.


This post has been edited by Yayo01: Jan 28 2009, 04:21 PM
Go to the top of the page
 
: | +Quote Post
Beng
post Jan 29 2009, 03:54 AM
Post #2
Brigadier General
Group Icon
Group: Senior Staff
Posts: 1,166
Joined: 14-June 06
Member No.: 811
Deezire really is a useful resource, lots of modding info that is found nowhere else is there. Really hard to find things like how to make tank tracks move or glass textures on buildings is found there. It might be worth using some website downloading program to download that whole website and save it for future reference. This one for instance:
http://www.httrack.com/
Go to the top of the page
 
: | +Quote Post
roxas
post Jan 29 2009, 08:49 AM
Post #3
Sergeant 1st Class
Group Icon
Group: Junior Staff Member
Posts: 127
Joined: 1-February 08
From: Training with Rainbow Six
Member No.: 2,129
Here's more.

And it has a useless ArmorUpgrade module, as do all China buildings - they have no upgraded armor set. 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? 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?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. 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 = NONEEndMappedImage SSRadarVanScan Texture = SUUserInterface512_004.tga TextureWidth = 512 TextureHeight = 512 Coords = Left:249 Top:51 Right:309 Bottom:99 Status = NONEEndThe 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. 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.
-------------
Go to the top of the page
 
: | +Quote Post
Beng
post Jan 29 2009, 06:35 PM
Post #4
Brigadier General
Group Icon
Group: Senior Staff
Posts: 1,166
Joined: 14-June 06
Member No.: 811
Here's a new one: Dragon tanks have a FlammableUpdate module but their armor cannot be damaged by flame, so delete the module, it's useless.

Also, on microwave tanks the tread textures on the front and back of the treads animate backwards! It's hard to see because of the heat particle effect but if you force fire the tank so it turns off the heat weapon, then tell it to move, you can see it, or look at it in a map in worldbuilder.

This post has been edited by Beng: Jan 30 2009, 03:21 AM
Go to the top of the page
 
: | +Quote Post
n5p29
post Jan 30 2009, 07:58 AM
Post #5
Second Lieutenant
Group Icon
Group: Senior Staff
Posts: 305
Joined: 9-October 08
From: Jakarta, Indonesia
Member No.: 3,331
Missile Defender laser guided ability in ZH was intended to have laser-lock FX where a laser pointed to the target then the MD fires rapidly, like in Generals. But not shown because in SpecialAbilityUpdate module the SpecialObjectAttachToBone directed to wrong bone. In there:

CODE
SpecialObjectAttachToBone = Muzzle01


should be:

CODE
SpecialObjectAttachToBone = MuzzleFX01


and the ability will shown like in Generals.

This post has been edited by n5p29: Jan 30 2009, 08:00 AM
-------------
Go to the top of the page
 
: | +Quote Post
n5p29
post Jan 30 2009, 08:11 AM
Post #6
Second Lieutenant
Group Icon
Group: Senior Staff
Posts: 305
Joined: 9-October 08
From: Jakarta, Indonesia
Member No.: 3,331
More backup. I'll show them in quote tag for each post:

QUOTE
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.


QUOTE
Demo_GLAStingerSite has duplicate FireWeaponWhenDeadBehavior modules that both fire Demo_SuicideDynamitePack on DeathTypes = NONE +SUICIDED . One is ModuleTag_Death18 and the other is ModuleTag998.


QUOTE
Tank_ChinaVehicleListeningOutpost and Nuke_ChinaVehicleListeningOutpost have the wrong kind of AI module. They have AssaultTransportAIUpdate when they shold have TransportAIUpdate. The vanilla China and Infantry general's listening outposts have the correct module.

The AssaultTransportAIUpdate is meant for standard troop crawlers or other vehicles that are meant to deploy and thus eject their passengers to attack a target. It is not meant for vehicles which allow the passengers to fire out of them without having to get out of the vehicle.



QUOTE
One thing that really bugs me with Zero Hour is the duplicate objects per each sub-faction. Units generally have faction-related changes, but the vast majority of buildings are no different. It would have made sense to grant each faction their own upgrade (maybe even hard code it, like with veterancy upgrades for example) in order to apply relevant command set upgrades.

As an example, the Supply Drop Zone is no different between any of the four American factions, but each one has their own object.

Given the amount of duplicates, much space is wasted and again CPU usage may be a factor.

Or are the duplicates necessary for AI scripting?

QUOTE
You are right there are a lot of duplicates, many of which are not even used in the game (for example all the different China factions have their own overlord gattling turrets, but their overlord tanks all use the standard China one, and all America factions have their own vehicle drone objects, but their vehicles only use the vanilla America ones).

I guess the plan was that each faction should have their own special types of everything but they did not get round to fully implementing the differences. You see clues that they were meant to be more different than they are in the fact that there are lots of unused sounds, strings, model art, button cameos, etc for different variants of units, like the laser ranger, laser aurora, laser comanche, laser humvee, nuclear tank hunter, hypersonic aurora, laser paladin, etc. I made use of some of these in my Laser-Demo-Nuke mod.

You are also right in the scripting use of these things. Especially in the Generals challenge maps where you have different factions fighting each other, object type lists are used to draw up attack priorities, targets for superweapons, and other things in scripts, so that the computer player can, for example, fire his particle beam at the nearest superweapon object belonging to the human (using an object type list of all the superweapon buildings of all the feactions EXCEPT the type belonging to the computer player's faction, so that he doesn't shoot his own building).

There should have been scripting commands to make this unnecessary (like the ones in the UNUSED script folder which are supposed to let an object use a command button on the nearest enemy object KindOf), but they were not implemented properly in Zero Hour and do not work.



QUOTE
All of the units inside GC_Chem_GLAUnits.ini,GC_Slth_GLAUnits.ini and BossGeneral.ini doesn't properly use the salvage crap.

On the Demo_GLABarracks, On the suicide SlowDeathBehavior. It has the "Fling" code even though the barracks doesn't fly like a terrorist. Even the tanks, vehicles and structures have it.


QUOTE
On the Savalger thing, the standard GLA (and i think all the GLA factions) tunnel network, demotrap, poison fields, ScudStormMissile, all lack SALVAGER KindOf and so do not make junk when they kill vehicles.

While fixing those things, you may also want to add ShroudClearingRange to all poison fields and radiation fields. It is not a bug, but it is better if they have shroud clearing, so that when you have a toxin demotrap or drop an anthrax bomb or explode a toxin factory or bunker, you can see what is being killed by it.

Speaking of the flingforce, have you noticed that terrorists fly up only when they die with death type SUICIDED? They will explode and do damage when SUICIDED CRUSHED SPLATTED LASERED BURNED EXPLODED but will only fly up when SUICIDED. For all the other deaths they just do the normal death animation.

What they should have done was make the slowdeath behavior with the flingforce have DeathTypes for all those deaths, and also have the slowdeath behavior fire the death weapon, instead of using an extra, unnecessary FireWeaponWhenDead module. In many objects they use too many death modules. The more modules an object has, the more it will use up CPU time and make the game lag.

Also, when angry mobs die, they often stay doing the running animation.


QUOTE
More contribution:
1: I don't get why all of the vehicle add-ons (like the overlord gat cannon) have the "PlacementView - *insert angle here* " field.
2: Hulks have the Upgrade cameo and portrait fields
3: Add-ons have upgrade cameo fields. example: Avenger's turret have the upgrade cameo of the propaganda tower etc,


QUOTE
The structures found in GC_Chem_GLABuildings.ini have no subdual code so you cant disable it with any "jammer" weapons.

All radar vans (and i mean ALL) have a turret code, even though it has no weapon to begin with


QUOTE
> 1: Its a different story for vehicles and structure, It does
> nothing to structures. While it just make the vehicle nudge
> abit and make it look strange.

It is dependent on the mass in physicsbehavior. Since vehicles have more mass, they only nudge a bit. To make them move more, increase the flingforce.

As for structures, they have no physicsbahavior so they don't move. If you add physicsbehavior then they can be moved by forces (or locomotors, though that also needs an AI module).

> 1: I don't get why all of the vehicle add-ons (like the overlord
> gat cannon) have the "PlacementView - *insert angle here* "

That is used when you place them in worldbuilder. It is not necessary though.

> 2: Hulks have the Upgrade cameo and portrait fields

I suppose that is in case they are made selectable. It doesn't hurt to have those fields.

> 3: Add-ons have upgrade cameo fields. example: Avenger's
> turret have the upgrade cameo of the propaganda tower etc,

Again it doens't cause problems, although it isn't used since you never select those objects.

About the GC_Chem and GC_Slth etc, those were never finished and are not intended to be used in the game. If you use them, they come with bugs like those you mentioned. The battle bus of the GC_Slth is supposed to disguise like bomb truck, and also be able to throw out demotraps, it does not work.


This post has been edited by n5p29: Jan 30 2009, 08:12 AM
-------------
Go to the top of the page
 
: | +Quote Post
Yayo01
post Feb 1 2009, 11:35 AM
Post #7
Sergeant 1st Class
Group Icon
Group: Members
Posts: 125
Joined: 24-January 09
Member No.: 3,811
Sweet! Thanks guys for helping in salvaging that thread!
Go to the top of the page
 
: | +Quote Post
Beng
post Feb 1 2009, 11:23 PM
Post #8
Brigadier General
Group Icon
Group: Senior Staff
Posts: 1,166
Joined: 14-June 06
Member No.: 811
Here's the whole thread
Attached File(s)
Attached File  DeezireGeneralsBugsThread.zip ( 1.94MB ) Number of downloads: 56
 
Go to the top of the page
 
: | +Quote Post
Yayo01
post Feb 2 2009, 03:05 AM
Post #9
Sergeant 1st Class
Group Icon
Group: Members
Posts: 125
Joined: 24-January 09
Member No.: 3,811
Not a bug but more of a unused feature:

Battledrones lack the welding sparks soundfx much like the IFV repair mode in RA2. To restore the weld sparks sound, Go to SoundEffects.ini then find "RepairSparks".

Then replace it with this:
CODE
AudioEvent RepairSparks
  Sounds = gsparksa gsparksb
  Control = random
  Limit = 4
  Volume = 55
  PitchShift = -10 10
  VolumeShift = -20
  Type = world shrouded everyone
End


Now, when you take a closer look at a battle drone repairing it's "Master", you will hear a "zzzt" sounds.

Now for a bug: Tomahawk and Scud Launchers never drop Salvage crates when killed.

This post has been edited by Yayo01: Feb 2 2009, 03:11 AM
Go to the top of the page
 
: | +Quote Post
n5p29
post Feb 2 2009, 10:27 PM
Post #10
Second Lieutenant
Group Icon
Group: Senior Staff
Posts: 305
Joined: 9-October 08
From: Jakarta, Indonesia
Member No.: 3,331
QUOTE (Beng @ Feb 2 2009, 12:23 PM) *
Here's the whole thread


Thanks beng, now no needs to re-post those pages in here.
Now we can focus on finding new errors.

I found another bug:
Internet Center Satellite Hack I can't detect Command Centers that built after the upgrade purchased.
So if an enemy rebuilt a CC the Internet Center can't detect it. I just found it when I make AI can rebuild their command center.
-------------
Go to the top of the page
 
: | +Quote Post
n5p29
post Feb 3 2009, 05:27 AM
Post #11
Second Lieutenant
Group Icon
Group: Senior Staff
Posts: 305
Joined: 9-October 08
From: Jakarta, Indonesia
Member No.: 3,331
USA Pilots didn't have chemical suits. Maybe that's making they harder to drive their vehicles.

Anyway, DON'T TRY TO FIX THIS!

Try it and you will get an unknown error. That's why my mod is buggy. You can learn something from another people mistakes.
-------------
Go to the top of the page
 
: | +Quote Post
Beng
post Feb 3 2009, 08:00 AM
Post #12
Brigadier General
Group Icon
Group: Senior Staff
Posts: 1,166
Joined: 14-June 06
Member No.: 811
Also, when promoted to heroic, pilots run slower.

Chinese MiG jets have contrial particle systems in ConditionState = REALLYDAMAGED, this makes them make contrails when parked at the airfield. Delete those particle systems! They should only be shown in JETEXHAUST conditions (the mig's REALLYDAMAGED JETEXHAUST is ok).
Go to the top of the page
 
: | +Quote Post

15 Pages V   1 2 3 > » 
Reply to this topicStart new topic

 




HOME 2 3 4 5 6 7 8 9 10