Join us at the Oolite Anniversary Party -- London, 7th July 2024, 1pm
More details in this thread.

Missile changes and the multi-target expansion

An area for discussing new ideas and additions to Oolite.

Moderators: winston, another_commander

Post Reply
User avatar
Micha
Commodore
Commodore
Posts: 815
Joined: Tue Sep 02, 2008 2:01 pm
Location: London, UK
Contact:

Missile changes and the multi-target expansion

Post by Micha »

Ok, so with all these different types of equipment coming out which is pylon-mounted there ought to be a mechanism for pilots to switch between pylons even if they don't have a multi-target expansion installed.

I've modified the code to do so, but in the process I've become aware that it's pretty kludgy as far as targetting is concerned. IMHO the same can be said for the current implementation with the multi-target expansion.

Basically, currently it works as follows:
If you switch to another missile, the targetting computer stops tracking your current target. If the new missile has a target it switches to that, otherwise you're left with no current target and you have to 't'arget either your existing target again, or a new one, depending on what you're after. Once you've assigned targets to all your missiles you can flick through your pylons and the targetting computer automatically picks up the target which was saved for that missile - except it also switched into 'ID' mode so you have to press 't'arget again in order to fire the missile or to switch to the next one. Also if you have mines in your arsenal whenever you switch to a mine, you stop tracking your current target. Not good in a dogfight.

I guess an improved implementation could be:
You're either in ID mode or Targeting mode. In ID mode you never lock missiles onto anything. Currently you do, but you can't actually fire the missile - you still have to press 't'arget in order to switch to targetting mode and fire it off.

In Targetting mode, your currently selected missile locks onto your target. Switching to the next missile saves that target for that missile if you have the target-expansion, otherwise it clears that missiles' target. Your newly selected missile automatically locks onto your current target unless it is already locked onto a target in which case your targetting system switches to the missiles' target. You need to press 't'arget to retarget the missile to a new target. If you switch to a mine, it only becomes armed (since mines can't have targets), but your targetting computer continues to track your current target, if any.

Thoughts? Comments?
The glass is twice as big as it needs to be.
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5525
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

One other cosmetic thing that would be nice whilst this section of code is being hacked is to be able to over-ride the "Mine armed." (and "Missile armed.") message that appears when you use the "t" key via a shipdata.plist key with something more appropriate. I propose for example the key value being the string to be displayed instead, with the default if the key is not present being the above text.

Here I mean of course specifically for equipment with role _MINE and _MISSILE. Then the message could be tailored to something more appropriate to what you're using, especially as _MINE is now used for so much other equipment than mines.
User avatar
Micha
Commodore
Commodore
Posts: 815
Joined: Tue Sep 02, 2008 2:01 pm
Location: London, UK
Contact:

Post by Micha »

Ok, I think I got it working the way I want.

I'll see about your cosmetic change tomorrow.. err.. later today :D
The glass is twice as big as it needs to be.
Post Reply