Page 2 of 4
Re: Laser Mount Switching System (LMSS)
Posted: Wed Jul 08, 2015 3:10 am
by phkb
Version 2.0.0 has just been released. The big improvement in this version is the ability to use any OXP laser (eg from "New Lasers" or "Laser Cannons"). Want to try out one of those cool new lasers, but don't want to give up your ever-reliable military laser? The LMSS is just for you!
In this version:
- Made the LMSS compatible with all OXP lasers.
- Added interface screen to allow dockside laser configuration.
- Added manifest entries to display secondary laser installations.
- Fixed bug where the startUpComplete function wasn't being executed due to badly formed definition.
- Switched terminology from "Front" to "Forward" for better in-game consistency.
- Added compatibility with Xenon HUD's image crosshairs.
- Added the ability to remove all LMSS components. Removing a mount will also remove the secondary laser (if installed) and refund the cost of the laser.
The process of installing secondary lasers is this:
1. Buy the LMSS Assembly in the position you desire (ie Front, Aft, etc)
2. Go to the interface F4 screen and select "LMSS Dockside Configuration".
3. Switch the primary laser into the secondary position. The secondary position should initially be listed as "--None--", meaning no laser is installed there. After switching, the primary position should say "--None--".
4. Go to the F3 Ship Outfitting screen and buy a new laser in the same position.
And you're done! You now have two lasers in that position. You can now switch them while docked via the F4 interface screen, or in flight using the primable equipment as before. To see what lasers you have in secondary positions you need to go to the F5F5 Manifest screen, where the secondary lasers are listed under the heading "LMSS Secondary Laser Installations".
Re: Laser Mount Switching System (LMSS)
Posted: Wed Jul 08, 2015 12:31 pm
by Norby
Nice work, thank you!
Some example usage with
Cannons:
1. Artillery Cannon + Blunderbuss Cannon
-Artillery Cannon has 20km range but in damage/second is around a Beam laser only.
-Blunderbuss Cannon has only 5km range but do a bit more damage/second than a Military Laser and better cooled.
You can use the first if you want to hit something in distance and switch to the second in dogfight.
2. In at least a Python: Vulcan Cannon + Plasma Web
- Vulcan Cannon has 15km range, Military-grade damage/second and very low heat.
- Plasma Web is usable within 1km only but kick out the pilot fast.
The first is usable in any danger but switch to the second if you plan to make a derelict ship from your target.
Re: Laser Mount Switching System (LMSS)
Posted: Sat Jul 25, 2015 7:41 pm
by Obsidian
I think there might be a conflict/hitch with LMSS and Ship Respray. If I have LMSS and lasers installed and then respray, I get the following effects:
1.) LMSS Dockside configuration unavailable in the menu unless you launch and re-dock. (Unsure if save/reload returns the LMSS Dockside Configuration menu option.)
2.) Secondary laser is removed after respray (which can be noticed after re-docking when the LMSS configuration menu option returns).
Unrelated question (that I ask only because the Respray use had me notice it): Are the external views for alternate ZGroovy Cobra IIIs set farther away than the external views in the core shipset? I hope the ships themselves aren't smaller, because then ALL the ships would need to be smaller.
Re: Laser Mount Switching System (LMSS)
Posted: Sun Jul 26, 2015 12:09 am
by phkb
Obsidian wrote:I think there might be a conflict/hitch with LMSS and Ship Respray.
Thanks for the heads up. Bug fix on the way shortly.
Obsidian wrote:Are the external views for alternate ZGroovy Cobra IIIs set farther away than the external views in the core shipset?
Quite possibly. I doubt the ships themselves would be smaller, or they wouldn't really be Cobra Mk III's.
Edit: OK, a fix for this OXP is available from the Box.com links:
OXP version here:
https://app.box.com/s/bah2v9yjmbnnf3tcfa73hzyvue7rl1iq
OXZ version here:
https://app.box.com/s/0bpw5ov0jjetztmtzkc6eh1id5em038b.
The wiki is down for maintenance at the moment. Once it's up again this afternoon I'll update the download manager.
Re: Laser Mount Switching System (LMSS)
Posted: Sun Jul 26, 2015 3:45 am
by phkb
Version 2.0.2 has been released and is now available via the download manager and the Box.com links. This version fixes the compatibility issue with Ship Respray.
Re: Laser Mount Switching System (LMSS)
Posted: Sun Jul 26, 2015 5:34 pm
by Obsidian
Wow, that was fast. I downloaded and can confirm (for what it's worth
) that all is well with LMSS after a respray.
Re: Laser Mount Switching System (LMSS)
Posted: Sun Aug 16, 2015 1:28 pm
by moewe
Hello,
first I'd like to give respect to all developers of this game and the addons. It's great fun. A more than 25 year old dream came true! Thanks!
I've got a problem with the LMSS and the New Lasers OXP:
Using at least one of the new lasers the following happens:
While docked:
Switching the lasers' position they disappear one after the other in the first mount. So switching two times results in both lasers having disappeared.
Switching in flight results in loosing the first laser. The second one will take it's place and cannot be switchted anymore (since there's only one left I guess).
With the New Lasers OXP-Versions of the core game lasers this doesn't happen. Only the added lasers seem to be affected.
I'm using the newest versions of the mentioned OXPs available in the addon manager today (New Lasers 0.5 and LMSS 2.0.3).
Oolite version is 1.82.
Does anybody have an idea how to solve this.
Thanx.
Re: Laser Mount Switching System (LMSS)
Posted: Sun Aug 16, 2015 3:22 pm
by phkb
I'll have a look at it shortly.
Re: Laser Mount Switching System (LMSS)
Posted: Sun Aug 16, 2015 3:32 pm
by phkb
OK, I just tried with New Lasers and I got it to work right out of the box, which means I must be doing something slightly different to you. In the front position I have the LF90 Military laser, and the Ingram 1867GC1 Megablast Defence laser. I switched them both dockside and in flight without issue. What two lasers did you have, and in what positions did you have them?
Edit: What I did notice, though, is because New lasers creates really long names for all the lasers (built in and additional) it messes with the screen layout on the dockside config screen. I'll have to look at that at some stage.
Edit 2: And also, welcome to the boards!
Re: Laser Mount Switching System (LMSS)
Posted: Sun Aug 16, 2015 4:39 pm
by moewe
Hey phkb,
thanks and thanks again for the quick reply.
Might be that just the Uber-Lasers are affected.
I'll try some combinations to find out what exactly doesn't work..
Re: Laser Mount Switching System (LMSS)
Posted: Sun Aug 16, 2015 5:49 pm
by moewe
Ok, tried some things..
Seems like only the 'Impasse Resolver' is affected.
I tried some different combinations with lasers of all types,
including the PewPew, DoomLens and Impasse Resolver (IR) as well as some "normal" lasers and a cannon.
As soon as the IR is installed I can move it from the 1st to 2nd position but not back. When I try, both positions get the laser mounted in the 1st position (if the first is empty, both slots become empty after switching).
In flight I can use the IR in the first position, but when I switch to the 2nd and then switch again there is no laser in that position anymore.
All other combinations worked dockside and in flight.
Hope, this makes sense..
Edit:
The same problem just happened with combination ARM 64 Mining Laser and DoomLens. Both positions ended up having the mining laser installed after trying to switch the DommLens back to the first position.
Re: Laser Mount Switching System (LMSS)
Posted: Sun Aug 16, 2015 8:07 pm
by phkb
Thanks for that. I'll try to uncover why later this morning
Re: Laser Mount Switching System (LMSS)
Posted: Sun Aug 16, 2015 10:00 pm
by phkb
OK, I've uncovered the problem. The issue is actually in two spots. Firstly, New Lasers has conditions for purchasing the DoomLens laser and they are not always true. They are based on the planet you are at. If you go somewhere else, the conditions change and it's no longer available. Secondly, LMSS is scripting the removal and switching of lasers, but the condition script is seeing this as a purchase, and because of that it is applying it's conditions, seeing that the place where you doesn't supply that laser and forbidding it to be used.
So, I had thought that this would be a simple request to Redspear to add a
if (context == "scripted") return true
line to his condition script, but unfortunately it's not quite that simple, because the context for lasers is always "purchase". Thus there is no way for the condition script to know the difference between the LMSS operation and a normal purchase event. For the devs: is this correct? Shouldn't the scripted addition of a laser have the context of "scripted" rather than "purchase"?
Therefore I have added a flag that is set to true just before I do any switching, and set back to false afterwards. So Redspear only needs to add two lines to the start of his condition script:
Code: Select all
var lmss = worldScripts.LMSS_Core;
if (lmss && lmss._switching == true) return true;
That will check with LMSS and see if a switching event is taking place, and if so, allow it to happen.
The issue doesn't happen with Norby's Laser Cannons because, in that scenario the conditions are based on ship mass which are always true regardless of where the player is. Thus his lasers can always be switched and no change is required.
Version 2.0.4 has just been released with my fix in it. I'll send the required code to Redspear so he can do an update.
Re: Laser Mount Switching System (LMSS)
Posted: Mon Aug 17, 2015 6:07 am
by cim
phkb wrote:For the devs: is this correct? Shouldn't the scripted addition of a laser have the context of "scripted" rather than "purchase"?
Yes, it should. The current nightly builds have been doing this correctly for about a week, but you'll have to find another way to do it for 1.82.
(Easiest one I can think of: set a temp variable just before making the change, in the condition script check for that variable, then unset the temp variable again after making the change)
Re: Laser Mount Switching System (LMSS)
Posted: Mon Aug 17, 2015 8:31 am
by phkb
cim wrote:(Easiest one I can think of: set a temp variable just before making the change, in the condition script check for that variable, then unset the temp variable again after making the change)
yeah, that's the approach I took. Thanks for the confirmation.