Fractal Softworks Forum
December 18, 2018, 12:23:28 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Starsector 0.9a is out! (11/16/18)
 
   Home   Help Search Login Register  
Pages: 1 [2]
  Print  
Author Topic: Fix Alternating Weapon Mode.  (Read 747 times)
Alex
Administrator
Admiral
*****
Posts: 12800


View Profile
« Reply #15 on: October 11, 2018, 05:03:36 PM »

Alternating doing that gets pretty weird. You can select a specific weapon by cycling through the group, right? So what happens - does it only cycle through weapons that would fire? What about if a weapon that's selected goes from "would fire" to "wouldn't fire"? Does it select another weapon? If it does: this can mean that you think one weapon will fire, and then due to your mouse moving a bit another one does. If it doesn't: yep, still can fire out-of-arc weapons.

The interval between firing when the mouse button is held down also depends on the number of weapons in the group so the shots are evenly spaced out; if you only fire what's in the current arc, that breaks down to some degree as well.

(Hardpoints and missiles always fire regardless of mouse pointer location, even for linked, btw.)


Currently to get staggered autofire you have to manually fire first cycle as alternating, then let the group autofire - super inconvenient.

Since autofiring weapons fire individually and not as a group, any changes to alternating group mechanics would have zero impact here.
Logged
intrinsic_parity
Captain
****
Posts: 390


View Profile
« Reply #16 on: October 11, 2018, 05:19:10 PM »

What if you add a third fire mode? Maybe rename current alternating fire mode to 'select fire', and then make a new alternating fire mode with the suggested behavior of not firing weapons that can't aim in the target direction.
Logged
Sy
Admiral
*****
Posts: 1207



View Profile Email
« Reply #17 on: October 11, 2018, 05:44:44 PM »

Alternating doing that gets pretty weird. You can select a specific weapon by cycling through the group, right?
i gotta say, personally, i virtually never use that function. being able to have multiple different weapons in one group but being able to select which one fires sounds nice in theory, but in practise, it would require me to cycle through all different weapons in that group again after every single shot, if i want to keep firing that one weapon. the only case where i can see that being kinda useful is putting different ammo-limited missiles in one group, where you often want to fire only once anyway -- but even then, being able to select the correct missile quickly, without having to press the hotkey multiple times while playing close attention to the small weapons UI at the bottom of the screen, is usually a lot more important to me, especially since ammo-limited missiles are generally the weapons that most require precise timing to exploit an opening to be effective.

being able to effectively use alternating/rotating fire on anything other than hardpoints would be used way more often, by me. especially if autofiring an alternating weapons group would also cycle through all applicable weapons in an evenly spread-out manner (as it does when firing the same group manually by keeping the firing hotkey pressed), rather than making the AI fire all weapons in very quick succession with only minimal delay between them.


What if you add a third fire mode? Maybe rename current alternating fire mode to 'select fire', and then make a new alternating fire mode with the suggested behavior of not firing weapons that can't aim in the target direction.
i think that's a good idea. and with how the UI for switching between linked and alternating is set up already, it wouldn't even need any additional UI element. just keep cycling between 3 rather than 2 modes by clicking on it. anyone who could figure out how to switch between the 2 modes now will immediately figure out how to switch between the 3 as well.
Logged
Alex
Administrator
Admiral
*****
Posts: 12800


View Profile
« Reply #18 on: October 11, 2018, 06:11:50 PM »

the only case where i can see that being kinda useful is putting different ammo-limited missiles in one group, where you often want to fire only once anyway -- but even then, being able to select the correct missile quickly, without having to press the hotkey multiple times while playing close attention to the small weapons UI at the bottom of the screen, is usually a lot more important to me, especially since ammo-limited missiles are generally the weapons that most require precise timing to exploit an opening to be effective.

Limited-ammo missiles are the main intended use case for "alternating". If it's nice for something else, sometimes, that's a bonus. It's also kind of a failsafe where you *could* technically have a bit more missile variety without needing more weapon groups; obviously not ideal, but it's there for that edge case.

And, as I mentioned, the details of how it might even work get weird anyway.

especially if autofiring an alternating weapons group would also cycle through all applicable weapons in an evenly spread-out manner (as it does when firing the same group manually by keeping the firing hotkey pressed), rather than making the AI fire all weapons in very quick succession with only minimal delay between them.

That's just very fundamentally not how autofire works. Even conceptually, I'm not sure what it working that way would mean, since stuff like "picking a shared target for some subset of weapons" doesn't seem like the sort of problem that an autofire AI should even attempt to solve.
Logged
SafariJohn
Admiral
*****
Posts: 1249



View Profile
« Reply #19 on: October 11, 2018, 07:26:14 PM »

Maybe the special cases for "always fire" should be hardpoint and guided rather than hardpoint and missile? AFAIK, all guided weapons have the GUIDED_POOR or DO_NOT_AIM hints, so it wouldn't be hard to detect them.

Then let alternating's general case be to skip out of arc weapons when firing. So if you have weapon 2 selected, but only 1 and 3 are in-arc when you hold down fire, it skips 2 and alternates between shooting 1 and 3.

Kind of tired; am I missing something obviously wrong with this?
Logged

Alex
Administrator
Admiral
*****
Posts: 12800


View Profile
« Reply #20 on: October 11, 2018, 07:36:37 PM »

Maybe the special cases for "always fire" should be hardpoint and guided rather than hardpoint and missile? AFAIK, all guided weapons have the GUIDED_POOR or DO_NOT_AIM hints, so it wouldn't be hard to detect them.

Yep, that's what it does. I just was sort of saying "missiles" while meaning "somewhat guided missiles" Smiley

Then let alternating's general case be to skip out of arc weapons when firing. So if you have weapon 2 selected, but only 1 and 3 are in-arc when you hold down fire, it skips 2 and alternates between shooting 1 and 3.

Kind of tired; am I missing something obviously wrong with this?

Well, if 2 is selected, and you click to fire, I think it's super weird if 2 doesn't fire. Especially if, say, you're a degree or two out of arc. And since you're almost by definition using weapons you care about the firing order of here, or at least the pacing - otherwise why alternating? - then that seems rather not good. I suppose you could get around that by not showing what's "selected" to the player, to some extent, but.. eh.

Plus there's the rate-of-fire issue, i.e. it changing depending on where in the arc you are, how to "go in order" when the list of what you're going over changes (and may be subject to cooldowns from earlier firing), and so on.

It's just messy - both to implement and explain to the player, and I suspect it would do unexpected but "correct" things - and honestly I don't see a good use case for this. The ones being brought up generally involve autofire, which wouldn't factor in. It's probably not impossible, right. But if we're looking to get fine-grained control out of something that's looking like it'll be messy and somewhat unpredictable, that doesn't seem like a good start.

Edit: it's possible my perception of this is colored by where I'm at in the dev cycle. Speculative/maybe-good stuff like this is right out, you know? Only doing clear-cut things at the moment, with much more of a focus on just getting it done. So I guess my point is that this is definitely complicated and not a clear-cut-positive, rather than necessarily bad, if that makes sense.
« Last Edit: October 11, 2018, 07:42:50 PM by Alex » Logged
SafariJohn
Admiral
*****
Posts: 1249



View Profile
« Reply #21 on: October 11, 2018, 08:39:57 PM »

Maybe the special cases for "always fire" should be hardpoint and guided rather than hardpoint and missile? AFAIK, all guided weapons have the GUIDED_POOR or DO_NOT_AIM hints, so it wouldn't be hard to detect them.

Yep, that's what it does. I just was sort of saying "missiles" while meaning "somewhat guided missiles" Smiley


I tested with a Typhoon Reaper turret before I posted and it fired while way out of arc. Did you change it for 0.9?


Well, if 2 is selected, and you click to fire, I think it's super weird if 2 doesn't fire. Especially if, say, you're a degree or two out of arc. And since you're almost by definition using weapons you care about the firing order of here, or at least the pacing - otherwise why alternating? - then that seems rather not good. I suppose you could get around that by not showing what's "selected" to the player, to some extent, but.. eh.

Plus there's the rate-of-fire issue, i.e. it changing depending on where in the arc you are, how to "go in order" when the list of what you're going over changes (and may be subject to cooldowns from earlier firing), and so on.

I think usually you aren't going to be paying attention to what specific weapon is selected if you are holding fire down, you just want all the weapons to fire (that can hit). Add a little 2.5 to 5 degree fudge factor for the arc calculation and the "off by 2 degrees" wouldn't be a problem in 99.999% of situations.

For the rate-of-fire issue, I think you could control it sensibly by only recalculating when a weapon fires or the player re-presses the fire button.


Does anyone use an alternating group to manually control firing order? I imagine most people would use multiple groups if they wanted to do that.


All the situations I can think of where my suggestion could "go wrong" it would go worse the current way. Example: Antimatter Blaster turret that's selected but out of arc. Current way: fires at nothing. Suggested way: a hardpoint, guided weapon, or in-arc turret fires instead.
Logged

Alex
Administrator
Admiral
*****
Posts: 12800


View Profile
« Reply #22 on: October 11, 2018, 08:51:37 PM »

I tested with a Typhoon Reaper turret before I posted and it fired while way out of arc. Did you change it for 0.9?

For linked, the closest weapon to the mouse coordinates will fire even if it's out of arc.
Logged
SafariJohn
Admiral
*****
Posts: 1249



View Profile
« Reply #23 on: October 11, 2018, 09:05:24 PM »

I tested with a Typhoon Reaper turret before I posted and it fired while way out of arc. Did you change it for 0.9?

For linked, the closest weapon to the mouse coordinates will fire even if it's out of arc.

Since it was the only weapon in the group it would fire whether linked or alternating. Right. Hurr-durr, am tired as said.
Logged

Deshara
Admiral
*****
Posts: 976



View Profile Email
« Reply #24 on: October 11, 2018, 11:21:51 PM »

Alternating doing that gets pretty weird.

I remember Sword of the Stars 2 getting it correct, but I'm tired and don't remember how they did it.
I think it was just, when a weapon in alt mode fired it checked to see if the next gun could fire on the target and if not skipped it, and if it came into firing arc before the cycle came back around to said gun it'd just fire it immediately
Logged
CopperCoyote
Captain
****
Posts: 432



View Profile
« Reply #25 on: October 12, 2018, 06:45:02 PM »

As a work around to wasting flux you can pres the number key of the group you are on to advance to the next weapon.

Obviously if you have rapid fire weapons this it prohibitively time consuming, but i frequently use alternate fire for big fat weapons like hellbore. With a long cooldown switching back to the one you want to shoot is no problem.
Logged

Itches are scratched. Back-rubs are savored.
Pages: 1 [2]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.20 | SMF © 2006-2011, Simple Machines
Simple Audio Video Embedder
Valid XHTML 1.0! Valid CSS!