ModEnc is currently in Maintenance Mode: Changes could occur at any given moment, without advance warning.

ShakeScreen

From ModEnc
(Redirected from ShakeYhi)
Jump to navigation Jump to search


A series of effects that cause the screen to shake.


Global Flag

Tiberian Dawn The Covert Operations Red Alert Counterstrike Aftermath Tiberian Sun Firestorm HyperPatch Red Alert 2 Yuri's Revenge Ares Generals Zero Hour Tiberium Wars Kane's Wrath
Flag: ShakeScreen
File(s): rules(md).ini
Values: Unsigned integers: All non-negative whole numbers from 0 to either 32767, 2147483647 or 4294967295.
Applicable to: AudioVisual

Logic related to ShakeScreen, as a whole or in part, is obsolete in Tiberian Sun, Red Alert 2 and/or Yuri's Revenge.



Originally intended effect

The object's Strength value is divided by this threshold value. If the result exceeds 1, the screen will shake locally upon the object's destruction (only if the destruction occurs within the screen area). In other words, bigger objects cause local screen shaking.

Actual effect

Although this flag is valid and parsed in Tiberian Sun and Red Alert 2, it no longer has any effect in game, as the routine in the game code that actually shakes the screen has been removed.

Bugs/Side-Effects/Unexpected Limitations

However, because the division calculation still exists, you cannot set it to 0, otherwise it will trigger EIP#00441C28.

Warhead Flag

Tiberian Dawn The Covert Operations Red Alert Counterstrike Aftermath Tiberian Sun Firestorm HyperPatch Red Alert 2 Yuri's Revenge Ares Generals Zero Hour Tiberium Wars Kane's Wrath
Flag: ShakeXlo, ShakeXhi, ShakeYlo, ShakeYhi
File(s): rules(md).ini
Values: Signed integers: All whole numbers from -2147483648 to 2147483647; in rare cases, only from -32768 to 32767.
Default: 0
Applicable to: Warheads


Starting from Red Alert 2, this effect can be controlled using the new screen shaking flags Shake(X/Y)(lo/hi) which are defined on warheads detonated by a weapon[1].

Specifically, there are the following 4 flags:

[SOMEWARHEAD]          ; WarheadType
ShakeXlo=0              ; integer
ShakeXhi=0              ; integer
ShakeYlo=0              ; integer
ShakeYhi=0              ; integer

Where X and Y represent direction:

  • X = screen horizontal direction
  • Y = screen vertical direction

Where lo and hi correspond to min and max.

  • The degree of shake for a specific direction will take a value from this range, which also controls the initial direction of the shake. Therefore, if at a position close to 0, the interval between lo and hi is very small, it may cause the shake not to occur.

Notes

Unlike the obsolete global flag ShakeScreen, this effect on the warhead is globally effective, which meaning whenever a weapon detonates and triggers this effect, all players on the map are affected, not just those for whom the detonation site is within their view.

Bugs/Side-Effects/Unexpected Limitations

This effect is directly implemented using the program's own rendering system, which leads to a problem: as long as the game runs one step, the shaking effect that hasn't ended will execute one step. Therefore, if at the end of a game session there happens to be a shaking still in progress, then even when exiting to the settlement screen or main menu, it will execute one step each time the screen switches. If entering the next game session, then at the beginning of the game, the remaining shaking effect will be executed.

  • Although external clients like XNA CNCNet Client usually close gamemd.exe when ending a skirmish/multiplayer session, for SL and campaign modes, it still cannot be avoided.

Footnotes

  1. This effect only applies to those warheads that are invoked by the weapon.

References

Starting from Phobos Build#28, this can also be subject to restrictions. Refer to Phobos documentation.

See Also