Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: FrikgFeek on March 20, 2017, 01:12:43 am

Title: Feature Request: moddable radar ranges
Post by: FrikgFeek on March 20, 2017, 01:12:43 am
So with the feature freeze ending soon I'd like to make a feature request.
I've been informed that the cyclable radar ranges(2K, 10K, infinity) are currently hard-coded. I'd like to request that they become moddable through a HUD table flag or mission settings, with more than 3 ranges if possible.
This would be useful for mods that use speeds and ranges different from standard Freespace ones and it would help with certain types of missions like stealth where the detection range is greater or about equal to 2000m as setting your radar range to just over detection range would help know when a fighter is getting too close without having to target them.

The default 10K setting is also too close to infinity with standard Freespace speeds which can make the radar crowded with units you don't care about while 2K is a bit too short to monitor relevant battlespace.
Title: Re: Feature Request: moddable radar ranges
Post by: CountBuggula on May 10, 2017, 05:03:48 pm
I'll definitely second this feature request.  I'd even love to give each ship its own radar range, with that range being dynamic depending on the presence of other ships.  For example, when an AWACS ship is present, the range of all nearby friendly ships is increased.
Title: Re: Feature Request: moddable radar ranges
Post by: Phantom Hoover on May 10, 2017, 05:51:29 pm
Stuff like this being non-moddable makes no sense when the engine freely supports velocity and range mods that totally change the scale of the gameplay space.
Title: Re: Feature Request: moddable radar ranges
Post by: AdmiralRalwood on May 10, 2017, 09:33:36 pm
Stuff like this being non-moddable makes no sense when the engine freely supports velocity and range mods that totally change the scale of the gameplay space.
In order to make the number of radar range settings variable would require rewriting basically all of the relevant code for a convenience feature that an enterprising FREDer can fake anyway.
Title: Re: Feature Request: moddable radar ranges
Post by: karajorma on May 11, 2017, 01:37:07 am
Maybe you couldn't do it per ship easily but having it come from game-settings.tbl should be pretty easy, right?
Title: Re: Feature Request: moddable radar ranges
Post by: AdmiralRalwood on May 12, 2017, 09:46:58 am
Maybe you couldn't do it per ship easily but having it come from game-settings.tbl should be pretty easy, right?
If you mean making the 2 non-infinite values come from a table, yes, that should be pretty easy. Making it work per-ship would only be slightly harder. The thing I was talking about requiring a rewrite would be having a variable number of ranges to select from.
Title: Re: Feature Request: moddable radar ranges
Post by: FrikgFeek on May 12, 2017, 10:29:02 am
2 non infinite values? Would it be hard to make the infinite value moddable too? I think 3 settings should be enough for most things, especially if you can free up that infinity slot and change it to something more useful. I'd love to have more than 3 but if that's too much work for a convenience feature then 3 fully moddable settings would be pretty good.
Title: Re: Feature Request: moddable radar ranges
Post by: jr2 on May 12, 2017, 10:47:44 am
Maybe have it so the value -1 sets that range to infinity?  Wouldn't want to lose the infinite.
Title: Re: Feature Request: moddable radar ranges
Post by: AdmiralRalwood on May 13, 2017, 05:07:57 pm
Actually, I just figured people would want to keep the infinite setting; making all three moddable would be as easy as two, because it's actually not infinite, it's just 10,000,000 meters.

Yes, really.

Code: [Select]
float Radar_ranges[RR_MAX_RANGES] = {
2000.0f, // short
10000.0f, // med
10000000.0f, // infinity
};
Title: Re: Feature Request: moddable radar ranges
Post by: FrikgFeek on May 13, 2017, 05:31:04 pm
Well, 10 million metres might as well be infinity considering that's an order of magnitude above the map size limit.
Title: Re: Feature Request: moddable radar ranges
Post by: Bryan See on June 21, 2017, 02:30:19 am
I'm looking into it and it seems promising. I had my own repository to work on, and I wish I want to work on it.