Multible forward gunmounts and missile pylons

An area for discussing new ideas and additions to Oolite.

Moderators: winston, another_commander

Post Reply
User avatar
Vincentz
Deadly
Deadly
Posts: 174
Joined: Sun Mar 22, 2015 11:26 pm

Multible forward gunmounts and missile pylons

Post by Vincentz » Sun Apr 12, 2015 11:16 am

What surprises me is that (afaik) it haven't been done yet.
I've seen the "switch between two" but they are still positioned the same place.

Wouldn't it be cool to have f.ex lasers coming from two places?

Even if it was only graphical (damage dealt would be same as single laserbeam), it would be nice for some shipmodels to have the feature of twin laser shots.
The same with missiles. (though fired one at a time, it would switch between the configured mounts.)

Image
"There is a single light of science, and to brighten it anywhere is to brighten it everywhere." - Isaac Asimov

User avatar
maik
Wiki Wizard
Wiki Wizard
Posts: 1872
Joined: Wed Mar 10, 2010 12:30 pm
Location: Ljubljana, Slovenia (mainly industrial, feudal, TL12)

Re: Multible forward gunmounts and missile pylons

Post by maik » Sun Apr 12, 2015 1:06 pm

Check out [wiki]MFLPS[/wiki].

User avatar
Vincentz
Deadly
Deadly
Posts: 174
Joined: Sun Mar 22, 2015 11:26 pm

Re: Multible forward gunmounts and missile pylons

Post by Vincentz » Sun Apr 12, 2015 1:38 pm

maik wrote:Check out [wiki]MFLPS[/wiki].
Thanks. Though it seems overly complicated for a non-programmer as myself, and according to author also bugged somewhat.
What I was hoping for would be something like this (in shipdata.plist)

"weapon_position_forward" = "3.0 0.0 25";
"weapon_position_forward_alt" = "-3.0 0.0 25";

which would work as if there was just 1 laser installed, though graphically it would look like 2.

same with :
"missile_launch_position" = "3 1 10";
"missile_launch_position_alt" = "-3 1 10";
though it would fire 1 and change pos after every missile launch, not fire 2 missiles.

guess it would have to be hardcoded, though not impossible if I should guess.
"There is a single light of science, and to brighten it anywhere is to brighten it everywhere." - Isaac Asimov

Ngalo
Competent
Competent
Posts: 58
Joined: Mon Mar 02, 2015 2:08 pm
Location: drifting in remLock mask near Vezadi Station

Re: Multible forward gunmounts and missile pylons

Post by Ngalo » Mon Apr 13, 2015 1:15 pm

I think there is some existing code in one of Jaguar Company's ship scripts and possibly some of Griff's multi-decal player cobras which re-positions missiles on launch. Those OXPs use it for externally mounted missiles but I expect it could be adapted to work the way you seem to be asking for.

As for multiple front lasers, I have some tentative ideas about an OXP workaround for this but it would only work if a ship with -5 accuracy will always fire at a target positioned so it will definitely miss by a small amount. Could any more knowledgeable Dark Siders tell me whether this is the case?

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

Re: Multible forward gunmounts and missile pylons

Post by cim » Mon Apr 13, 2015 4:55 pm

Ngalo wrote:As for multiple front lasers, I have some tentative ideas about an OXP workaround for this but it would only work if a ship with -5 accuracy will always fire at a target positioned so it will definitely miss by a small amount. Could any more knowledgeable Dark Siders tell me whether this is the case?
I was wondering how long it would take someone to think of that approach. You'll have some interesting workarounds to do for the case where it's the secondary laser which kills the target, but it's certainly possible.

Provided you make the target small enough, yes, it should always fire. Alternatively, make the target model have two tiny blobs placed a few metres either side of the centre, and position it for a perfect hit - the shot will go between the blobs and miss, if you orient the target right, but the AI will think its perfectly on target.

Ngalo
Competent
Competent
Posts: 58
Joined: Mon Mar 02, 2015 2:08 pm
Location: drifting in remLock mask near Vezadi Station

Re: Multible forward gunmounts and missile pylons

Post by Ngalo » Tue Apr 21, 2015 12:44 pm

cim wrote: Alternatively, make the target model have two tiny blobs placed a few metres either side of the centre, and position it for a perfect hit - the shot will go between the blobs and miss,
Amazing. Thanks. I knew Oolite computed its laser hits pretty precisely, but for some reason I never thought of doing it quite that way.
[crazy uber-ship idea]
Does this mean that a ring-shaped ship might actually get missed a lot by high-skill AIs because they always aim for the hole in the middle?
[/crazy uber-ship idea]

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

Re: Multible forward gunmounts and missile pylons

Post by cim » Tue Apr 21, 2015 5:09 pm

Ngalo wrote:Does this mean that a ring-shaped ship might actually get missed a lot by high-skill AIs because they always aim for the hole in the middle?
Quite possibly, at least from the front - though if you fitted the weapons and viewport onto something which was physically there it might feel quite odd to fly at times.

Ngalo
Competent
Competent
Posts: 58
Joined: Mon Mar 02, 2015 2:08 pm
Location: drifting in remLock mask near Vezadi Station

Re: Multible forward gunmounts and missile pylons

Post by Ngalo » Tue Apr 28, 2015 6:38 pm

Ok, here's a quick attempt I made to implement the idea on a modified Iguana. It only works on Oolite 1.81 (though a version could be made for earlier versions) and is still quite buggy (the guns fall off in witchspace!) But I think it serves to demonstrate the concept.

If I can squash a few of the bugs, a similar technique might allow player ships with laser turrets, both automatic and manually aimed.

User avatar
Vincentz
Deadly
Deadly
Posts: 174
Joined: Sun Mar 22, 2015 11:26 pm

Re: Multible forward gunmounts and missile pylons

Post by Vincentz » Wed Apr 29, 2015 9:42 am

Ngalo wrote:Ok, here's a quick attempt I made to implement the idea on a modified Iguana. It only works on Oolite 1.81 (though a version could be made for earlier versions) and is still quite buggy (the guns fall off in witchspace!) But I think it serves to demonstrate the concept.

If I can squash a few of the bugs, a similar technique might allow player ships with laser turrets, both automatic and manually aimed.
Stupid question, but how do I get the Iguana?
"There is a single light of science, and to brighten it anywhere is to brighten it everywhere." - Isaac Asimov

Ngalo
Competent
Competent
Posts: 58
Joined: Mon Mar 02, 2015 2:08 pm
Location: drifting in remLock mask near Vezadi Station

Re: Multible forward gunmounts and missile pylons

Post by Ngalo » Sun May 03, 2015 11:23 am

Vincentz wrote: Stupid question, but how do I get the Iguana?
For testing, I used the debug console: player.replaceShip("sbs_neoship_iguana-player"). Only works when docked, not in-flight.
However I have subsequently seen it at one high-tech shipyard if you're prepared to spend ages wandering around in search of one.

Post Reply