Regarding the AI and Fighters
I want my 15 rapid-fire quantum torpedo launchers Uber-Defiant now! - Get help from modders. Share your work. Discuss modifications.
posted on November 2nd, 2012, 8:42 pm
Hello there,
I've got the fighters in KA2 working like FleetOps fighters now, and I must say I am very impressed
There is a limitation however, namely that craft with the fighterprocess AI process cannot fire special weapons. You can click the icon, select a target, but it never fires.
Anyway, solved that issue, just gave them conventional torpedoes as now the whole "return to carrier to reload" thing is sort of moot since they now physically require a carrier nearby.
However I have read that the AI cannot use fighters. I am sort of requiring a bit of clarification on that. In what way can they not use them? Does the game crash if the AIP tells the AI to build fighters? Do they work but not follow carriers correctly? Whats the gig?
I currently have two sets of fighters set up, one AI-buildable only set up as conventional ships, and the new fighterprocess ones for the human player. Will I need to keep it that way, or can I tell the AI to build the new fighters, and it will (just won't attach them to carriers correctly or something)
Oh, one further thing. I assume fighters will only attach themselves to carriers of the same player or allied, not to an enemy carrier? I have all my supplyclasses defined in my fighter.odf, so any fighter can be supported by any carrier (so if a Federation player captures a Romulan Tribune CVE, they can use their fighters with it) but if it means strange behaviour where my fighters try to attach to enemy carriers, i'll have to define them individually.
Final question, can stations be defined as supplyclasses too? I wanted to make my psuedo-fighters for the Gorn attach themselves to their mooring station rather than a mobile carrier.
I've got the fighters in KA2 working like FleetOps fighters now, and I must say I am very impressed

Anyway, solved that issue, just gave them conventional torpedoes as now the whole "return to carrier to reload" thing is sort of moot since they now physically require a carrier nearby.
However I have read that the AI cannot use fighters. I am sort of requiring a bit of clarification on that. In what way can they not use them? Does the game crash if the AIP tells the AI to build fighters? Do they work but not follow carriers correctly? Whats the gig?

I currently have two sets of fighters set up, one AI-buildable only set up as conventional ships, and the new fighterprocess ones for the human player. Will I need to keep it that way, or can I tell the AI to build the new fighters, and it will (just won't attach them to carriers correctly or something)
Oh, one further thing. I assume fighters will only attach themselves to carriers of the same player or allied, not to an enemy carrier? I have all my supplyclasses defined in my fighter.odf, so any fighter can be supported by any carrier (so if a Federation player captures a Romulan Tribune CVE, they can use their fighters with it) but if it means strange behaviour where my fighters try to attach to enemy carriers, i'll have to define them individually.
Final question, can stations be defined as supplyclasses too? I wanted to make my psuedo-fighters for the Gorn attach themselves to their mooring station rather than a mobile carrier.
posted on November 2nd, 2012, 9:04 pm
Not sure about the particulars of the AI using Fighters: never tested it extensively, but should just be that the AI does not know how to use fighters in its build list. It won't cause a crash or anything like that
. I haven't experimented with how the AI uses them (or doesn't). If you have observations on that matter, you're more than welcome to describe them of course
.
Fighters only attach to your own vessels.
Stations can be used as hangars, yup.


Fighters only attach to your own vessels.
Stations can be used as hangars, yup.
posted on November 2nd, 2012, 10:31 pm
Part of the reason the Ai is difficult with figters, is that the AI will give the fighters orders independant of the carriers. and thus you may find your fighters doing things beyond the radius of the carrier.
posted on November 2nd, 2012, 11:21 pm
I don't mind the AI doing that. It doesn't really understand fighters as they are anyway (as it never tries to use the special energy recharge weapon on the carrier to recharge the heavy weapons on its fighters), so having them wander about the map is fine by me.
I'll leave them in the AIP as they are, but change the ODFs to fighterprocess ones, and I'll report back on the results
I'll leave them in the AIP as they are, but change the ODFs to fighterprocess ones, and I'll report back on the results

posted on November 3rd, 2012, 8:37 am
Right, I haven't tested the fighters with AI yet, but I've hit a very strange bug.
I have fighters and carriers for the following:-
United Federation of Planets
Klingon Empire
Romulan Star Empire
Interstellar Concordium
Hydran Kingdoms
Mirak Star League
Orion Pirate Cartels
Sha'Kurian Duchies
The last 4 are technically NPC races. However I've been testing them as the player. Here is the puzzling part. They all work, except the Sha'Kurians.
The Sha'Kurian Claw Fighter and Sharptooth Bomber work fine when paired with any other races carrier. The Sha'Kurian Carriers work fine when working without fighters. Put them together and the game crashes as soon as you Ctrl-E to "run" the map. Also, trying to use say Federation Hornet fighters with a Shak'Kurian Carrier also results in a crash.
The Sha'Kurians differ in only two respects to everyone else. First is they have two fightercraft rather than one. Second is they have 3 carriers rather than 1. However, all 3 are defined in the fighter.odf craft file along with the rest of the carriers.
It's not the naming convention, since "rcve.odf" (Romulan Escort Carrier) works fine, but "scvl.odf" (Sha'Kurian Light Carrier) does not. It's not the weapon files of either carrier or fightercraft, since as i've said they work fine individually.
If I change the Sha'Kurian fighters back into "Escorts" rather than using the fighter.odf, they work fine. The crash seems to stem from the fact that no fighter is seeing Sha'Kurian carriers as valid carriers. I have even tried making a duplicate fighter odf called fighterB.odf with just the Sha'Kurian ships defined in case it was a limitation to how many carriers could be assigned. That crashed also. It's not the class type of the carrier either, as the Romulan Escort Carrier is a cruise.odf craft rather than carrier.odf, and as far as I am aware it doesn't matter what the craft type is of the carrier vessel, merely the fighter.
It's not a major problem really, as if what is theorised is true, the AI just ignores carrier limitations anyway so having the Sha'Kurian fighters actually be independent craft won't even be noticeable. It's just baffling as to why everything else works fine, but these steadfastly refuse to.
Any ideas?
I have fighters and carriers for the following:-
United Federation of Planets
Klingon Empire
Romulan Star Empire
Interstellar Concordium
Hydran Kingdoms
Mirak Star League
Orion Pirate Cartels
Sha'Kurian Duchies
The last 4 are technically NPC races. However I've been testing them as the player. Here is the puzzling part. They all work, except the Sha'Kurians.
The Sha'Kurian Claw Fighter and Sharptooth Bomber work fine when paired with any other races carrier. The Sha'Kurian Carriers work fine when working without fighters. Put them together and the game crashes as soon as you Ctrl-E to "run" the map. Also, trying to use say Federation Hornet fighters with a Shak'Kurian Carrier also results in a crash.
The Sha'Kurians differ in only two respects to everyone else. First is they have two fightercraft rather than one. Second is they have 3 carriers rather than 1. However, all 3 are defined in the fighter.odf craft file along with the rest of the carriers.
It's not the naming convention, since "rcve.odf" (Romulan Escort Carrier) works fine, but "scvl.odf" (Sha'Kurian Light Carrier) does not. It's not the weapon files of either carrier or fightercraft, since as i've said they work fine individually.
If I change the Sha'Kurian fighters back into "Escorts" rather than using the fighter.odf, they work fine. The crash seems to stem from the fact that no fighter is seeing Sha'Kurian carriers as valid carriers. I have even tried making a duplicate fighter odf called fighterB.odf with just the Sha'Kurian ships defined in case it was a limitation to how many carriers could be assigned. That crashed also. It's not the class type of the carrier either, as the Romulan Escort Carrier is a cruise.odf craft rather than carrier.odf, and as far as I am aware it doesn't matter what the craft type is of the carrier vessel, merely the fighter.
It's not a major problem really, as if what is theorised is true, the AI just ignores carrier limitations anyway so having the Sha'Kurian fighters actually be independent craft won't even be noticeable. It's just baffling as to why everything else works fine, but these steadfastly refuse to.
Any ideas?
posted on November 3rd, 2012, 4:18 pm
Again, crasholog and more details are needed
. Uploading the ODFs in question would be a good start as well. Checking that your race flag is valid would also be wise, as that's often involved in map editor crashes.
Likewise, when does the game crash when building the vessels? When they finish constructing, when the game loads, etc.

Likewise, when does the game crash when building the vessels? When they finish constructing, when the game loads, etc.
posted on November 3rd, 2012, 8:49 pm
Again, not a crash log in sight.
Race name is fine, since as I mentioned, both carriers and fighters work fine independently. I am using the map editor to place the ships, not constructing them. If I try and use fighters alongside the Sha'Kurian carriers, (any fighter) it crashes, as for some reason the game is not recognising the Shak Carriers as being valid carriers.
Example file for the carriers, namely SCVA, Long Fang Class Fleet Carrier
Sha'Kurian Claw Space Superiority Fighter
fighter.odf craft file
Race name is fine, since as I mentioned, both carriers and fighters work fine independently. I am using the map editor to place the ships, not constructing them. If I try and use fighters alongside the Sha'Kurian carriers, (any fighter) it crashes, as for some reason the game is not recognising the Shak Carriers as being valid carriers.
Example file for the carriers, namely SCVA, Long Fang Class Fleet Carrier
- Code: Select all
#include "cruise.odf"
//MAIN DESIGN PARAMETERS
//Race which can build ship & starting race of ship
race = "shakurian"
//Name of Ship class in Ship Display window & in edit mode & tooltip
unitName = "Long Fang Class"
//tooltips
tooltip = "Long Fang Class - Attack Carrier"
verboseTooltip = "SHA_LONGFANG_V"
//Amount of time required to build ship
buildTime = 43.0
//Number of officers required to build this ship
officerCost = 4
//Number of crew required to build ship & Starting crew
crewCost = 955
//Dilithium Cost to build
dilithiumCost = 900
//Metal Cost to build
metalCost = 90
// Sha'Kurian Standard Sensors
rangeScan = 1000.0f
//Max Shield Strength & Begining Shield Strength <500
maxHealth = 250
maxShields = 350
// Hitpoints
shieldGeneratorHitPoints = 180
enginesHitPoints = 180
weaponsHitPoints = 100
lifeSupportHitPoints = 180
sensorsHitPoints = 180
//Rate at which shield recharges (points per second... we think)
shieldRate = 1.5
//Maximum Value of Special Energy
maxSpecialEnergy = 1000
//Rate at which special energy recharges (points per second... we think)
specialEnergyRate = 15
boardingPartyStrength = 2.5
//**********************************************************************
//SHIP NAMES
//Possible Craft Names
possibleCraftNames =
"SDS Long Fang" "SDS Toothclaw" "SDS Sharpnail" "SDS Swiftblade" "SDS Fury" "SDS Atrocious" "SDS Callous" "SDS Insidious" "SDS Impregnable" "SDS Resolution" "SDS Implacable" "SDS Inviolate" "SDS Punisher"
//**********************************************************************
//ART PARAMETERS & WEAPON NAMES
// Phaser G 1
weapon1 = "sGphas"
weaponHardpoints1 = "hp03"
// Phaser G 2
weapon2 = "sGphas2"
weaponHardpoints2 = "hp11"
// MWP
weapon3 = "sMWP"
weaponHardpoints3 = "hp07"
// MWP
weapon4 = "sMWP2"
weaponHardpoints4 = "hp04"
// Fighter Warhead
weapon5 = "MFigSup"
weaponHardpoints5 = "hp04"
// GDDS
weapon6 = "gSGDDS2"
weaponHardpoints6 = "hp04"
// Cloak Detect
weapon7 = "gdetectS"
weaponHardpoints7 = "hp11"
// Self Destruct
weapon8 = "gselfdes"
weaponHardpoints8 = "hp11"
// Tractor Beam
weapon9 = "gtracbm"
weaponHardpoints9 = "hp01"
// Probes
weapon10 = "probe"
weaponHardpoints10 = "hp07"
// Hardpoints to hit for various systems and other locations.
enginesTargetHardpoints = "hp10" "hp07" "hp08" "hp09"
lifeSupportTargetHardpoints = "hp05"
weaponsTargetHardpoints = "hp04" "hp02" "hp01"
shieldGeneratorTargetHardpoints = "hp05"
sensorsTargetHardpoints = "hp12"
hullTargetHardpoints = "hp05" "hp06" "hp07" "hp08"
criticalTargetHardpoints = "hp08" "hp10" "hp12" "hp09" "hp07"
//**********************************************************************
//AI system parameters
//These parameters influence how the AI evaluates and compares craft.
//An abstract number that represents how much extra strength must be
//used to attack this craft due to its weapons.
// (0.0=no weapons, 0.5 = average weapons, 1.0=many good weapons)
attackPower = 0.50f
//The normalized intrinsic value of a target. High value craft make good
//attack targets. (0.0=lowest value, 1.0=highest value)
intrinsicValue = 0.50f
//**********************************************************************
//**********************************************************************
//CREW STATUS MULTIPLIERS
//The multiplier for the delay between shots for weapons while in yellow status
weaponYellow = 1.0f
//The multiplier for the delay between shots for weapons while in red status
weaponRed = 1.0f
//**********************************************************************
//**********************************************************************
//KEYMAP LABEL
hotkeyLabel = "HOTKEY_F1"
physicsFile = "slfangphys.odf"
baseName = "scva"
ScaleSOD = 1.0
// Impulse Sound
ambientSound = "shaimp.wav"
Sha'Kurian Claw Space Superiority Fighter
- Code: Select all
#include "fighter.odf"
//Name of Ship class in Ship Display window & in edit mode & tooltip
unitName = "Claw"
//tooltips
tooltip = "Claw - Space Superiority Fighter"
verboseTooltip = "SHA_CLAW_V"
//Race which can build ship & starting race of ship
race = "shakurian"
//Amount of time required to build ship
buildTime = 33.0
//Number of officers required to build this ship
officerCost = 1
//Number of crew required to build ship & Starting crew
crewCost = 0
saneCrewLossMethod = 1
//Dilithium Cost to build
dilithiumCost = 357
//Metal Cost to build
metalCost = 35
//Max Shield Strength & Begining Shield Strength <500
maxHealth = 10
maxShields = 10
// Hitpoints
shieldGeneratorHitPoints = 0
enginesHitPoints = 10
weaponsHitPoints = 10
lifeSupportHitPoints = 10
sensorsHitPoints = 10
//Rate at which shield recharges (points per second... we think)
shieldRate = 0
// Klingon Standard Sensors
rangeScan = 600.0f
//Maximum Value of Special Energy
maxSpecialEnergy = 100
//Rate at which special energy recharges (points per second... we think)
specialEnergyRate = 0
//**********************************************************************
//SHIP NAMES
//Possible Craft Names
possibleCraftNames =
//**********************************************************************
//ART PARAMETERS & WEAPON NAMES
// Phaser G 1
weapon1 = "sSGphas"
weaponHardpoints1 = "hp01"
// Ballistic Projectile Launcher
weapon2 = "sBP"
weaponHardpoints2 = "hp02"
// Hardpoints to hit for various systems and other locations.
enginesTargetHardpoints = "hp01"
lifeSupportTargetHardpoints = "hp01"
weaponsTargetHardpoints = "hp01"
shieldGeneratorTargetHardpoints = "hp01"
sensorsTargetHardpoints = "hp01"
hullTargetHardpoints = "hp01"
criticalTargetHardpoints = "hp01"
//**********************************************************************
//AI system parameters
//These parameters influence how the AI evaluates and compares craft.
//An abstract number that represents how much extra strength must be
//used to attack this craft due to its weapons.
// (0.0=no weapons, 0.5 = average weapons, 1.0=many good weapons)
attackPower = 0.10f
//The normalized intrinsic value of a target. High value craft make good
//attack targets. (0.0=lowest value, 1.0=highest value)
intrinsicValue = 0.15f
//**********************************************************************
//**********************************************************************
//CREW STATUS MULTIPLIERS
//The multiplier for the delay between shots for weapons while in yellow status
weaponYellow = 1.0f
//The multiplier for the delay between shots for weapons while in red status
weaponRed = 0.75f
//**********************************************************************
//**********************************************************************
//KEYMAP LABEL
// Obsolete, use hotkeyLabel
// keymapLabel = "kling_scout"
hotkeyLabel = "HOTKEY_F1"
physicsFile = "sclawphys.odf"
ScaleSOD = 1.0
baseName = "shakfig1"
// Impulse Sound
//ambientSound = "Klnimp.wav"
fighter.odf craft file
- Code: Select all
//This file is the general craft file for all Fightercraft
//This is for stat accumulation
shipclass = "destroyer"
#include "craft.odf"
//Maximum Value of Special Energy
maxSpecialEnergy = 0
//Rate at which special energy recharges (points per second... we think)
specialEnergyRate = 0
//This is the range in meters which the ships sensors can see (LOS)
rangeScan = 1250.0f
//**********************************************************************
//AI system parameters
//These parameters influence how the AI evaluates and compares craft.
//An abstract number that represents how much extra strength must be
//used to attack this craft due to its weapons.
// (0.0=no weapons, 0.5 = average weapons, 1.0=many good weapons)
attackPower = 0.10f
//The normalized intrinsic value of a target. High value craft make good
//attack targets. (0.0=lowest value, 1.0=highest value)
intrinsicValue = 0.15f
//**********************************************************************
//**********************************************************************
//SYSTEM HITPOINTS
//These values are the hitpoint values of the systems
//If the value is set to zero the ship does not have that system
enginesHitPoints = 20
lifeSupportHitPoints = 20
weaponsHitPoints = 20
shieldGeneratorHitPoints = 20
sensorsHitPoints = 20
//**********************************************************************
// This is the size of the build animation sparks.
weldingRadius = 0.25
//**********************************************************************
//MESSAGE & SOUND PARAMETERS
eventSelect = "EscortSelect"
eventAcknowledge = "EscortAcknowledge"
eventAttack = "EscortAttack"
eventStop = "EscortStop"
eventMove = "EscortMove"
eventRepair = "EscortRepair"
//**********************************************************************
//PHYSICS PARAMETERS
//physics file for all other physics stuff
physicsFile = "sscoutphys.odf"
//for obstacle avoidance
avoidanceClass = 1
//Explosion to use
fireball = "xfirebsm"
//************************************************************
// Tara additions for context sensitive menus
combat = 1
alert = 1
can_sandd = 1
// ship type for formations
shipType = "S"
//AI Type DO NOT CHANGE
aiName = "FighterProcess"
supplyClasses = 0
"fcarrier.odf" 1
"hcarrier.odf" 1
"icarrier.odf" 1
"kcarrier.odf" 1
"mcarrier.odf" 1
"pcarrier.odf" 1
"rcve.odf" 1
"scva.odf" 1
"scvb.odf" 1
"scvl.odf" 1
operationRange = 1000
posted on November 5th, 2012, 2:30 am
It's very difficult to tell with so many stringed file dependencies. I would however change the classlabel of your fighters to that of a fighter to start : classlabel = "fighter"
I don't understand what you mean by using "fighters alongside the carriers". Do you mean placing the fighters separately doesn't crash, but placing them with a carrier causes a crash?
Have you tried yet to build your fighters or your carriers?
You also mentioned that you used two different ODFs for your fighters, and one didn't crash. What's the difference between those ODFs?
I don't understand what you mean by using "fighters alongside the carriers". Do you mean placing the fighters separately doesn't crash, but placing them with a carrier causes a crash?
Have you tried yet to build your fighters or your carriers?
You also mentioned that you used two different ODFs for your fighters, and one didn't crash. What's the difference between those ODFs?
posted on November 5th, 2012, 9:43 am
I'll try and put this another way 
Federation Carrier + Sha'Kurian Fighters = Works
Sha'Kurian Carrier with no fighters = Works
Sha'Kurian Carrier with any fighter = Crash
What is happening is that for reasons unknown, the game is not detecting the Sha'Kurian Carriers as being valid carriers. So, the moment the game starts (Ctrl-E) the game crashes as there is no carrier for the fighters to follow, and no shipyard for them to fly to and decommission.
If I change the #include "fighter.odf" to "#include "escort.odf" on the Claw, then it's no longer classed as a fighter but as an independent craft, and then it doesn't cause a crash because it's not looking for a carrier.

Federation Carrier + Sha'Kurian Fighters = Works
Sha'Kurian Carrier with no fighters = Works
Sha'Kurian Carrier with any fighter = Crash
What is happening is that for reasons unknown, the game is not detecting the Sha'Kurian Carriers as being valid carriers. So, the moment the game starts (Ctrl-E) the game crashes as there is no carrier for the fighters to follow, and no shipyard for them to fly to and decommission.
If I change the #include "fighter.odf" to "#include "escort.odf" on the Claw, then it's no longer classed as a fighter but as an independent craft, and then it doesn't cause a crash because it's not looking for a carrier.
posted on November 5th, 2012, 12:50 pm
Some observations of fighters:
- The AI can build fighters if they are in their AIP. Several races in Sigma (notably the VRA and some of the npc races) all directly build fighters from yards which then seek out the nearest carrier. If there's no carrier the AI just seems to have them wander around the map.
- In older versions of FO they would order them around separate of carriers even if there was a carrier around. That seems to have been remedied a few patches ago though.
As for the crash, usually when the game crashes after I immediately place a bugged ship there's a spelling mistake in the ship's odf for a weapon entry. I'm going to take a guess and say one of the weapon entries on your carrier is spelled wrong.
- The AI can build fighters if they are in their AIP. Several races in Sigma (notably the VRA and some of the npc races) all directly build fighters from yards which then seek out the nearest carrier. If there's no carrier the AI just seems to have them wander around the map.
- In older versions of FO they would order them around separate of carriers even if there was a carrier around. That seems to have been remedied a few patches ago though.
As for the crash, usually when the game crashes after I immediately place a bugged ship there's a spelling mistake in the ship's odf for a weapon entry. I'm going to take a guess and say one of the weapon entries on your carrier is spelled wrong.
posted on November 5th, 2012, 1:17 pm
I did think that Nephalim, but all three Sha'Kurian carriers work fine independently. I have tested them against a Klingon Mining Station. So, it's neither the fighters weapons nor the carriers causing the crash. It's when I place fighters with either no carrier or a Sha'Kurian carrier the game crashes.
posted on November 5th, 2012, 6:40 pm
Placing a fighter independently of a carrier with or without a nearby shipyard will not result in a crash. I cannot make any other suggestions until you try building these units directly or changing the classlabel unfortunately. There are way too many dependencies to suggest bug tests from my end.
posted on November 5th, 2012, 9:53 pm
These are map units. They are not intended to be buildable.
Oddly, just tested the Sharptooth (as a fighter not an escort) on it's own and it works fine. Tested the Long Fang Class Carrier, also works fine. Put them together; crash.
Even weeeirder. I added the classlabel changes like you suggested. It works. Why all the other fighters work without it, and these two don't, i've no idea. Either way, thanks for that. The wiki didn't mention that on fighters, just the aiprocess.
Oddly, just tested the Sharptooth (as a fighter not an escort) on it's own and it works fine. Tested the Long Fang Class Carrier, also works fine. Put them together; crash.
Even weeeirder. I added the classlabel changes like you suggested. It works. Why all the other fighters work without it, and these two don't, i've no idea. Either way, thanks for that. The wiki didn't mention that on fighters, just the aiprocess.
posted on November 5th, 2012, 11:54 pm
Very peculiar. I can't replicate the crash by switching around the AI process or the classlabel on this end, so I'm not sure what would cause that crash for you.
Even if the units aren't intended to be buildable, it helps to build them out of a yard or producer of some kind for bug testing
. Crashes in the map editor occur in a different place than crashes while being built etc: can lead to helpful information.
Even if the units aren't intended to be buildable, it helps to build them out of a yard or producer of some kind for bug testing

posted on November 6th, 2012, 10:02 am
Tis just the oddities of the Storm3d engine in all it's forms. Won't make all the fighters crash, just the last two
Enough to drive you barmy.

Who is online
Users browsing this forum: No registered users and 5 guests