More good work, JBW. Something had to happen, it was getting frustrating jumping to a non-thrusting ship and getting stuck there. Using the targeting system is excellent.
And I have a lead on what's causing the "non-thrusting ships".
If you change to a docked ship, it won't thrust, but a patrolling or moving ship thrusts normally.
On changing to a docked ship if you press "D" three times you eventually end up docking with the station or wreck. After you then "Undock" you can fly around. Note that this won't work if the new ship is docked at a station without playership-usable docking ports like the Remora habitats in the Remora commune groups.
'forceUndock'ing doesn't seem to change anything unfortunately, probably because the ship isn't docked yet.
I think the game might be getting confused when the new playership (it's the playership now that we have changed to it) is in a docked state but not in a dockscreen.
The ship has inherited the 'dock' order from before it was the new playership but the order then doesn't exist in the new changed-to ship which is now the playership, even though the new playership still needs to dock. So orders on the playership can't be cancelled because it doesn't have any. So the new ship would appear to need its orders changed before changing to it. (If you can follow that!)
I did have one success on a docked ship using
Code: Select all
(setq theShipObj (sysFindObject gPlayership 'sN))
(shpOrderImmediate theShipObj 'dock (shpGetDockObj theShipObj))
(shpOrderImmediate theShipObj 'hold)
in the debug screen. Changing to this ship then had the ship moving as normal. But I haven't been able to make it work in the mod code.
Other existing uses of plyChangeShip create a new ship so don't have this problem.
Possibly relevant, not sure: when you change to a new ship, gSource remains as the previous ship while gPlayership is the new ship.
One of these days I might try to get the reactor power of the new ship and create a reactor for the ship using that, as you suggested some time ago (XML functions perhaps). This would match the normal ship reactor power and give a more realistic example of the ship IMO, ....one day, somewhen, possibly!
Also it's quite funny watching a Balin dragon stretch itself out when you change to one of its sections. Like a Slinky spring gone crazy!

Stupid code. Do what I want, not what I typed in!