Multiple Firing Arcs

Multiple Firing Arcs

Requests for features in the spring code.

Moderator: Moderators

Post Reply
SpikedHelmet
MC: Legacy & Spring 1944 Developer
Posts: 1948
Joined: 21 Sep 2004, 08:25

Multiple Firing Arcs

Post by SpikedHelmet »

Possible? Currently arcs are done by providing x y z co-ords for the direction, and a value to define the size of the cone the weapon can fire in this direction. Request is to be able to define multiple arcs using multiple sets of x y z co-ords; for instance:
"weaponMainDir1=1 0 0, -1 0 0;"
"maxAngleDif1=90;"

-- this would allow the weapon to fire in 90 degree arcs both to the right and left but not forward and rear, comprising an "X-type" firing capability. The ability to define the maxAngleDif for each co-ordinate set isn't particularly necessary (so it wouldnt need MaxAngleDif1=90, 90; for example); it would simply use the one angle-size for both directions.
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: Multiple Firing Arcs

Post by hoijui »

can you not use two weapons?
SpikedHelmet
MC: Legacy & Spring 1944 Developer
Posts: 1948
Joined: 21 Sep 2004, 08:25

Re: Multiple Firing Arcs

Post by SpikedHelmet »

No unfortunately I can not. We're talking about a ship with turrets along the centerline that can shoot on either side but not forward or backward.
User avatar
Pressure Line
Posts: 2283
Joined: 21 May 2007, 02:09

Re: Multiple Firing Arcs

Post by Pressure Line »

You can Spiked :P IIRC the problem with that is that the larger S44 ships are hitting the weapon limit.
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: Multiple Firing Arcs

Post by hoijui »

could the turret be a second unit, transported by the ship, having two weapons?
Masure
Posts: 581
Joined: 30 Jan 2007, 15:23

Re: Multiple Firing Arcs

Post by Masure »

Why is the weapon count limited ?
User avatar
Rafal99
Posts: 162
Joined: 14 Jan 2006, 04:09

Re: Multiple Firing Arcs

Post by Rafal99 »

No idea, but it is just a simple #define in Spring code, can be changed at any time. Would be nice to make it mod-definable imho.

@Spiked:
Can't you do it in unit script by blocking the gun from shooting in directions you don't want and/or ingoring the targets?
User avatar
Nemo
Spring 1944 Developer
Posts: 1376
Joined: 30 Jan 2005, 19:44

Re: Multiple Firing Arcs

Post by Nemo »

Raising that #define to something higher (say 64?) would be super handy at times (especially now that we can do lua unitscripts which don't require writing out X number of weapon scripts). That said, I imagine there's a reason it isn't set at some arbitrarily high value already, so letting it be defined by mod would be nice as well.
User avatar
yuritch
Spring 1944 Developer
Posts: 1018
Joined: 11 Oct 2005, 07:18

Re: Multiple Firing Arcs

Post by yuritch »

Spiked: unwanted targets (which cause aiming in restricted arcs) can be filtered script-side, by using set CHANGE_TARGET to <weapon number> (not yet sure how to do that in lua, but afaik no ships apart from my Gangut use lua scripts yet).
User avatar
REVENGE
Posts: 2382
Joined: 24 Aug 2006, 06:13

Re: Multiple Firing Arcs

Post by REVENGE »

yuritch wrote:Spiked: unwanted targets (which cause aiming in restricted arcs) can be filtered script-side, by using set CHANGE_TARGET to <weapon number> (not yet sure how to do that in lua, but afaik no ships apart from my Gangut use lua scripts yet).
Eh? That sounds interesting, do you have an example unit with a bunch of weapons and script I could look at?
User avatar
yuritch
Spring 1944 Developer
Posts: 1018
Joined: 11 Oct 2005, 07:18

Re: Multiple Firing Arcs

Post by yuritch »

I'll make an example when I'll get home. Probably using one of S44 ships as a base (they have lots of weapons). You'll need a testing build of S44 to see it though.

Edit: unit files attached. Torpedo launchers on the destroyer are limited by both maxangledif AND script. This seems to work ingame (but this change is not in S44 builds, so I don't have any testing data from naval battles).
Attachments
pr7.7z
(72.72 KiB) Downloaded 11 times
Post Reply

Return to “Feature Requests”