This mod is not maintained, and probably stopped working a long time ago. Do not attempt to use.
This mod is in an early beta. It has not been tested on a larger scale, nor do I have the time or contacts to do so myself, so I’m releasing this early version for you guys to test. Feedback is very welcome!
What it is:
A somewhat simplified RADAR & SONAR system for airplanes and boats.
How it looks:
Example 1 (RADAR, first person)
Example 2 (SONAR, third person)
Download & Installation:
- Download here. (v0.1)
- Extract the InoTechRadar folder into your server’s resources folder. It should look something like this: [1], [2]
- Add “InoTechRadar” to your citmp-server.yml file. It should look something like this.
- Start your server, and you should be good to go!
Requirements & Dependencies:
- None!
Features:
- Tracks other player-controlled aircraft and boats.
- Toggleable interface display, which is maximized while in first person. (See example screenshot #1)
- Different vehicles have different radar ranges and refresh rates. (Military vehicles are generally equipped with much stronger radar, for instance). 2D range checks are used for simplicity’s sake.
- Configurable LoS checks allows for using terrain or buildings to occlude yourself, effectively allowing you to “fly under the radar”.
- Radar targets will be displayed with their callsign, distance, altitude, and velocity. (See example screenshot #1).
- Sonar targets are only displayed as a dot (See example screenshot #2).
- Radar cannot see targets that are submerged, and Sonar can only see other boats and subs.
- A notification appears when you enter a radar capable vehicle.
- Size of the radar scales automatically with your resolution.
Known issues:
- The check for whether something is submerged or not returns questionable values at times, which may lead to aircraft radar incorrectly detecting submarines underwater.
- Does not track NPC vehicles. This is a FiveM limitation as the functions to get all vehicles in an area are not implemented AFAIK. There may be workarounds but I haven’t looked into it too much at this point.
- “This vehicle has radar/sonar capabilities” popup doesn’t properly update the hotkeys if the default hotkey for “Character Wheel” has been changed. This will be fixed in v0.2. (Thanks @Havoc!)
Other notes:
-
A lot of people are likely going to point out discrepancies about these systems compared to their real life counterpart. Many of the decisions made in the design of these systems were made with the gameplay and performance aspects as prio #1. Radar ranges and refresh rates in particular fall into this category.
-
Something I reckon a lot of people will miss is the classic “radar sweep” animation. However, for a smooth sweep animation, I would have to redraw the radar at least some 30+ times per second, which would significantly impact performance. I won’t rule it out for the future, but I’ve decided to take the safe route performance wise for now.
-
Currently, local tests show the radar performing very well, with a total processing time of ~2ms per radar update (which is normally done at most a few times per second).
-
I have a long list of things I’d like to implement in the future. I’ve left my own personal todo at the top of the .lua file which you can look at if you’re interested. It’s not in a very readable format, though, as it was only meant for my own consumption.
-
The default hotkey is the “character wheel” button, which is ALT or down on D-pad by default.
-
Not all airplanes or boats are equipped with radar or sonar! The only vehicles equipped with either of these systems are the ones which can reasonably be assumed should have them. Usually this is determined by whether they have a radar display on their dashboard or an externally visible radar. For a full list of radar/sonar enabled vehicles, see the _radarEnabledVehicles list in the .lua file.
-
Both the InoTechRadar_Client.lua and html/radarScript.js files have some options you as the server owner may configure if you so please. Do not change anything underneath the “CONFIG END” lines.
-
Most of the code isn’t commented. If you’re wondering how I did X, feel free to ask.
-
You can also hit me up on FiveM’s Discord (just ping @ino)
What I want from YOU:
- Any errors or bugs you may encounter! Please include log files if you run into an error.
- Feedback on the general usability of the radar/sonar systems. Does it feel easy to use? Intuitive? Do the colors work for you?
- If you really want to, have a look at the top of the .lua file and leave a comment on what out of my todo list you think is worth prioritising.
- Anything not on the to-do list which you believe should be added.
- Most importantly, have fun!