UPDATE, Mar 13, 2024: I've reworked four of the five C&C FX objects I previously released a half year ago. The most significant changes have been made to the flak barrage object. This update completely replaces the first release.
Get it here:
https://www.mediafire.com/file/avaifewzn5dar2k/%2521_0_CandC_FX_improvements.7z/fileFrom the included,
UPDATED readme file:
Improved FX objects for Command and Control, by WxTech
After trying out the various C&C FX objects, I found issues that I felt could be improved upon. I offer my variations on five of these C&C objects. For some of them the resource consumption has been reduced notably.
I supply also dedicated effects and their resources, so as to eliminate any potential conflicts.
CityLights, City lights (CandC$CityLightsUnit.class)
====================================================
NOTE: NO dependence on plane army; active when PLAYER is within threshold distance.
Creates a group of 30 randomly placed lights, visible when the Sun is below 9 degrees below the horizon (nautical twilight), and when the player is within the threshold line of sight distance of 20km from the object. Formerly were contained within a square of 1.5x1.5km; now have a Gaussian distribution of radius 500m. Formerly limited to City0-City3 map texture slots; now the lights will appear anywhere they're placed (but not on water).
- Implement a Gaussian distribution, with a radius of 500m (68% of lights fall with in 1km diameter circle)
- Raise the lights several meters, so that they do not appear half buried
- Ignore map_T pixel RGB; now ALL areas of a map can have this object placed
- No longer place lights on water
- In the .eff, image of glare mostly fills the texture space, size is set to 5m, perspective compensation distance is 1600m, opacity 0.65
Bomb, "Bomb: Simulates large scale bombing raids" (CandC$BombUnit.class)
========================================================================
NOTE: Dependence on presence of ENEMY BOMBER within threshold distance; set to opposite army from triggering plane.
NOTE2: For WxTech Effects v2.0, calls NEW method, Explosions.generateCandC()
Simulates sticks of bombs, and is activated when an enemy bomber comes to within 10km of the object. This distance is the line of sight (LOS) distance, NOT the distance as projected on the ground. Bomb bursts occur in relatively tight groups of about a half dozen, falling randomly within a 1km square centered on the object. Each burst is randomly assigned a Power value of between 40 to 250, roughly equivalent to mass, and will damage/destroy objects.
- Restored the 10km line of sight distance at which the effect initiates
- Restored the original dependence on TypeBomber; only bombers getting to within the 10km line of sight distance will trigger bursts
- GREATLY reduced the number of fires/smokes (these effects are not tied to any actual destroyed object)
- Randomized the size of these fires/smokes
- Assign to all fires a smoke column, as opposed to the 25% previously
- Removed the dependence on map_T RGB values for fire/smoke (formerly occurred only on City0-City3 texture slots)
- fire/smoke effects are now limited to land; cannot occur on water
- Randomize and increase power for both effects and destruction, but reduced the range for blast effect
- Increased the areal coverage possible for each group of related bursts, from 40m square to 200m square
Box, Flak barrage (CandC$BoxUnit.class)
=======================================
NOTE: Dependence on presence of ENEMY PLANE within threshold distance; set to opposite army from triggering plane
Simulates a flak barrage of roughly 1 burst per second when any enemy plane gets to within a threshold distance of the object. Bursts occurs always directly above the object, the height of bursts following that of the triggering plane. Formerly the bursts were limited to a box of horizontal size 1x1km and depth 300m (+-150m of the plane altitude) at all altitudes. And the same frequency of bursts was maintained at all heights. Now the dimensions of the box increase with height; near ground level, 1x1km and 1-sigma vertical dispersion of 75m; at 10km, 4x4km and 1-sigma vertical dispersion of 188m. Moreover, the burst frequency increases with height, so as to partly compensate for the much larger box volume; from ground level to 10km altitude the burst frequency increases linearly by a factor of 4. The Power and powerRadius values for the explosion are 0.9 and 30, respectively; formerly the powerType was 0 (blast effect), but now it's 1 (splinters); should cause damage. Formerly the triggering threshold was a constant line of sight distance of 10km (this is bad!); I've altered the calculation to consider the ground distance. Moreover, the triggering distance varies with height, from ground level to a height of 10km the threshold distance (as measured along the surface) varies linearly from 2.5km to 10km.
- Made it impossible for bursts to occur beneath the surface
- Apply a Gaussian distribution to vertical dispersion of bursts
- Increase the size of the bounding box within which bursts occur as the height increases
- Altered the threshold distance consideration from line of sight to ground distance, and increase this with height
- Increase the burst frequency with increasing height, to partly compensate for the increasing box volume
- Disabled lightpointactor here; use whatever illumination code is present in Explosions.AirFlak()
BRG, "Barrage: Explosions over a 1x1km area" (CandC$BRGUnit.class)
==================================================================
NOTE: NO dependence on plane army; active when PLAYER is within threshold distance.
NOTE2: For WxTech Effects v2.0, calls NEW method, Explosions.generateCandC()
Simulates an artillery barrage of moderate calibre (roughly 15kg explosive charge). Formerly occurred within a 200x200m box (the description incorrectly stated a 1x1km box), but now occurs within a 1-sigma radius of 200m (Gaussian distribution). Activated when the player gets to within the threshold line of sight (LOS) distance of 7.5km (formerly 10km). Each burst occurs in isolation, falling randomly anywhere within the potential area of coverage. Some fraction of the bursts occur up to 5m above the surface. The assigned Power for each burst varies from 7 to 30, which is roughly equivalent to the mass of the explosive charge; will damage/destroy objects.
- Reduced threshold line of sight distance for activation, from 10km to 7.5km
- Implemented a Gaussian distribution, with a radius of 200m (68% of bursts occur in a 400m diameter circle)
- Randomized and increased power for both effects and destruction, but reduced the range for blast effect
Fire, City fires (CandC$FireUnit.class)
=======================================
NOTE: Dependence on presence of ENEMY BOMBER within threshold distance; set to opposite army from triggering plane
Simulates large scale burning after significant bombing or arty barrages. Activated when any enemy bomber gets to within the threshold line of sight distance of 10km. Formerly limited to a 500x500m square, but now has a Gaussian distribution of radius 250m. Formerly as many as 400 (!) fires could be active at any one time; now that number is about 70. Formerly all fires had the same size; now they have a randomized size. Formerly only fire (no smoke) was generated; now a small fraction of fires are larger, have a smoke column, and last 2X longer.
- Randomized the size of the fires
- Distribute fires as a Gaussian, with a radius of 250m (68% of fires occur inside a circle of 500m diameter)
- Fires can no longer appear on water
- Shortened the fire live time from 600s to 100s so as to control the maximum number of fires; now about 67 after 100s as opposed to ~400 (!) after 600s
- Create a larger fire with smoke column for 5% of occurrences, but last 200s (2X longer), meaning 10% of total at any one moment
- Restored the dependence on TypeBomber; only enemy bombers within the threshold distance can initiate the object
CandC$CityLightsUnit.class
6B8055C65151794E
CandC$BombUnit.class
AB70ADBCA9105140
CandC$BoxUnit.class
B430773050D433BA
CandC$BRGUnit.class
2C3BE90045C3371A
CandC$FireUnit.class
F13E21DED0DE6DD8
WxTech,
Sept 1, 2023
Mar 12, 2024