Fleets not working in X3: Farnham's Legacy.
The fleet leader has only one COMMAND_CALLTOARMS command.
Fleet subordinates have the COMMAND_JOINWITHFLEET command available.
Also, fleet subordinates have commands that should be available to the fleet leader COMMAND_FLEET_ATTACK, COMMAND_FLEET_ATTACKALLENEMIES, COMMAND_FLEET_INVADESECTOR, COMMAND_FLEET_DEFENDSTATION, COMMAND_FLEET_DEFENDSECTOR.
The fleet leader does not have these commands.
Running these commands through a subordinate fleet causes a reaction only from him, and the fleet itself with the leader is inactive.
!init.ship.globalscriptmap.std
Code: Select all
$race = null
...
* - Fleet commands -----------------
global script map: set: key=COMMAND_CALLTOARMS, class=Ship, race=$race, script=!ship.cmd.fleet.calltoarms, prio=0
global script map: set: key=COMMAND_JOINWITHFLEET, class=Ship, race=$race, script=!ship.cmd.fleet.join, prio=0
global script map: set: key=COMMAND_FLEET_RESUPPLY, class=Ship, race=$race, script=!ship.cmd.fleet.resupply, prio=0
global script map: set: key=COMMAND_FLEET_INVADESECTOR, class=Ship, race=$race, script=!ship.cmd.fleet.invade.std, prio=0
global script map: set: key=COMMAND_FLEET_DEFENDSTATION, class=Ship, race=$race, script=!ship.cmd.fleet.dstation.std, prio=0
global script map: set: key=COMMAND_FLEET_DEFENDSECTOR, class=Ship, race=$race, script=!ship.cmd.fleet.defendsector.std, prio=0
global script map: set: key=COMMAND_FLEET_ATTACKALLENEMIES, class=Ship, race=$race, script=!ship.cmd.fleet.attackall.std, prio=0
global script map: set: key=COMMAND_FLEET_ATTACK, class=Ship, race=$race, script=!ship.cmd.fleet.attack.std, prio=0
global script map: set: key=COMMAND_FLEET_PATROL, class=Ship, race=$race, script=!ship.cmd.fleet.patrol.std, prio=0
Code: Select all
* --- Fleet commands ------------------
$upgrade = [TRUE]
set script command upgrade: command=COMMAND_CALLTOARMS upgrade=$upgrade
set script command upgrade: command=COMMAND_JOINWITHFLEET upgrade=$upgrade
Code: Select all
set ship command preload script: command=COMMAND_FLEET_ATTACK script=!ship.cmd.fleet.attack.pre
set ship command preload script: command=COMMAND_FLEET_DEFENDSECTOR script=!ship.cmd.fleet.defendsector.pre
set ship command preload script: command=COMMAND_FLEET_DEFENDSTATION script=!ship.cmd.defend.station.pl
set ship command preload script: command=COMMAND_FLEET_INVADESECTOR script=!ship.cmd.fleet.invade.pre
Fleet leader
Fleet subordinates
It is not clear how a condition is added to display items in the menu of ships of these commands so that commands are added only to the leader of the fleet and not to the subordinates of the fleet.
This works correctly in X3: Albion Prelude and the reverse logic works in X3: Farnham's Legacy.
p.s. \L\x3story.obj is suspected. What is this file and what does it contain?
When replacing the x3story.obj file from X3: Albion Prelude to X3: Farnham's Legacy and starting a new game, the fleet management commands work properly, but the game becomes broken