The annoying bug of the threat rings/circles on 128 theaters

Terrain / Theater editing

Moderators: Lone Wolf, Snake Man

Closter
Captain
Posts: 154
Joined: 2007-01-07 00:13:42

The annoying bug of the threat rings/circles on 128 theaters

Post by Closter » 2007-03-20 18:43:05

(:D Sounds like a bad movie's title)

This thing is killing me, I don't understand why is not working for 128 but 64 theaters in SP4. Nevertheless, AF is able to do it work.

Sylvain Gagnon talked about it time ago. He's referring to RP5, but I doubt this was very different later. Here it is:
Objectives:

As said earlier, objectives will now use visual detection in kilometers instead of feet. So this was fixed.

Stealth flight would be detected at half the normal detection range for the objective. If the objective had an electronique detection range of 200 KM, they would detect stealth aircraft at 100 KM. That's way too high. Now they detect at their visual detection range only.

The objective's altitude weren't taken into consideration when finding the detection range based on altitude. Might not mean much for high altitude flight but for flights near the objective's altitude, it can make a big difference.

Beside the SOJ code I mentioned in a previous article, that's the basis of the changes made to the objective's detection code. But the following is important to understand to understand what limits the detection capability of objectives and units.

It was found that the objective detection distance was stored within the 'new_te.tac' and the .cam file. Each objective there has an array of 8 floating point numbers representing a ratio against a base altitude of 2500 feet for each octant (45 degrees) of lateral coverage (thus covering 360 degrees) FOR THAT OBJECTIVE. The radar map in the UI also uses that array but with a base altitude of 5000 feet. That's why the purple circles have different radius for slices of 45 degrees for some objectives (and units but I'll get to these later). That's to simulate pseudo terrain masking while in 2D. The former was then upped to 5000 feet (from 2500 feet) to match the map display. This will allow for easier tweaking of these later on.

To get the 'range' the objective can see, the altitude of the target is divided by the corresponding octant. If for example it had 0.02 in the first octant, a target was coming from the north (first octant used) and the target's altitude was 3000 feet higher than the objective, the objective could potientially see up to 150000 feet away. If it the target was coming from the south (fourth octant) and it had 2 in that octant, it could see only if within 1500 feet, simulating terrain masking (ie, something at that altitude is bloking the objective).

There is one BIG problem here, some octant have ZERO for a value and no check for zero were made. Floating point divide by zero do not generate a CTD but leaves 'Infinite' in the floating point register. F4 interpreted this as if the objective had infinite detection, although the REVERSE was what they were trying to do (ie, no detection in this octant). This was also fixed.

Take the 0.02 example again, if you were to fly at 40,000 feet, this would give the objective a detection capacity of 330 KM which might not be valid for that objective (weak radar) so this range is then 'clipped' by the objective type detection range stored in the Falcon4.OCD file. If this said 100 KM for that objective type, then 330 KM would become 100 KM but if the calculated range was 50 KM instead of 330 KM, it would remain 50 KM (the lower of both is kept).

I hope I didn't bore you with this mumbo jumbo but even if I did, it's important to know :-) since ground units limits its detection range using the octant value of the nearest objective to simulate them being block by terrain as well. They cannot put this within the unit like they do for objectives since it (the unit) can move to any place on the map, so using the octant value of the nearest objective was the easiest and less FPS way of doing terrain masking for units.

Now knowing this, campaign files can be tweaked to adjust these detection because it was found that errors exists within many objectives octant array. HAVING SAID THIS (just thought of this), I'M NOT SURE IF THE TERRAIN DEVELOPER WHERE AWARE OF THIS FACT. IF NOT, THEIR TERRAIN MASKING IS NOT ACCURATE FOR THEIR THEATER. Every objectives, be it a airport, a factory, a bridge or a road has this octant array. This is a tedious job but I beleive these needs to be revaluated to make sure they represent the terrain masking of the particular theater.

So to recap, objective can 'see' no more than their detection range, or the calculated range using the target's altitude and the objective associated octant array. Ground units will limit their detection by using the octant array of an objectives within 1 KM of it as well.

That will be it for this article. Next one will talk about the detection range of units now that ground work as been laid.
It's long but it says important things:

- The radar threat circles are made essentially from a per-objective array, where there are eight values, one per each octant. These eight values are linked to every 45 degrees around the objective.

-These values are saved in the te_new.tac or saveX.cam

-Each unit gets its threat circles from this array, from the nearest objective, simulating terrain masking.

-I'd say this has little or nothing to do with the .MEA file. Perhaps another way to calculate.

The original thread:


http://forums.frugalsworld.com/vbb/show ... 875&page=2
Image

T_Rex
FreeFalcon
Posts: 848
Joined: 2001-03-04 23:01:01
Location: here

Post by T_Rex » 2007-03-20 18:46:10

Are you talking about the threat rings causing CTDs? I think that's been fixed in RV. :)

Dunno about OF.
Sic Semper tyrannosauro.

Closter
Captain
Posts: 154
Joined: 2007-01-07 00:13:42

Post by Closter » 2007-03-20 19:08:29

Yes, Snakeman keeps talking about the need of disabling the threat radar rings in the UI, but I think is not needed anymore, or at least it is better to leave the installer or the user make the choice.

Besides that, I have seen now that Tacedit make use of the .mea for Calculate Radars option. So it has SOMETHING to do :oops: . And the Objective window allow Edit radars, meaning edit the eight values of the octants...
Image

ranger822
Banned user
Posts: 389
Joined: 2004-07-27 22:01:01
Gaming Interests: Falcon 4.0
Editing Interests: All, I (try) to edit everything.
Location: Beautiful Virginia

Threat Ring Fix

Post by ranger822 » 2007-03-20 20:05:46

Not sure if this is the fix you need or are talking about but Fred Balding came up with something for Falklands 128 . . .
The 128 theaters, in order to avoid a CTD, commented out the Threat Circle options in the theater map popup menu (right-click). To put them back into the menu, remove all the "#" in the art<theater>\art\planner\map.pop file.

I don't expect that I will be able to fix any ATO mission creation problems resulting from the 128 theater's long range to target. I would guess the effects of this problem can be decreased by not placing squadrons on distant airbases.

Return to “Terrain / Theater”

Who is online

Users browsing this forum: ClaudeBot [Bot] and 0 guests