Special Aircraft Service

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Mod to reduce number of 'Wonder Woman' views to cycle through  (Read 1114 times)

0 Members and 1 Guest are viewing this topic.

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 6072
Mod to reduce number of 'Wonder Woman' views to cycle through
« on: November 15, 2020, 04:02:16 PM »

Reduce the number of views to cycle through when using the cockpit off function ('Wonder Woman' view).

Based on the stock 4.12 code. Unknown if it works with other versions.

If you want to use (or retain) Storbror's Stabilizers For All Aircraft mod, go instead to the following thread to get this mod incorporating Mike's work as well:

https://www.sas1946.com/main/index.php/topic,65391.0.html

If any other mod alters AircraftHotKeys.class, this new bit of code can easily be added to replace the stock code by the creator of that other mod. Otherwise, if you use this mod you lose the feature(s) of the other mod(s).

Get my 'Wonder Woman' reduced view cycling count mod here (built upon stock 4.12 code):

https://www.mediafire.com/file/cvh4ekcd6wghtf3/00_WxTech_No-Cockpit_fewer-views.7z/file

=====================================================

From the included readme file (trimmed down to leave out code supplied farther below):

In answer to the recent question posed by shardana in the BAT Lounge: Is it possible to reduce the view count when cycling through the non-cockpit (Wonder Woman) views?

YES, it is! Pretty simple in the end.

My first test, going to extremes, brought the view count down to just 2 views (!) to cycle through; (1) cockpit on, and (2) Wonder Woman view with HUD instruments/reticle (newer type with acceleration vector.) But that's rather limiting. We want to also have at least a view that's completely empty, for gun camera simulating, for instance.

I've always wanted to dispense with those views having the game's original no-cockpit type reticle (no acceleration vector caret), because they are rather superfluous when the later type is available (introduced with Pacific Fighters.)

My desire from long ago was to bring the number of views to cycle through down to no more than 4.

So. I altered the relevant part of AircraftHotKeys.java to obtain the following view cycling sequence (starting from the normal cockpit view):

1) HUD instruments and reticle (newer Pacific Fighters type with acceleration vector indicator)
2) Reticle only (same as previous)
3) Empty
4) Back to cockpit view

As noted this now bypasses the original style no-cockpit reticle (circle with dotted cross lines). I never liked that one, although its texture can be changed to whatever one fancies. I find that the newer reticle introduced with Pacific Fighters, with the valuable addition of the acceleration vector caret, is much more useful. Especially for carrier landing practice!  ;)

This mod is based on the stock 4.12 Java. I've no idea at the moment if other game versions are compatible. But any other Java-capable modder can EASILY incorporate this into other versions as required.

Note that users of the 'Stabilizers For All Planes' mod will require to have this code added. Because that mod (and any others out there, for that matter) is based on the same AircraftHotKeys.class. I'll post a version so altered...



This work is offered for use by any and all, for any purpose, without restriction.

WxTech
Nov 14, 2020

=====================================================

For other modders, here's what you're looking at.

Original 4.12 code in AircraftHotKeys.java:

Code: [Select]
            public void begin()
            {
                if(World.cur().diffCur.Cockpit_Always_On)
                    return;
                if(Main3D.cur3D().isViewOutside())
                    return;
                if(!(Main3D.cur3D().cockpitCur instanceof CockpitPilot))
                    return;
                if(Main3D.cur3D().isViewInsideShow())
                {
                    Main3D.cur3D().hud.bDrawDashBoard = true;
                    Main3D.cur3D().setViewInsideShow(false);
                    Main3D.cur3D().cockpitCur.setEnableRenderingBall(true);
                } else
                if(Main3D.cur3D().hud.bDrawDashBoard && Main3D.cur3D().cockpitCur.isEnableRenderingBall())
                    Main3D.cur3D().cockpitCur.setEnableRenderingBall(false);
                else
                if(Main3D.cur3D().hud.bDrawDashBoard && !Main3D.cur3D().cockpitCur.isEnableRenderingBall())
                {
                    Main3D.cur3D().hud.bDrawDashBoard = false;
                    Main3D.cur3D().cockpitCur.setEnableRenderingBall(true);
                } else
                if(Main3D.cur3D().isEnableRenderingCockpit() && Main3D.cur3D().cockpitCur.isEnableRenderingBall())
                    Main3D.cur3D().cockpitCur.setEnableRenderingBall(false);
                else
                if(Main3D.cur3D().isEnableRenderingCockpit() && !Main3D.cur3D().cockpitCur.isEnableRenderingBall())
                {
                    Main3D.cur3D().setEnableRenderingCockpit(false);
                } else
                {
                    Main3D.cur3D().setEnableRenderingCockpit(true);
                    Main3D.cur3D().setViewInsideShow(true);
                }
            }

The new code to reduce the view count to 4, as outlined above:

Code: [Select]
            public void begin()
            {
                if(World.cur().diffCur.Cockpit_Always_On)
                    return;
                if(Main3D.cur3D().isViewOutside())
                    return;
                if(!(Main3D.cur3D().cockpitCur instanceof CockpitPilot))
                    return;
                if(Main3D.cur3D().isViewInsideShow())  //to toggle off interior, and show HUD and reticle
                {
                    Main3D.cur3D().hud.bDrawDashBoard = true;
                    Main3D.cur3D().setViewInsideShow(false);
                    Main3D.cur3D().cockpitCur.setEnableRenderingBall(true);
                } else
                if(Main3D.cur3D().hud.bDrawDashBoard && Main3D.cur3D().cockpitCur.isEnableRenderingBall())  //to toggle off HUD instruments, and show reticle only
                {
                    Main3D.cur3D().hud.bDrawDashBoard = false;
                } else
                if(Main3D.cur3D().isEnableRenderingCockpit() && Main3D.cur3D().cockpitCur.isEnableRenderingBall())  //to toggle off reticle, and show empty
                {
                    Main3D.cur3D().setEnableRenderingCockpit(false);
                    Main3D.cur3D().cockpitCur.setEnableRenderingBall(false);
                } else
                {
                    Main3D.cur3D().setEnableRenderingCockpit(true);  //to restore to normal cockpit view
                    Main3D.cur3D().setViewInsideShow(true);
                }
            }
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)
Pages: [1]   Go Up
 

Page created in 0.047 seconds with 24 queries.