Default client: zoom-speed slider

Thoughts on the further development of Haven & Hearth? Feel free to opine!

Default client: zoom-speed slider

Postby jordancoles » Thu Dec 24, 2020 1:45 pm

Could we get an option to increase our zoom speed in the default client?
Duhhrail wrote:No matter how fast you think you can beat your meat, Jordancoles lies in the shadows and waits to attack his defenseless prey. (tl;dr) Don't afk and jack off. :lol:

Check out my pro-tips thread
Image Image Image
User avatar
jordancoles
 
Posts: 14015
Joined: Sun May 29, 2011 6:50 pm
Location: British Columbia, Canada

Re: Default client: zoom-speed slider

Postby Nightdawg » Thu Dec 24, 2020 2:45 pm

Yes please.

So far the only way to not spend 2 hours scrolling out was to use a macro that did it at 5x speed
if you're reading this, you're a nerd.
Image
User avatar
Nightdawg
 
Posts: 1766
Joined: Fri Feb 28, 2020 12:31 am
Location: In your pepper farm

Re: Default client: zoom-speed slider

Postby vatas » Thu Dec 24, 2020 3:18 pm

Valid request.
The most actively maintained Haven and Hearth Wiki (Not guaranteed to be up-to-date with all w14 changes.)

Basic Claim Safety (And what you’re doing wrong) (I recommend you read it in it's entirety, but TL:;DR: Build a Palisade.)

Combat Guide (Overview, PVE, PVP) (Tells you how to try and escape, and make it less likely to die when caught.)
User avatar
vatas
 
Posts: 4511
Joined: Fri Apr 05, 2013 8:34 am
Location: Suomi Finland Perkele

Re: Default client: zoom-speed slider

Postby iamahh » Thu Dec 24, 2020 5:11 pm

I've been playing with modding tutorial and it seems you can achieve this with 3 changes:

[change1]
in Config.java add the line
Code: Select all
public static int badcamsensitivity = getint("haven.badcamsensitivity", 5);



[change2]
in MapView.java change line in FreeCam.wheel()
from
Code: Select all
float d = dist + (amount * 5);

to
Code: Select all
int cfg = Utils.getprefi("badcamsensitivity", 5);
float d = dist + (amount * cfg);



[change3]
in OptWnd.java add
Code: Select all
            composer.add(new Label("Zoom speed"));
            {
               Label dpy = new Label("");
               final double smin = 5, smax = 25;
               final int steps = (int) Math.round((smax - smin) / 1);
               composer.addr(
                     new HSlider(UI.scale(160), 0, steps, (int) Math.round(steps * (Utils.getprefi("badcamsensitivity", 5) - smin) / (smax - smin))) {

                        protected void added() {
                           dpy();
                        }

                        void dpy() {
                           dpy.settext(String.format("%.2f\u00d7", smin + (((double) this.val / steps) * (smax - smin))));
                        }

                        public void changed() {
                           double val = smin + (((double) this.val / steps) * (smax - smin));
                           Utils.setprefi("badcamsensitivity", (int) val);
                           dpy();
                        }
                     },
                     dpy
               );
            }


I added it before the line
Code: Select all
composer.add(new Button(UI.scale(200), "Reset to defaults")



Note: works for me but I can't guarantee it'll work for anyone, I may have forgotten something and code may be misplaced
iamahh
 
Posts: 1810
Joined: Sat Dec 12, 2015 8:23 pm


Return to Critique & Ideas

Who is online

Users browsing this forum: Ahrefs [Bot] and 5 guests