Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Combat Lighting
This thread is for the purpose of research into combat lighting.

V7's Combat Lighting Test

This test was conducted to formally gather data regarding the way Bright (for weapons and warheads) and Bullets effect combat lighting.

I performed two sets of tests for each combination; one with Damage=500 and one with Damage=1. This was done in YR1.001 and repeated in FS2.0 (sorry if that's not the latest patch).

Raw Data

[weapon]->Bright=yes (1)
[warhead]->Bright=yes (2)
[warhead]->Bullets=yes (3)

Flags                Observed Effects
A. _ _ _    ->        no combat light
B. 1 _ _    ->        combat light, size based on damage
C. _ 2 _    ->        no combat light
D. _ _ 3    ->        no combat light
E. 1 2 _    ->        combat light, size based on damage
F. 1 _ 3    ->        combat light, size based on damage
G. _ 2 3    ->        no combat light
H. 1 2 3    ->        combat light, size based on damage

It is assumed that Bright and Bullets default to no. This is essentially confirmed in test A.


Only [weapon]->Bright=yes generates combat lighting. [warhead]->Bright and [warhead]->Bullets seem to have no effect.
[Image: alexstand1.gif]
Bullets= is indeed unused. The Bright brothers are more complex (and stupid). I looked into this part a while ago when Marshall asked me to.

A Combat Light flash is generated by a function that is told how much damage was dealt (before any verses or other stuff), the Warhead to use, which shades to disable (same as CLDisablexx most of the time), and a bool to force a flash even without the warhead's approval. (Is Department Of Redundancy Department hiring?)

When a weapon is fired, it creates a Bullet (projectile). It is told, among other things, the Warhead to use on impact, the maximum Speed , and "Brightness" (in most cases that is Weapon->Bright).

When a bullet impacts, if it was given a "Brightness" of true, it calls on the flash maker function. It gives that function the right damage, the right warhead, the right CL flags, but tells it to force a flash. Hence, Warhead->Bright is ignored in this case.

When a bullet airbursts, it spawns child projectiles. But those projectiles are always told "Speed = 50, Brightness = 0". IOW, airburst weapons never get flashes even when the INI code tells them to.
Cluster weapons receive the correct settings though.

Projectiles are also created without firing a weapon:
NukeMaker=yes spawns a Bullet which takes its stats from [NukePayload], but "Brightness = 1".

Flashes are also created without a projectile, and these do obey Warhead->Bright most of the time:
An expiring Animation with an ExpireAnim and Warhead set - Animation->Damage, Animation->Warhead, obeys Warhead settings.
An activating Laser Fence post killing a unit - Unit->Health, Rules->C4Warhead, obeys.
Unit collecting Crate containing Explosives - Unit->Health, Rules->C4Warhead, obeys.
Old hardcoded IonCannon firing - Rules->IonCannonDamage, Rules->IonCannonWarhead, obeys.
Map Actions "Small/Medium/Large Light Flash" - 50/100/300, Rules->C4Warhead, obeys.
Map Action "Do Explosion" - assignedWeapon->Damage, assignedWeapon->Warhead, obeys.
Bullet hitting an Iron Curtained unit - Bullet->Damage * 2, Bullet->Warhead, forces a Red flash.
(What I assume to be) Magnetron dropping a unit on an obstacle - Unit->Health, Rules->C4Warhead, obeys.
Voxel Anim on impact - VoxelAnim->Damage, VoxelAnim->Warhead, obeys.
So in other words, for projectile firing weapons, weapon->Bright is used. But when a warhead is invoked without the presence of a projectile, then warhead->Bright is obeyed.

WW could have just make warhead->Bright work for all cases..
[Image: alexstand1.gif]
They couldn't do that, on the grounds that it might have been helpful.
Ever wondered what the hell is going on?
Believe me friend you're not the only one.

Check out Launch Base for RA2/YR -
Also home to the Purple Alert mod, 1.002 UMP, and the YR Playlist Manager.

Users browsing this thread: 1 Guest(s)