29.01.2008, 21:14:24
In no particular order, I'm going to post random things I find in the executable that may not be documented already. Comments welcome, so are inquiries. And if anyone wants to post this stuff on appropriate ModEnc pages, go ahead.
Appendix A: Meteor Shower.
QuantityOfMeteors = MainIntensity + RandomIntensity - 1
Where:
RandomIntensity is a random integer [0..2]
MainIntensity depends on the action's param:
The action's param can be an integer in range [0..4], this corresponds to an array of numbers:
0 - 1 meteor.
1 - 5 meteors.
2 - 9 meteors.
3 - 15 meteors.
4 - 0 meteors.
The spread of the targeted area is also proportional to MainIntensity.
(Technically you can pass different numbers, since it's just indices into memory, but most of the time you will hit huge numbers as a result.)
For each meteor, a random number is picked, if it's even, the meteor will be METSMALL, otherwise, it will be METLARGE.
- AI
- ScriptTypes
- A ScriptType only loads 50 first actions and ignores the rest.
- Unlike most objects, it does care about the indices on the left, meaning it loads actions from 0= to 49= .
- Script Actions 53 and 54 (Gather and Regroup) use [General]->RelaxedStray as their allowed stray distance, the rest use [General]->Stray .
- A ScriptType only loads 50 first actions and ignores the rest.
- TaskForces
- A TaskForce only loads 6 first types of objects and ignores the rest.
- Unlike most objects, it does care about the indices on the left, meaning it loads actions from 0= to 5= .
- Contrary to what DZ says, BuildingTypes are not valid entries. That makes sense, of course.
- A TaskForce only loads 6 first types of objects and ignores the rest.
- AITriggerTypes
- The so called "Unknown flag" is a dud. It's read from the file, but discarded and always set to 0.
- TechLevel is read from the file, but discarded and internally recalculated by finding the max TechLevel from the units in both TaskForces associated with this AITriggerType.
- The long string of mostly zeroes is interpreted as 32 bytes or 8 dwords packed into ASCII hex (there's room for four pairs of "compareArgument,comparator"). I haven't yet located anything else about this, but it doesn't seem the latter ones are actually used, meaning multi-conditional triggers would be unfortunately impossible.
- The so called "Unknown flag" is a dud. It's read from the file, but discarded and always set to 0.
- ScriptTypes
- Maps
- Triggers
- "Repeating" flag does not make any distinction like the older games did (see ModEnc Maps/Triggers for more info), it either repeats or doesn't.
- "Repeating" flag does not make any distinction like the older games did (see ModEnc Maps/Triggers for more info), it either repeats or doesn't.
- Events & Actions
- Events and Actions of a particular Trigger are listed in a comma-separated string in their respective section. The game reads only the first 512 characters of this string, so you should not exceed that. If you need more, use Attached Trigger feature on that particular Trigger.
- Unlike TaskForces/ScriptTypes, there is no hard limit to how many Events or Actions can be attached to a single Trigger.
- Events and Actions of a particular Trigger are listed in a comma-separated string in their respective section. The game reads only the first 512 characters of this string, so you should not exceed that. If you need more, use Attached Trigger feature on that particular Trigger.
- Events
- Event arguments
- INI format is "eventId=countEvents,listOfEvents", where listOfEvents is a comma-separated list of "eventType,arg1,arg2" and optional ",arg3".
- The first argument, arg1, describes the kind of data arg2 and arg3 hold:
- arg1 == 0: arg2 is a number, arg3 is not present.
- arg1 == 1: arg2 is a string, arg3 is not present.
- arg1 == 2: arg2 is a number, arg3 is a string.
- arg1 == 0: arg2 is a number, arg3 is not present.
- The second argument, arg2, is the actual condition.
- If it's a number, it's treated like one or as an index into the [Houses] list, depending on the event type.
- If it's a string, it's a reference to a TeamType and can state either its ID("AF3456BH-G"), or its Name=, provided it has no commas.
- If it's a number, it's treated like one or as an index into the [Houses] list, depending on the event type.
- The third argument, arg3, is only parsed if arg1 is 2. It is always treated as an object's ID and as such truncated to 24 characters.
- The first argument, arg1, describes the kind of data arg2 and arg3 hold:
- INI format is "eventId=countEvents,listOfEvents", where listOfEvents is a comma-separated list of "eventType,arg1,arg2" and optional ",arg3".
- Actions
- Action arguments
- INI format is "actionId=countActions,listOfActions", where listOfActions is a comma-separated list of "actionType,arg1,arg2,arg3,arg4,arg5,arg6,arg7".
- The first argument, arg1, describes the kind of data arg2 and arg7 hold:
- arg2
- arg1 == 0: arg2 is a number.
- arg1 == 1: arg2 is a reference to a TeamType.
- arg1 == 2: arg2 is a reference to a TriggerType.
- arg1 == 3: arg2 is a reference to a Tag.
- arg1 == 4: arg2 is a simple string.
- arg1 == 5: arg2 is a reference to a TeamType (again).
- arg1 == 6: arg2 is an reference to an entry in [DialogList] (evamd.ini).
- arg1 == 7: arg2 is an reference to an entry in [SoundList] (soundmd.ini).
- arg1 == 8: arg2 is a reference to an entry in [Themes] (thememd.ini).
- arg1 == 9: arg2 is a simple string (again).
- arg1 == 10: arg2 is a string.
- arg1 == 11: arg2 is a number (again).
- arg1 == 0: arg2 is a number.
- arg7
- arg1 == 5: arg7 is a number.
- arg1 == 9: arg7 is a number.
- arg1 == 11: arg7 is a number.
- otherwise: arg7 is a waypoint's textual representation.
- arg1 == 5: arg7 is a number.
- arg2
- The second argument, arg2, is the actual argument.
- If it's referring to a TeamType, TriggerType or a TagType, it is interpreted in two ways:
- if arg2 is longer than four characters, it's treated as an ID ("ACH385-G").
- otherwise it's treated as an index into the [TeamTypes]/[Triggers]/[Tags] list.
- if arg2 is longer than four characters, it's treated as an ID ("ACH385-G").
- If it's referring to a TeamType, TriggerType or a TagType, it is interpreted in two ways:
- The third argument, arg3, is mostly unused, and always interpreted as a number.
- The fourth argument, arg4, is mostly unused, and always interpreted as a number.
- The fifth argument, arg5, is mostly unused, and always interpreted as a number.
- The sixth argument, arg6, is mostly unused, and always interpreted as a number.
- The seventh argument, arg7, is mostly used to refer to a waypoint that's the target of this action, but in certain cases it's a simple number that's an additional parameter for the action. Depends on the action type.
- INI format is "actionId=countActions,listOfActions", where listOfActions is a comma-separated list of "actionType,arg1,arg2,arg3,arg4,arg5,arg6,arg7".
- Specific Action data
- Action 4 - Create Team: Obeys the TeamType's Max= setting.
- Action 7 - Reinforcement: Creates the TeamType regardless of any restrictions.
- Action 42 - Do Explosion At: Actually fires a weapon whose index is given as a param, not a warhead.
- Action 43 - Meteor Impact At: Seems to actually be a "Spawn Voxel Anim At".
- Action 44 - Ion Storm Start: Seems to now do the same as "Lightning Storm Start".
- Action 45 - Ion Storm Stop: Doesn't defer functionality to Lighting Storm, seemingly just clears some internal flag, possibly one that tracks whether an Ion Storm is active.
- Action 58 - Meteor Shower At: Uses a complex system to work out how many meteors to spawn. See appendix A.
- Action 63 - Apply 100 Damage At: Detonates [CombatDamage]->C4Warhead with Damage=100 at the specified waypoint.
- Actions 64 - 66 - (Small|Medium|Large) Light Flash: Pretends to detonate [CombatDamage]->C4Warhead with Damage=(50|100|300) respectively at the specified waypoint, and uses its Bright/CombatLightSize settings to create the flash. No damage is actually dealt as far as I can tell.
- Action 80 - Reinforcement: If [TeamType]->Droppod=yes , then the team is paradropped in by a [PDPLANE]. If possible, the team's script is appended with action 5,0 (Guard Area).
- Action 95 - Trigger Nuke Strike: Fires [NukePayload] at the specified waypoint.
- Action 96 - Fire Chemical Missile: Fires [ChemLauncher] at the specified waypoint. (Doesn't work by default since ChemLauncher is not registered by any object or Weedguy-hack.)
- Action 107 - Reinforcement By Chrono: If possible, the team's script is appended with action 5,0 (Guard Area).
- Action 4 - Create Team: Obeys the TeamType's Max= setting.
- Action arguments
- Event arguments
- Tubes
- A Tube stops reading directions once it has read 99 directions or has found a direction "-1".
- There is no apparent limit of how many tubes a map can contain, but if multiple tubes start at one cell, only the latest one will be actually functional.
- A Tube stops reading directions once it has read 99 directions or has found a direction "-1".
- Map variables
- A map can contain up to a 100 local variables (Map's [VariableNames]).
- A map can contain up to a 50 global variables (Rules [VariableNames]).
- A map can contain up to a 100 local variables (Map's [VariableNames]).
- Houses
- BaseNodes
- A base node can refer to a BuildingType either by its ID or by prefixing its index in the BuildingTypes array with a '-' (minus). The game doesn't drop the '-' away though, so there might be alternative handling involved in this case - needs more testing.
- A base node can refer to a BuildingType either by its ID or by prefixing its index in the BuildingTypes array with a '-' (minus). The game doesn't drop the '-' away though, so there might be alternative handling involved in this case - needs more testing.
- BaseNodes
- Triggers
- Objects
- Common (all INI-loadable types)
- Name= is truncated to 23 characters. So is the ID.
- Name= is truncated to 23 characters. So is the ID.
- Common (InfantryTypes, VehicleTypes, AircraftTypes, BuildingTypes)
- VeteranAbilities= and EliteAbilities= indeed do not stack, as Vinifera7 correctly noted a while ago. However, they do complement each other - when elite, the unit is granted both EliteAbilities and VeteranAbilities, but they are toggles - either "has this ability" or "doesn't have this ability", not "has one level of this or two".
- It seems that setting MobileFire=yes on a unit aloows it to ignore its ammo reload time. (Needs more testing.)
- VeteranAbilities= and EliteAbilities= indeed do not stack, as Vinifera7 correctly noted a while ago. However, they do complement each other - when elite, the unit is granted both EliteAbilities and VeteranAbilities, but they are toggles - either "has this ability" or "doesn't have this ability", not "has one level of this or two".
- [Powerups]
- Powerup-specific data:
- Explosion - uses warhead from [CombatDamage]->C4Warhead.
- Napalm - uses warhead from [CombatDamage]->FlameDamage.
- Squad - activates Money.
- Armor - if this unit has already picked up an Armor crate, activates Money.
- Speed - if this unit has already picked up a Speed crate, activates Money.
- Firepower - if this unit has already picked up a Firepower crate, activates Money.
- ICBM - gives you one shot of the first entry from the [SuperWeaponTypes] which has Type=Nuke.
- Invulnerability - activates Money.
- IonStorm - activates Money.
- Gas - uses a warhead [GAS] (case-insensitive).
- Pod - activates Money.
- Tiberium - randomizes the type of tiberium as well as its amount.
- Explosion - uses warhead from [CombatDamage]->C4Warhead.
- Powerup-specific data:
- Animations
- Adding a valid ExpireAnim= makes the Warhead= and related data work correctly like on debris.
- Adding a valid ExpireAnim= makes the Warhead= and related data work correctly like on debris.
- Common (all INI-loadable types)
Appendix A: Meteor Shower.
QuantityOfMeteors = MainIntensity + RandomIntensity - 1
Where:
RandomIntensity is a random integer [0..2]
MainIntensity depends on the action's param:
The action's param can be an integer in range [0..4], this corresponds to an array of numbers:
0 - 1 meteor.
1 - 5 meteors.
2 - 9 meteors.
3 - 15 meteors.
4 - 0 meteors.
The spread of the targeted area is also proportional to MainIntensity.
(Technically you can pass different numbers, since it's just indices into memory, but most of the time you will hit huge numbers as a result.)
For each meteor, a random number is picked, if it's even, the meteor will be METSMALL, otherwise, it will be METLARGE.