Page 1 of 1
Multible forward gunmounts and missile pylons
Posted: Sun Apr 12, 2015 11:16 am
by Vincentz
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.)
Re: Multible forward gunmounts and missile pylons
Posted: Sun Apr 12, 2015 1:06 pm
by maik
Check out [wiki]MFLPS[/wiki].
Re: Multible forward gunmounts and missile pylons
Posted: Sun Apr 12, 2015 1:38 pm
by Vincentz
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.
Re: Multible forward gunmounts and missile pylons
Posted: Mon Apr 13, 2015 1:15 pm
by Ngalo
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?
Re: Multible forward gunmounts and missile pylons
Posted: Mon Apr 13, 2015 4:55 pm
by cim
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.
Re: Multible forward gunmounts and missile pylons
Posted: Tue Apr 21, 2015 12:44 pm
by Ngalo
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]
Re: Multible forward gunmounts and missile pylons
Posted: Tue Apr 21, 2015 5:09 pm
by cim
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.
Re: Multible forward gunmounts and missile pylons
Posted: Tue Apr 28, 2015 6:38 pm
by Ngalo
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.
Re: Multible forward gunmounts and missile pylons
Posted: Wed Apr 29, 2015 9:42 am
by Vincentz
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?
Re: Multible forward gunmounts and missile pylons
Posted: Sun May 03, 2015 11:23 am
by Ngalo
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.