Is it possible to "steer" the player ship?

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: winston, another_commander

Post Reply
QCS
Dangerous
Dangerous
Posts: 112
Joined: Sun Feb 22, 2015 6:52 pm

Is it possible to "steer" the player ship?

Post by QCS »

I found that OXPs like ILS can change the ship's orientation (at least I guess, from the Javascript reference that that's what the scripts can do). However, it does not seem possible to really steer the ship like the player does it (with visible changes in the indicators for roll and pitch). At least I can not find anything in the Javascript reference. So, what's possible, what not? :-)

Thanks,
QCS
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: Is it possible to "steer" the player ship?

Post by cim »

In general:
- duplicating a player control which is toggled with "hold/release" is not possible, and due to the way the control system works would require major rewrites. (e.g. turning, injectors, throttle). With a joystick especially, the control system is receiving constant inputs on these controls, so an override wouldn't last long enough to actually take effect [1]
- duplicating a player control which is toggled with "press/press again" is possible in principle (e.g. hyperspace, docking clearance)
- duplicating a player control which has instant one-time effect is possible in principle (e.g. ECM, target selection)

Not everything which is possible in principle is actually possible with the current JS API. This may be because no-one has asked, or may be because we consider the user confusion potential from allowing an OXP to silently do that to be too great. But you can ask if there's something you want.

[1] The docking computer is a special case which hands over complete flight control to an AI and disables almost all control inputs while in operation. Currently that still uses the old plist AI. In theory it could use a JS AI instead, but I've not tested that, and there are built-in limitations to make it very difficult to use except as a DC.
QCS
Dangerous
Dangerous
Posts: 112
Joined: Sun Feb 22, 2015 6:52 pm

Re: Is it possible to "steer" the player ship?

Post by QCS »

Actually, I was thinking about two things...

1) Replacing the Docking AI by a more efficient one, in the means of a rather cheap software upgrade (nevertheless an 'item' in the store).
- The station might not allow the improved instructions (a GalCop station might only allow the "original" docking instructions they send).

2) Have another upgrade item for the improved Docking software, this time in hardware. It enables the player ship to transmit improved docking instructions to targetted (ident target) NPC ships and ask them to use those instructions instead. This depends on a number of factors though:
- The NPC ship must have a docking computer (the software upgrade is not necessary).
- An NPC may choose to not accept your instructions depending on your and their standing (a Fugitive may not accept instructions from a Clean), on your rating (which reflects your experience, somehow), on their own role (police/navy might not accept anything), on the ship weight and size differences (an NCP might suppose your instructions from your Adder might not be good for their Carrier), and of course a bit of randomness.
- Again, the station might not allow the improved instructions (a GalCop station might only allow the "original" docking instructions they send).
This item may also have another indirect slight improvement onboard: by accepting the improved instructions, technically we set a new AI. This may help to wake up stalled crowds in front of stations where only "bumping" them wakes them up normally.
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: Is it possible to "steer" the player ship?

Post by cim »

QCS wrote:
1) Replacing the Docking AI by a more efficient one, in the means of a rather cheap software upgrade (nevertheless an 'item' in the store).

2) Have another upgrade item for the improved Docking software, this time in hardware. It enables the player ship to transmit improved docking instructions to targetted (ident target) NPC ships and ask them to use those instructions instead.
The main difficulty with these is that station docking and launch traffic control depends on the NPC ships following the approach pattern. The station sends out the instructions for the next point in the docking approach, and they fly to it. This also allows multiple ships to be going through the approach pattern at once.

You can have NPC ships with their own docking routines - but they'd get treated by the station as if the player was trying to dock manually: without the trust that they follow the approach pattern exactly, they have to dock one at a time (so it would have to be much more efficient to be overall faster at clearing the queue, though this is certainly possible); with it, there can be two or occasionally three on approach at once.

(You'd also have to be very careful to avoid causing queue jams where the station thinks a ship is going to approach but it's actually doing something else)
QCS wrote:
This item may also have another indirect slight improvement onboard: by accepting the improved instructions, technically we set a new AI.
That would work with ships using the old plist AIs, but if you do that with a JS AI ship you'll be potentially leaving it in a bad state should it cancel the docking routine for whatever reason. Still not impossible, but you'll need to be very careful here.

Stalled crowds outside the station are a core bug which needs fixing, if they can still happen.

It is all possible in theory, but certainly not straightforward.
User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6311
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: Is it possible to "steer" the player ship?

Post by Diziet Sma »

QCS wrote:
Replacing the Docking AI by a more efficient one
Well, if you think you're up to it, why not try to do this in the Trunk code itself? If you succeed, the devs would be more than happy to incorporate your patch.

(and I'm sure you'd find some willing testers here)
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
Post Reply