The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 871 - File: showthread.php PHP 7.4.33 (Linux)
File Line Function
/showthread.php 871 errorHandler->error




Thread Rating:
  • 2 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Random factoids about YR
#1
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.
  • 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 .
    • 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.
    • 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.
  • 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.
    • 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
      • 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.
          • 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.
          • 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.
      • 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).
            • 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.
          • 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.
          • 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.
        • 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).
    • 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.
    • 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]).
    • 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.
  • Objects
    • Common (all INI-loadable types)
      • 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.)
    • [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.
    • Animations
      • Adding a valid ExpireAnim= makes the Warhead= and related data work correctly like on debris.


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.

Worth playing: 1 | 2 | 3
Reply


Messages In This Thread
Random factoids about YR - by DCoder - 29.01.2008, 21:14:24
RE: Random factoids about YR - by Blade - 30.01.2008, 13:43:08
RE: Random factoids about YR - by TSHyper - 30.01.2008, 17:45:49
RE: Random factoids about YR - by DCoder - 31.01.2008, 22:52:13
RE: Random factoids about YR - by TSHyper - 01.02.2008, 20:53:25
RE: Random factoids about YR - by MRMIdAS - 26.08.2008, 02:07:26
RE: Random factoids about YR - by MRMIdAS - 14.06.2009, 02:29:18
RE: Random factoids about YR - by Bobingabout - 01.02.2008, 11:06:42
RE: Random factoids about YR - by gordon-creAtive - 01.02.2008, 12:35:52
RE: Random factoids about YR - by DCoder - 20.02.2008, 22:10:32
RE: Random factoids about YR - by Marshall - 20.02.2008, 23:47:36
RE: Random factoids about YR - by gordon-creAtive - 21.02.2008, 21:22:08
RE: Random factoids about YR - by pd - 22.02.2008, 16:19:57
RE: Random factoids about YR - by TSHyper - 22.02.2008, 18:17:36
RE: Random factoids about YR - by DCoder - 22.02.2008, 18:22:34
RE: Random factoids about YR - by DCoder - 11.03.2008, 21:16:33
RE: Random factoids about YR - by gordon-creAtive - 12.03.2008, 11:37:32
RE: Random factoids about YR - by Vinifera7 - 09.04.2008, 11:19:25
RE: Random factoids about YR - by DCoder - 10.05.2008, 19:10:33
RE: Random factoids about YR - by Guest - 25.08.2008, 13:26:40
RE: Random factoids about YR - by DCoder - 25.08.2008, 15:18:34
RE: Random factoids about YR - by DCoder - 01.03.2009, 22:40:17
RE: Random factoids about YR - by Nighthawk - 08.03.2009, 01:18:12
RE: Random factoids about YR - by DCoder - 08.03.2009, 09:29:45
RE: Random factoids about YR - by AlliedG - 14.06.2009, 00:09:55
RE: Random factoids about YR - by Guest - 29.11.2010, 18:54:08
RE: Random factoids about YR - by DCoder - 30.11.2010, 07:19:14
RE: Random factoids about YR - by lilyroads - 18.07.2011, 15:51:56



Users browsing this thread: 1 Guest(s)