Lets start with the easiest
ai_profiles options
$Delay Before Allowing Bombs to Be Shot Down:
Defines the delay after bomb launch before weapons can hit bombs.
Making the bombs essentially invulnerable to point defense for that time period
Five floats (one for each difficulty level). Default value is 1.5 for every level. Affects both player and AI.
Set right after Percentage Awarded For Capship Assist and before big ships can attack beam turrets on untargeted ships
$allow turrets target weapons freely:
Allows turrets to target also other weapons that just those with bombs tags.
Boolean.
Set after the multi allow empty secondaries entry as a last entry.
weapons options
$Weapon Hitpoints:
Last entry in the table
Integer. Defines the amount of hitpoints for that weapon class
NOTE:Activating hitpoints makes the weapon destroyable.
Bombs default to 50 hitpoints.
Example xxx-aip.tbm
#AI Profiles
$Profile Name: FS2 RETAIL
+nocreate
$Delay Before Allowing Bombs to Be Shot Down: 6.0, 6.0, 6.0, 6.0, 6.0
$allow turrets target weapons freely: YES
#End
Example xxx-wep.tbm
#Primary Weapons
$Name: Prometheus R
+nocreate
$Weapon Hitpoints: 1
#End
Target priorities
Target priorities setup is per turret system which - if and only if it is activated - replaces the normal target sorting system for the turrets. This allows for turrets to prioritize for example fighters before cap ships but if no fighter targets are available it will then target cap ships instead. For certain loading order reasons the setup is not exactly pretty but it is functional. Idea why several of the priority options seem to contain only modest or rather useless options is that simply by adding the option to parse flags of that type makes significantly adds to the extendability of this target priority setup (small additions should not require full rewrite)
Also should you add more than one type of priority settings the potential target has to belong to ANY one of them to be targeted (if certain setting is not activated for the current targeted priority this can be avoided)
Setting the target priorities
objecttypes.tbl
New section is added at the beginning of the objecttypes.tbl (fully optional).
#Target Priorities
..
..
#End
#Ship Types
,,
$Name:
Defines the name of the target group
+Object Type:
Optional - operates in similar way as flag parsing
Defines the type of the objects that belong to this target group
Options: "ship", "asteroid", "weapon"
+Weapon Class:
Optional - operates in similar way as weapon bank loadouts
Defines the weapon class(es) that belong to this target group
Options: Weapon names
+Object Flags:
Optional - operates in similar way as flag parsing
Defines the object flags that are used to identify targets belonging to this group
Options: "no shields", "targetable as bomb"
+Ship Class Flags:
Optional - operates as flag parsing
Defines the ship flags (SIF and SIF2) which are used to identify the target group
Options: "afterburners", "big damage", "has awacs"
+Weapon Class Flags:
Optional - operates as flag parsing
Defines the weapon flags (WIF and WIF2) which are used to identify the target group
Options: "bomb", "huge damage", "supercap damage", "bomber+", "electronics", "puncture", "emp", "heat seeking", "aspect seeking", "engine seeking", "pierce shields", "local ssm"
Objecttypes can be added to the target groups (objecttypes table):
Before Counts for Alone
$Target Priority Groups:
Optional
Defines the target priority group into which the ships of the this objecttype belong to
+Override
Instead of adding new options to the entry this sets the objecttype to belong to only to the defined target group.
Ship classes can be added to the target groups (ships table):
After radar images entries, just before subsystem entries
$Target Priority Groups:
Optional
Defines the target priority groups this ship belongs to
+Override
Instead of adding new options to the entry this sets the ship to belong to only to the defined target group.
Actually setting the target priorities for the turret
Just before the Subsystem Flags entry (SEXP support not yet implemented)
$Target Priority:
Optional - defined as flags
Defines the target priorities for this turret.
NOTE: Priorities are used in the order in which they were defined (1st is highest).
Using this entry for a second time replaces the whole priority list with the new list.
Hmm.. i think that was it... as a glimpse anyways... oh and this worked several months ago just fine but has since been mothballed so if it does not work as 'advertised' please inform me about the issues
----
EDIT
Example of xxx-obt.tbm
#Target Priorities
$Name: Merchant
$Name: Bombs
+Object Type: Weapon
$Name: Strikecraft
#End
#Ship Types
$Name: Fighter
+nocreate
$Target Priority Groups: ( "Strikecraft" )
$Name: Transport
+nocreate
$Target Priority Groups: ( "Merchant" )
#End
Example of xxx-shp.tbm
#Ship Classes
$Name: GTC Fenris
+nocreate
$Subsystem: turret08, 2, 5.0
$Default PBanks: ( "Terran Turret" )
$Target Priority: ( "Strikecraft" )
$Subsystem: turret09a-01-main, 8, 10.0
$Default SBanks: ( "Subach HL-7" )
$Target Priority: ( "Bombs" )
$Name: GTA Charybdis
+nocreate
$Target Priority Groups: ( "Merchant" )
#End
EDIT2... A bug had slipped as i had to rewrite the changes as the old patch refused to be patched... Wanderer branch builds of r5034 or later have this fix.