(Release) Manual Witchspace Alignment

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: winston, another_commander

User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4830
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

(Release) Manual Witchspace Alignment

Post by phkb »

Players who have installed the Advanced Navigation Computer OXP have noticed the change that takes place to hyperspace countdowns. Now, instead of just jumping with your ship pointing in any direction, the ANC will auto-rotate your ship to align with a visible witchspace destination. This is without even purchasing the ANC equipment item itself.

I always liked the idea that a witchspace jump needed to be aligned with some destination, and I really appreciated the ANC for this reason, except for one thing - I wanted to do the alignment myself. I was OK with the ANC doing auto-alignment after it was purchased, but I wanted the process to be manual if I hadn't.

Changes in Oolite 1.85/86 now allow this manual alignment method to be fully implemented. The OXP linked below borrows heavily from the ANC, and so I must give credit to Cmdr. Cheyd, Phantor Gorth, Svengali and Submersible for their original work.

Once this OXP is installed, and you initiate a hyperspace jump, your jump will not start straight away. Instead, you will see a new item appear on your space compass, showing you the direction you must face to start the countdown. Once you align your ship with the beacon, the countdown will begin. You must keep your ship aligned with the beacon in order to complete the jump. If you are forced to deviate from your course, the countdown will stop and you will need to re-align to start it again. If the destination beacon is behind a planet, the sun, or a station, you will need to navigate around the entity before the countdown will begin.

If you don't have a space compass (eg when you start a new commander), you will instead be given console messages informing you of the location of the beacon. eg "Left and Up" or "Down and Right". These messages will also be shown if you find yourself in interstellar space, where the space compass does not work.

The instructions above apply whether you are using the ANC or not. The ANC is not a pre-requisite of this OXP, although if both are installed they will operate in harmony. Up until the point you actually purchase the ANC, you will need to manually align your ship. Once you have the ANC on board, however, the auto-alignment operation will take over.

To force a mis-jump with the Manual Witchspace Alignment OXP installed, first align your ship with the destination beacon. Then quickly pull up using the keyboard (normally the down arrow key). The countdown should continue while your ship is looping.

Feedback welcome. As a technical note, the method I'm using the check if a station is in the way of the player is rather clunky - I'm essentially using the same method as for a planet, taking the largest side of the bounding box and using that value divided by 2 as a radius. If anyone can suggest a better method of telling if the player is heading directly for the station please let me know.

You can download via the manager, or if you want to do it manually, here's the link: ManualWitchspaceAlignment.oxz

Please note: This OXP will change the default behaviour of your ship when performing witchspace jumps. All of them. Every time. Make sure you like the idea before you install.
Last edited by phkb on Thu Sep 20, 2018 5:44 am, edited 1 time in total.
User avatar
Damocles Edge
---- E L I T E ----
---- E L I T E ----
Posts: 256
Joined: Thu Mar 30, 2017 9:57 pm

Re: (Release) Manual Witchspace Alignment

Post by Damocles Edge »

A good idea to extend the usage of the ANC (I keep thinking of the African National Congress :? )
I have really enjoyed the immersion that having the Advanced Nav Comp running has offered will look forward to installing & running this OXP.

Cheers phkb.
O.C.T.D (Oolite Crash Test Dummy) Hmm Hmm Hmm Hmm......
Astrobe
---- E L I T E ----
---- E L I T E ----
Posts: 609
Joined: Sun Jul 21, 2013 12:26 pm

Re: (Release) Manual Witchspace Alignment

Post by Astrobe »

Nice, nice, nice!

v1.86 includes a patch that lets you change the compass mode; It could be abused to force a basic compass to the desired mode, which could make the directions on console part (when there's only a basic compass) unnecessary.

I was checking if it could actually be useful by playing with compass modes (with an ASC), engaging and cancelling jumps when a game freezing bug occured:

Code: Select all

18:58:10.722 [script.javaScript.timeLimit]: ***** ERROR: Script "navi_mfd" ran for 33.2507 seconds and has been terminated.
18:58:10.722 [script.javaScript.stackTrace]:  0 (C:\myo/oolite/oolite.app/GNUstep/Library/ApplicationSupport/Oolite/ManagedAddOns/oolite.oxp.spara.navigation_mfd.oxz/Config/script.js:126) <anonymous function>
18:58:10.722 [script.javaScript.stackTrace]:     this: [Script "navi_mfd" version 1.8.1]
18:58:10.722 [script.javaScript.stackTrace]:  1 (C:\myo/oolite/oolite.app/GNUstep/Library/ApplicationSupport/Oolite/ManagedAddOns/oolite.oxp.spara.navigation_mfd.oxz/Config/script.js:362) <anonymous function>
18:58:10.722 [script.javaScript.stackTrace]:     this: [Script "navi_mfd" version 1.8.1]
18:58:10.722 [script.javaScript.stackTrace]:     mode: "COMPASS_MODE_PLANET"
18:58:10.722 [script.javaScript.stackTrace]:     whom: [Planet position: (0, 0, 499720) radius: 38440 m]
18:58:10.722 [script.javaScript.stackTrace]:  2 (mwa_main.js:255) <anonymous function>
18:58:10.722 [script.javaScript.stackTrace]:     this: [Script "ManualWitchspaceAlignment" version 1.0]
18:58:10.722 [script.javaScript.stackTrace]:     cancelled: true
18:58:10.722 [script.javaScript.stackTrace]:     ps: [Script "oolite-default-player-script" version 1.87]
18:58:10.722 [script.javaScript.stackTrace]:     p: [PlayerShip "Adder" position: (1214.75, 4665.67, 7341.71) scanClass: CLASS_PLAYER status: STATUS_IN_FLIGHT]
18:58:10.722 [script.javaScript.stackTrace]:  3 (mwa_main.js:123) <anonymous function>
18:58:10.722 [script.javaScript.stackTrace]:     this: [Script "ManualWitchspaceAlignment" version 1.0]
18:58:10.722 [script.javaScript.stackTrace]:     seconds: 15
18:58:10.722 [script.javaScript.stackTrace]:     type: "standard"
18:58:10.722 [script.javaScript.stackTrace]:     ps: [Script "oolite-default-player-script" version 1.87]
18:58:11.722 [script.javaScript.timeLimit]: ***** ERROR: Script "navi_mfd" ran for 34.2507 seconds and has been terminated.
18:58:11.722 [script.javaScript.stackTrace]:  0 (C:\myo/oolite/oolite.app/GNUstep/Library/ApplicationSupport/Oolite/ManagedAddOns/oolite.oxp.spara.navigation_mfd.oxz/Config/script.js:362) <anonymous function>
18:58:11.722 [script.javaScript.stackTrace]:     this: [Script "navi_mfd" version 1.8.1]
18:58:11.722 [script.javaScript.stackTrace]:     mode: "COMPASS_MODE_BEACONS"
18:58:11.722 [script.javaScript.stackTrace]:     whom: [Station "Kiota Solar Station" "Kiota Solar Station" position: (2.65561e+006, -1.98178e+006, 3.92149e+006) scanClass: CLASS_STATION status: STATUS_IN_FLIGHT]
18:58:11.722 [script.javaScript.stackTrace]:  1 (mwa_main.js:255) <anonymous function>
18:58:11.722 [script.javaScript.stackTrace]:     this: [Script "ManualWitchspaceAlignment" version 1.0]
18:58:11.722 [script.javaScript.stackTrace]:     cancelled: true
18:58:11.722 [script.javaScript.stackTrace]:     ps: [Script "oolite-default-player-script" version 1.87]
18:58:11.722 [script.javaScript.stackTrace]:     p: [PlayerShip "Adder" position: (1214.75, 4665.67, 7341.71) scanClass: CLASS_PLAYER status: STATUS_IN_FLIGHT]
18:58:11.722 [script.javaScript.stackTrace]:  2 (mwa_main.js:123) <anonymous function>
18:58:11.722 [script.javaScript.stackTrace]:     this: [Script "ManualWitchspaceAlignment" version 1.0]
18:58:11.722 [script.javaScript.stackTrace]:     seconds: 15
18:58:11.722 [script.javaScript.stackTrace]:     type: "standard"
18:58:11.722 [script.javaScript.stackTrace]:     ps: [Script "oolite-default-player-script" version 1.87]
18:58:12.722 [script.javaScript.timeLimit]: ***** ERROR: Script "navi_mfd" ran for 35.2508 seconds and has been terminated.
18:58:12.722 [script.javaScript.stackTrace]:  0 (C:\myo/oolite/oolite.app/GNUstep/Library/ApplicationSupport/Oolite/ManagedAddOns/oolite.oxp.spara.navigation_mfd.oxz/Config/script.js:362) <anonymous function>
18:58:12.722 [script.javaScript.stackTrace]:     this: [Script "navi_mfd" version 1.8.1]
18:58:12.722 [script.javaScript.stackTrace]:     mode: "COMPASS_MODE_SUN"
18:58:12.722 [script.javaScript.stackTrace]:     whom: [Sun ID: 447 position: (2.99217e+006, -2.24951e+006, 4.36909e+006) radius: 95.640km]
18:58:12.722 [script.javaScript.stackTrace]:  1 (mwa_main.js:255) <anonymous function>
18:58:12.722 [script.javaScript.stackTrace]:     this: [Script "ManualWitchspaceAlignment" version 1.0]
18:58:12.722 [script.javaScript.stackTrace]:     cancelled: true
18:58:12.722 [script.javaScript.stackTrace]:     ps: [Script "oolite-default-player-script" version 1.87]
18:58:12.722 [script.javaScript.stackTrace]:     p: [PlayerShip "Adder" position: (1214.75, 4665.67, 7341.71) scanClass: CLASS_PLAYER status: STATUS_IN_FLIGHT]
18:58:12.722 [script.javaScript.stackTrace]:  2 (mwa_main.js:123) <anonymous function>
18:58:12.722 [script.javaScript.stackTrace]:     this: [Script "ManualWitchspaceAlignment" version 1.0]
18:58:12.722 [script.javaScript.stackTrace]:     seconds: 15
18:58:12.722 [script.javaScript.stackTrace]:     type: "standard"
18:58:12.722 [script.javaScript.stackTrace]:     ps: [Script "oolite-default-player-script" version 1.87]
This happened when I got back the jump target on the compass and I think there was no on-going jump sequence; I can't be more accurate than this at the moment, I'll try to find a way to precisely reproduce. ANC not installed. I've saved the logfile.
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4830
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: (Release) Manual Witchspace Alignment

Post by phkb »

Astrobe wrote:
v1.86 includes a patch that lets you change the compass mode; It could be abused to force a basic compass to the desired mode, which could make the directions on console part (when there's only a basic compass) unnecessary.
I actually had this in place but I removed it because it ended up creating three modes of operating (full space compass, basic space compass just for jump beacons, and console messages for interstellar space). Given I couldn't get rid of the interstellar space mode, I thought only having two modes was better. Also, following a player's career, eventually they will end up in interstellar space, and if they have been introduced to the concept of using the console messages for alignment prior to arriving in IS it shouldn't make it too confusing.

Thanks also for the bug report, and thanks to Rustem who pm'ed me another bug report. I think I've squashed them in version 1.1, which is now available.
User avatar
Cmd. Cheyd
---- E L I T E ----
---- E L I T E ----
Posts: 934
Joined: Tue Dec 16, 2008 2:52 pm
Location: Deep Horizon Industries Manufacturing & Research Site somewhere in G8...

Re: (Release) Manual Witchspace Alignment

Post by Cmd. Cheyd »

Sounds like a killer extension of the ANC, man! I'll have to try playing some when I get home next month.
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4830
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: (Release) Manual Witchspace Alignment

Post by phkb »

Version 1.3 is now available which fixes an error if you don't have the ANC installed.
User avatar
gsagostinho
---- E L I T E ----
---- E L I T E ----
Posts: 573
Joined: Sun Jul 19, 2015 1:09 pm

Re: (Release) Manual Witchspace Alignment

Post by gsagostinho »

@phkb just gave this a shot and this is an amazing OXP (as is always the case when it comes to expansions created by you!). Thanks for creating this!
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4830
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: (Release) Manual Witchspace Alignment

Post by phkb »

Version 1.6 has been released, which fixes one issue
- Jump is now cancelled if player starts a jump and then changes the destination system on the F6 chart before aligning with nav beacon.
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4830
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: (Release) Manual Witchspace Alignment

Post by phkb »

Version 1.7 has just been released, which copes better with the situation when the player engages auto-docking while in the middle of a jump countdown.
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4830
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: (Release) Manual Witchspace Alignment

Post by phkb »

Version 2.0 has been released. In this version:
  • Added Amber/Orange, Green and Pink nav beacon variations, plus code to allow the color of the nav frame to be either selected by the user (using Library Config), or configured via script.
  • Fixed issue where selecting another ASC target would leave nav frame and star on the screen.
  • Code refactoring.
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4830
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: (Release) Manual Witchspace Alignment

Post by phkb »

Version 2.1 has been released, which adds a purple and white color option for the jump marker, and tweaks the colors of the green and pink options, with thanks to gsagostinho.
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4830
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: (Release) Manual Witchspace Alignment

Post by phkb »

Version 2.2. has been released. In this version:
  • Tweaks to prevent JS code time-out conditions when cancelling the jump countdown due to misalignment.
  • Improved integration with BGS, particularly when starting a jump countdown when the ship is already aligned with the destination.
  • Improved integration with Countdown to Zero, to prevent timer garbage collection.
  • Code cleanup.
Bogatyr
---- E L I T E ----
---- E L I T E ----
Posts: 281
Joined: Sun Feb 24, 2013 11:52 am

Re: (Release) Manual Witchspace Alignment

Post by Bogatyr »

Nice piece of equipment!
Players who have installed the Advanced Navigation Computer OXP have noticed the change that takes place to hyperspace countdowns. Now, instead of just jumping with your ship pointing in any direction, the ANC will auto-rotate your ship to align with a visible witchspace destination. This is without even purchasing the ANC equipment item itself.

I always liked the idea that a witchspace jump needed to be aligned with some destination, and I really appreciated the ANC for this reason, except for one thing - I wanted to do the alignment myself. I was OK with the ANC doing auto-alignment after it was purchased, but I wanted the process to be manual if I hadn't.
... but IMHO it shouldn't modify gameplay unless purchased and enabled.
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4830
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: (Release) Manual Witchspace Alignment

Post by phkb »

Bogatyr wrote:
it shouldn't modify gameplay unless purchased and enabled.
Although, in this instance, MWA is a step-backwards over the default gameplay (where you can point your ship in any direction when jumping), so it's a little bit tricky to come up with the sales pitch for something that is going to make your life harder!

The ANC restores something of an automatic process to jumps, which is why MWA changes default behaviour, and the ANC is the thing you buy to make your life easier. Simples!

However, your point is taken - I'll add a note to the first post clearly indicating that the MWA changes default jumping behaviour.
Post Reply