ModEnc is currently in Maintenance Mode: Changes could occur at any given moment, without advance warning.
Crater
Jump to navigation
Jump to search
| Flag: | Crater |
| File(s): | rules(md).ini for SmudgeTypes, art(md).ini for Animations |
| Values: | Boolean values: yes or no, true or false, 1 or 0 |
| Default: | no |
| Applicable to: | SmudgeTypes, Animations |
On SmudgeTypes
Specifies whether or not this smudge is a crater, i.e. produced by animations with Crater=yes as described below.
On Animations
Specifies if this animation should leave behind a crater smudge. Which smudge type to place is decided according to the formula below.
Formula
When an Animation has a spatial height below 30 leptons, it checks for the presence of Scorch=yes:
- If Scorch=yes, then check the value of Crater=:
- If Crater=yes, there is a probability of
1073741824 / 2147483647 ≈ 0.5000000002328306to attempt to create SmudgeTypes with Crater=yes, using the following rules:- Before creation, remove 6 layers of Tiberium OverlayTypes (if any) in the cell[1].
- Then randomly create a Crater, first checking the state of the target cell:
- The cell is within the currently visible area of the map (In Radar).
- The terrain in the cell is not a slope.
- There is no SmudgeType or OverlayType on the cell.
- If ForceBigCraters=no, then avoid cells containing BuildingTypes.
- The TileSet type used by the cell is Morphable=yes.
- Then collect all SmudgeTypes with Crater=yes into the first layer list.
- If ForceBigCraters=no, which SmudgeTypes can enter the second layer list depends on the dimensions of the middle frame[2]. If the width is greater than 60 and the height is greater than 50[3], then all SmudgeTypes can enter. Otherwise, only SmudgeTypes with Width=1 and Height=1 can enter.
- If ForceBigCraters=yes[4], only SmudgeTypes of size 2x2 or larger enter the second layer list.
- At this point, if there are insufficient empty cells to place SmudgeTypes of size 2x2 or larger, it will fall back to the first layer list for random selection.
- Meanwhile, there is another probability of
1073741823/2147483647 ≈ 0.4999999997671694to attempt to create SmudgeTypes with Burn=yes, using rules similar to those for creating SmudgeTypes with Crater=yes, but always avoiding cells containing BuildingTypes. - If Crater=no, then
100%to attempt to create SmudgeTypes with Burn=yes, with the rules as above;
- If Crater=yes, there is a probability of
- If Scorch=no, then check the value of Crater=:
- If Crater=yes, then
100%to attempt to create SmudgeTypes with Crater=yes, with the rules as above; - If Crater=no, then end the judgment and do not create any SmudgeTypes.
- If Crater=yes, then
SmudgeTypes are created when the Shape file plays to the middle frame[5]. In other words, for an Animation with a Loop, it will attempt to create once every time it reaches the corresponding frame in the cycle defined by LoopCount=.
Footnotes
- ↑ This also means that if the Tiberium is removed to the point of complete destruction, allowing SmudgeTypes to be created, the created one must be a Crater rather than a Burn Marker, because only the branch for creating the former has the operation of removing Tiberium before creation.
- ↑ For Shape files with an even total frame count, it is the frame that is later in the middle, e.g., for a shape file with a total length of 12 frames, it is the 7th frame (1-based).
- ↑ For Tiberian Sun and Firestorm, it requires width greater than 48 and height greater than 40.
- ↑
The part related to ForceBigCraters=yes is only valid in Red Alert 2 and Yuri's Revenge.
- ↑ For shape files with an even total frame count, it is at the end of the frame just before the middle; for example, for a shape file with a total length of 12 frames, it is at the end of the 6th frame and before the 7th frame starts playing (1-based). That is to say, if this Animation has End= restricting the playback sequence, then End= must be at least 6 for SmudgeTypes to be created normally.