Hard Light Productions Forums
Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Yarn on February 08, 2013, 01:10:34 am
-
It seems that most modders don't bother specifying radar icons for ships that they add. If the MediaVPs are used and MV_RadarIcons is installed, this results in new ships on the radar appearing as dots, while retail ships appear as icons. For someone who actually uses MV_RadarIcons, this inconsistency can get a little annoying.
My solution to this is to allow radar icons to be specified by ship type in objecttypes.tbl. So, for example, if $Radar Image 2D: radar-fighter is added to the Fighter entry, then any ship of that type with no radar icon specified would automatically appear on the radar as the radar-fighter image instead of a dot.
With this feature implemented, we would add radar-obt.tbm to MV_RadarIcons to enable it. Here is what this file could contain:
#Ship Types
$Name: Navbuoy
+nocreate
$Radar Image 2D: radar-waypoint
$Name: Sentry Gun
+nocreate
$Radar Image 2D: radar-sentry
$Name: Escape Pod
+nocreate
$Radar Image 2D: radar-smallship
$Name: Cargo
+nocreate
$Radar Image 2D: radar-cargo
$Name: Support
+nocreate
$Radar Image 2D: radar-smallship
$Name: Stealth
+nocreate
$Radar Image 2D: radar-fighter
$Name: Fighter
+nocreate
$Radar Image 2D: radar-fighter
$Name: Bomber
+nocreate
$Radar Image 2D: radar-bomber
$Name: Fighter/bomber
+nocreate
$Radar Image 2D: radar-bomber
$Name: Transport
+nocreate
$Radar Image 2D: radar-bigship
$Name: Freighter
+nocreate
$Radar Image 2D: radar-freighter
$Name: AWACS
+nocreate
$Radar Image 2D: radar-science
$Name: Gas Miner
+nocreate
$Radar Image 2D: radar-bigship
$Name: Cruiser
+nocreate
$Radar Image 2D: radar-cruiser
$Name: Corvette
+nocreate
$Radar Image 2D: radar-corvette
$Name: Capital
+nocreate
$Radar Image 2D: radar-capital
$Name: Super Cap
+nocreate
$Radar Image 2D: radar-capital
$Name: Drydock
+nocreate
$Radar Image 2D: radar-drydock
$Name: Knossos Device
+nocreate
$Radar Image 2D: radar-knossos
#End
However, this won't automagically assign the best icon for every ship. For example, the default objecttypes.tbl doesn't have "Installation" and "Science" ship types, so installations and science vessels would need to be assigned appropriate radar icons in ships.tbl; otherwise, installations may appear as destroyers and science vessels may appear as cruisers.