functionalized - I'm sure this exists in the game already but not exposed via lua that I can tell.
function W_Subtype(type,subtype)
local t = {['Ship'] = {[1001]='None',
[2001]='CV - Aircraft Carrier',
[2002]='CVA - Attack Carrier',
[2003]='CVB - Large Aircraft Carrier',
[2004]='CVE - Escort Aircraft Carrier',
[2005]='CVGH - Guided Missile Helicopter Carrier',
[2006]='CVH - Helicopter Carrier',
[2007]='CVL - Light Aircraft Carrier',
[2008]='CVN - Nuclear Powered Aircraft Carrier',
[2009]='CVS - Seaplane Carrier',
[2010]='CVS - Anti-Submarine Aircraft Carrier',
[2011]='AVT - Training Carrier',
[3001]='B - Battleship',
[3002]='BB - Battleship',
[3003]='BBC - Command Battleship',
[3004]='BBG - Guided Missile Battleship ',
[3005]='BBH - Helicopter Battleship',
[3006]='BCGN - Nuclear Powered Guided Missile Battle Cruiser',
[3007]='BM - Monitor',
[3101]='C - Cruiser',
[3102]='CA - Heavy Cruiser',
[3103]='CAG - Heavy Guided Missile Cruiser',
[3104]='CB - Large Cruiser',
[3105]='CBG - Large Guided Missile Cruiser',
[3106]='CG - Guided Missile Cruiser',
[3107]='CGH - Guided Missile Helicopter Cruiser',
[3108]='CGN - Nuclear Powered Guided Missile Cruiser',
[3109]='CL - Light Cruiser',
[3110]='CLAA - Light Anti-Aircraft Cruiser',
[3111]='CLC - Light Command Cruiser',
[3112]='CLG - Light Guided Missile Cruiser',
[3113]='CLH - Light Helicopter Cruiser',
[3114]='CS - Scout Cruiser',
[3201]='D - Destroyer',
[3202]='DD - Destroyer',
[3203]='DDG - Guided Missile Destroyer',
[3204]='DDH - Helicopter Destroyer',
[3205]='DDK - ASW Submarine Killer Destroyer',
[3206]='DDR - Radar Picket Destroyer',
[3207]='DE - Destroyer Escort',
[3208]='DEG - Guided Missile Destroyer Escort',
[3209]='DER - Radar Picket Destroyer Escort',
[3210]='DL - Destroyer',
[3211]='DLG - Guided Missile Destroyer',
[3212]='DM - Destroyer Minelayer (converted destroyer) ',
[3301]='F - Frigate',
[3302]='FF - Frigate',
[3303]='FFG - Guided Missile Frigate',
[3304]='FFL - Corvette',
[3305]='PF - Patrol Frigate',
[3306]='LCS - Littoral Combat Ship',
[3307]='OPV - Offshore Patrol Vessel',
[3401]='PB - Patrol Boat',
[3402]='PC - Coastal Patrol Boat',
[3403]='PC - Submarine Chaser',
[3404]='PCE - Submarine Chaser Escort',
[3405]='PCF - Fast Patrol Craft',
[3406]='PCFG - Fast Guided Missile Patrol Craft',
[3407]='PG - Patrol Gunboat',
[3408]='PG - Corvette ',
[3409]='PGM - Missile Gunboat',
[3410]='PH - Hydrofoil Gunboat ',
[3411]='PHM - Missile Hydrofoil ',
[3412]='PHT - Hydrofoil Torpedo Boat ',
[3413]='PT - Patrol Torpedo Boat',
[3414]='PTS - Patrol Torpedo Boat Small',
[3415]='MTB - Motor Torpedo Boat',
[3416]='WHEC - Coast Guard High Endurance Cutter',
[3417]='WMEC - Coast Guard Medium Endurance Cutter',
[3418]='WPB - Coast Guard Patrol Boat',
[3419]='WPG - Coast Guard Patrol Gunboat',
[3420]='MCDV - Maritime Coastal Defense Vessel',
[4000]='AGF - Fleet Flagship',
[4001]='AGC - Amphibious Fleet Flagship',
[4002]='LCAC - Air Cushion Landing Craft',
[4003]='LCC - Amphibious Command Vessel',
[4004]='LCM - Mechanized Landing Craft',
[4005]='LCP - Personnel Landing Craft',
[4006]='LCT - Tank Landing Craft',
[4007]='LCU - Utility Landing Craft',
[4008]='LCVP - Vehicle and Personnel Landing Craft',
[4009]='LFR - Inshore Fire Support Vessel',
[4010]='"LHA - Amphibious Assault Ship, General Purpose"',
[4011]='"LHD - Amphibious Assault Ship, Multi-purpose"',
[4012]='LKA - Amphibious Cargo Vessel',
[4013]='LPD - Amphibious Transport Dock Vessel',
[4014]='LPH - Amphibious Assault Helicopter Carrier',
[4015]='LSD - Dock Landing Ship ',
[4016]='LSH - Unknown! British Designation!',
[4017]='LSL - Landing Ships Logistic',
[4018]='LSM - Medium Landing Ship',
[4019]='"LSM(R) - Medium Landing Ship, Rocket"',
[4020]='LST - Tank Landing Ship',
[4021]='LSU - Utility Landing Ship ',
[4022]='LSV - Vehicle Landing Ship ',
[4023]='"LCI - Landing Craft, Infantry"',
[4024]='LSDV - Saboteur Infiltration Craft',
[4025]='"LCPA - Personnel Landing Craft, Air-Cushioned"',
[4026]='EPF - Expeditionary Fast Transport',
[4027]='ESD - Expeditionary Transfer Dock',
[4028]='ESB - Expeditionary Mobile Base',
[5001]='A - Auxiliary ',
[5002]='AD - Destroyer Tender ',
[5003]='AE - Ammunition Ship ',
[5004]='AF - Refrigerated Stores Ship ',
[5005]='AFS - Combat Stores Ship',
[5006]='AG - Generic Auxiliary ',
[5007]='AGB - Heavy Icebreaker',
[5008]='AGF - Fleet Flagship ',
[5009]='AGI - Intelligence Gathering Ship ',
[5010]='AGMR - Communications Major Relay Ship ',
[5011]='AGOR - Oceanographic Research Ship ',
[5012]='AGOS - Ocean Surveillance Ship ',
[5013]='AGR - Radar Picket Ship (converted cargo ship) ',
[5014]='AGS - Surveying Ship ',
[5015]='AGTR - Technical Research Ship',
[5016]='AH - Hospital Ship',
[5017]='AK - Cargo Ship ',
[5018]='AKA - Attack Cargo Ship ',
[5019]='AKE - Dry Cargo Ship ',
[5020]='AKR - Roll-on/Roll-off Cargo Ship',
[5021]='AKS - General Stores Ship ',
[5022]='AO - Fleet Oiler ',
[5023]='AOE - Fast Combat Support Ship ',
[5024]='AOL - Small Oiler ',
[5025]='AOR - Replenishment Oiler ',
[5026]='AOT - Transport Oiler',
[5027]='APA - Attack Personnel Transport Ship ',
[5028]='APD - Troop Transport (High Speed) ',
[5029]='AR - Repair Ship ',
[5030]='AS - Submarine Tender ',
[5031]='ATC - Armored Troop Carrier (Tango Boat) ',
[5032]='ATA - Auxiliary Ocean Tug ',
[5033]='ATS - Salvage Tug ',
[5034]='AV - Seaplane Tender ',
[5035]='AX - Training Vessel',
[5036]='ASR - Submarine Rescue Ship',
[5037]='AP - Personnel Transport Ship',
[5038]='DSV - Diving Support Vessel / Deep Submergence Vehicle',
[5039]='AGM - Missile Range instrumentation Ship',
[5040]='AD - Destroyer Tender',
[5101]='T-AGOS - MSC Ocean Surveillance Ship',
[5102]='T-AH - MSC Hospital Ship',
[5103]='T-AK - Cargo Ship',
[5104]='T-AKE - MSC Dry Cargo Ship',
[5105]='T-AKR - MSC Roll-on/Roll-off Cargo Ship',
[5106]='T-AO - MSC Fleet Oiler',
[5107]='T-AO - MSC Transport Oiler',
[5108]='T-MLP - MSC Mobile Landing Platforms',
[6001]='MCD - Mine Countermeasures Drone ',
[6002]='MCM - Mine Countermeasures Ship ',
[6003]='MCS - Mine Countermeasures Support Ship ',
[6004]='MHC - Coastal Minehunter ',
[6005]='ML - Minelayer ',
[6006]='MSC - Coastal Minesweeper ',
[6007]='MSF - Steel Hull Fleet Minesweeper ',
[6008]='MSI - Inshore Minesweeper ',
[6010]='MSO - Ocean Minesweeper ',
[6011]='MST - Minesweeper Tender',
[6012]='MHI - Mine Hunter Inshore',
[6013]='MM - Controlled Minefield Tender',
[7001]='YAG - Miscellaneous Service Craft',
[7002]='YRT - Torpedo Retriever',
[7003]='YRM - Missile Retriever',
[9001]='Civilian',
[9002]='Merchant',
[9003]='Platform',
[9004]='NGS Buoy',
[9005]='Bottom Fixed Array Sonar',
[9006]='Moored Sonobuoy',
[9007]='Special (Land Unit/Satellite)',
[9008]='Small Watercraft',
[9011]='Mobile Offshore Base (MOB)'},
['Submarine']={[1001]='None',
[2001]='AGSS - Auxilary/Experimental Submarine ',
[2002]='APSS - Auxiliary Cargo Submarine',
[2003]='SS - Attack/Fleet Submarine ',
[2004]='SSB - Ballistic Missile Submarine',
[2005]='SSBN - Nuclear Powered Ballistic Missile Submarine',
[2006]='SSG - Guided Missile Attack Submarine',
[2007]='SSGN - Nuclear Powered Guided Missile Attack Submarine',
[2008]='SSK - Hunter-Killer Submarine ',
[2009]='SSM - Midget Submarine ',
[2010]='SSN - Nuclear Powered Attack Submarine',
[2011]='SSP - Transport Submarine ',
[2012]='SSR - Radar Picket Submarine ',
[2013]='SSRN - Nuclear Powered Radar Picket Submarine',
[3001]='SDV - Swimmer Delivery Vehicle',
[4001]='ROV - Remotely Operated Vehicle',
[4002]='UUV - Unmanned Underwater Vehicle',
[9001]='Biologics',
[9002]='False Target'},
['Aircraft']={
[1001]='None',
[2001]='Fighter',
[2002]='Multirole (Fighter/Attack)',
[2101]='Anti-Satellite Interceptor (ASAT)',
[2102]='Airborne Laser Platform',
[3001]='Attack',
[3002]='Wild Weasel',
[3101]='Bomber',
[3401]='Battlefield Air Interdiction (BAI/CAS)',
[4001]='Electronic Warfare',
[4002]='Airborne Early Warning (AEW)',
[4003]='Airborne Command Post (ACP)',
[4101]='Search And Rescue (SAR)',
[4201]='Mine Sweeper (MCM)',
[6001]='Anti-Submarine Warfare (ASW)',
[6002]='Maritime Patrol Aircraft (MPA)',
[7001]='Forward Observer',
[7002]='Area Surveillance',
[7003]='Recon',
[7004]='Electronic Intelligence (ELINT)',
[7005]='Signals Intelligence (SIGINT)',
[7101]='Transport',
[7201]='Cargo',
[7301]='Commercial',
[7302]='Civilian',
[7401]='Utility',
[7402]='Naval Utility',
[8001]='Tanker (Air Refueling)',
[8101]='Trainer',
[8102]='Target Towing',
[8103]='Target Drone',
[8201]='Unmanned Aerial Vehicle (UAV)',
[8202]='Unmanned Combat Aerial Vehicle (UCAV)',
[8901]='Airship',
[8902]='Aerostat'}}
print(t[type][subtype])
return t[type][subtype]
end
--usage:
local t=W_Subtype('Ship',5001) --returns the readable subtype and prints to console -first value is Ship, Submarine or Aircraft.
print(t)