Safety switch for weapons?

An area for discussing new ideas and additions to Oolite.

Moderators: winston, another_commander

User avatar
Bugbear
---- E L I T E ----
---- E L I T E ----
Posts: 415
Joined: Sun Sep 17, 2006 1:30 am

Safety switch for weapons?

Post by Bugbear »

I know that something similar has been suggested before...

tonight I was getting myself into position to dock, using keyboard control.

Got distracted by my better half, then looked back at screen and saw the station approaching fast. I hit the 's' key to slow down but...

...two minutes later I'm a fugitive and a cop killer to boot.

This suggestion is more about adding immersion, similar to the 'request docking permission' oxp that I quite like.

Basically, I'm just after a key assigned to a weapons on / off switch.
Switeck
---- E L I T E ----
---- E L I T E ----
Posts: 2411
Joined: Mon May 31, 2010 11:11 pm

Post by Switeck »

Change what keys map to what, so at least a fumble is less likely to hit your fire button. You could even require using shift with the fire key to make it even less likely.
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6683
Joined: Wed Feb 28, 2007 7:54 am

Post by another_commander »

The code for this request is ready to go in trunk. I will run a few more tests, then it will go in as trial code in the initial phase.

The way it is implemented is as follows:
Press '_' to toggle weapons lockdown. The message "Weapons systems online" or "Weapons systems offline" comes up accordingly, accompanied by the sound of the user's choice. The crosshairs are darkened when offline for visual indication. When weapons are locked down, no lasers can be fired in any direction. This could be useful when approaching stations, where accidental fire could lead to very unpleasant situations.
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16081
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Post by Cody »

I like that idea, a_c… it adds to the immersion factor. Did you code that today, or was it already in the pipeline?
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6683
Joined: Wed Feb 28, 2007 7:54 am

Post by another_commander »

Today. I had the idea in the back of my head for some time now, but since it came up now anyway, I thought what the hey, let's do it... ;-)
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16081
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Post by Cody »

As I've said before... you guys amaze me!
Does it also 'safe' missiles, or will I still have to use 'u' for that?
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6683
Joined: Wed Feb 28, 2007 7:54 am

Post by another_commander »

For now it does not affect missiles and that is because you cannot really fire a missile by accident (you have to target it first). But this is a part of the tests I would like to run before commiting anything.
User avatar
maik
Wiki Wizard
Wiki Wizard
Posts: 2028
Joined: Wed Mar 10, 2010 12:30 pm
Location: Ljubljana, Slovenia (mainly industrial, feudal, TL12)

Post by maik »

another_commander wrote:
Today. I had the idea in the back of my head for some time now, but since it came up now anyway, I thought what the hey, let's do it... ;-)
Excellent! Thanks! :)
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16081
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Post by Cody »

If you’re coming in to dock on manual, with an armed missile, it’s quite easy to fire one by mistake, as it’ll be locked-on to the station. I know, I’ve done it.
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
User avatar
Bugbear
---- E L I T E ----
---- E L I T E ----
Posts: 415
Joined: Sun Sep 17, 2006 1:30 am

Post by Bugbear »

a_c, does your tweak also disable the Energy Bomb?
User avatar
Killer Wolf
---- E L I T E ----
---- E L I T E ----
Posts: 2278
Joined: Tue Jan 02, 2007 12:38 pm

Post by Killer Wolf »

nice work.
is it possible then to now spoof laser damage by (scripting?) a bit where if you take some damage the laser lock will activate until you dock and get it repaired? might make for some truly hairy combat experiences.
Ganelon
---- E L I T E ----
---- E L I T E ----
Posts: 534
Joined: Fri Jul 02, 2010 11:45 am
Location: Around Rabiarce or Lasoce

Post by Ganelon »

I think it's a cool idea, especially if we can add some voice bits. "Weapons are now hot.." "Primary weapons system standing down.." or something like that.

I've both shot and launched a missile at stations when doing a manual landing, especially with a joystick. I ended up moving the missile button off the joystick, so I have buttons for r,t, and u, but for m I have to reach out and push the button. Sort of more satisfactory like that anyway, in an odd way. And you learn to take your finger entirely off the trigger during tricky landings. LOL

I've also considered a hardware solution. Basically wire up a couple of nice big lighted toggle switches with safety covers as the "safe/arm" for laser and missile. But that could still be done with the safety switch in the program anyway, just set up those switches to basically make the keypresses for whatever the software needs. With a confirming message on the screen and/or an accompanying voice or sound effect bit, it'd just be even cooler.
Sleep? Who needs sleep? Got game. No need sleep.
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6683
Joined: Wed Feb 28, 2007 7:54 am

Post by another_commander »

The system has been upgraded to include all weapons, namely lasers, missiles, mines and energy bomb. Missiles and mines can still be armed, circled with 'Y' and get assigned targets in weapons lock mode, but they will not fire until the system is released again. Missiles and mines display is also darkened when locked and a new HUD element, the "Weapons offline" text has been added to the HUD display lists. This switches on when... guess ;-). Also, since the messages indicating status are definable via descriptions.plist, Ganelon's idea of having the ship's computer announcing weapons status is very doable just by enabling the speech option.

The weapons status is saved so that when you load a player saved in "weapons asleep" mode, the same mode will be resumed upon load.

Pics of the system: left is standard, right is with weapons locked.
Image Image

If all goes well, I should be able to roll this in later today.

Edit: And... done. Revision 3774.
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16081
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Post by Cody »

Ah great... a good reason to download trunk and have a gander.
I'll do that tomorrow... and find out if Norton's still hates me installing it.
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
User avatar
Cmd. Cheyd
---- E L I T E ----
---- E L I T E ----
Posts: 934
Joined: Tue Dec 16, 2008 2:52 pm
Location: Deep Horizon Industries Manufacturing & Research Site somewhere in G8...

Post by Cmd. Cheyd »

a_c-
Is it possible to also allow this weapon toggle to be joystick-button activated, please?
Post Reply