Author Topic: Draw Distance Keybinds.  (Read 3635 times)

Draw Distance Keybinds
For use within small areas with plenty of bricks. [Basically it reduces brick lag with less powerful computers.]

Description
I was on Glass' Trench server which holds many bricks. I decided to lower my Max Draw Distance due to all my graphic card holding around 30k of unneeded dirt bricks. That gave me my first lovey idea to put together my first proper script. As you guys are assuming that you do not need this due to having like a lovey speedy computer, this script would be very handy for the community within this game, having a cheap graphics card(or in my case, not enough power going to my graphic card :-|).

For the people who do not understand what I mean, look at the pictures below.

Pictures
Long Distance -


Short Distance -


As you can see, this shortens the distance you can see, but yet it does not render every single brick infront of you. Reducing the usage on your graphics card.

Q&A
Q: But you can just slide toggle this through the Advance Options?
A: Yes, you can. But this would be much more convenient for big TDM's or Trench Wars (and more...).

Q:I have looked inside this code, and I can see many problems which are not solved.
A:Yes, I know. I will be working on them soon.

Q: My copy of the "Draw Distance Keybinds" do not work. Help?!?!!1one1!!!11eleven.
A: Make sure you have Automatic Draw Distance Adjustment unticked within the Advance Options area. Automatic Draw Distance adjustment does not do anything apart from adjust when you are out of the Blockland window or optimize for your spec of your machine. I am not sure about this. Feel free to help me with this. If anybody has a fix or anything to disable it when a function is used, or just to give me the code to disable it via scripting, it'd be amazing.

Q: Why such a big topic for 57 lines of code?
A: I actually do not know. But I feel this would be useful to people with less powerful machines.

Q: This add-on is a pile of stuff, worthless thread.
A: (No reply.)

How this works
Right, basically set your keys within the Options and you should scroll down to the bottom of your controls

And then it works.

Inside the script, you have a option to change the interval of which it decreases or increases, the code is here which you can put into the console to change. The variable is not yet saved. I shall add in the next update. (Or if you want to be lazy like me, just type into the console
Code: [Select]
DistanceValue(VALUE);. The VALUE can be raised but can not go over 500. The console will echo you a message if you do intervene.

So far, it is not as userfriendly as I can make it. I shall update it in future versions.
Download

/Client_DistanceKeybind
Size: 1.64kb

Credits
Lugnut: Giving me the prefs which would make this script work.
Danny Boy: Pointing out nooblet mistakes within my coding.
TomTom: Fixing the keybind when it does the function twice upon clicking it in and releasing it.
Others: Helping me script.

Update notesPlanned updates
Quote from:  v1.01
V1.01 will include
  • GUI interface to change the values of which you can increase and decrease the Draw Distance
  • Clean up the code
  • Add Clcmd aside of the GUI for changing the value of which you can increase and decrease the Draw Distance
DONE.
[/list]
ADDED.

All this will be included in the next update. Download through RTB when it is approved.

User Requests
it's as empty as a hobo's trash can.
Notes
This is not much of an add-on. But it can be very useful in different cases. Enjoy!


Any problems? Report to me by RTBc/PM/postit:3
« Last Edit: February 27, 2012, 04:28:57 PM by Wordy »

This actually seems like a pretty good add-on.

Or you could go into options and do it manualy...

But this is simple and I like it.

While I'm unable to play a place like Glass's on anything higher than 110 draw distance, this will be very useful for things like Jorgur's dogfight, where I need to change between high and low distance fairly quickly.

Or you could go into options and do it manualy...
Refer to: Q&A

In fact, you shouldn't even have to do that. This is obviously just a convenience add-on.

Well I might aswell upload it to RTB as I am going to be updating it quite frequently. It'd be useless to update it like 3 times in a month for the same 50 people to keep redownloading it and dropping it into their Add-Ons folder.

This is a really neat idea!
Pretty useful for some people.

This is a really neat idea!
Pretty useful for some people.

This is very nice and useful for your first proper script.

Looks cool! I will get it on my mac.

I actually use this more often than I thought I would.

Ik quite a few people that might like this. I don't tho. My computers are always high powered. =P

I actually use this more often than I thought I would.

I think you can be more efficient with your keybinds.

For example - instead of having three keybinds, have one keybind that:
when pressed normally does action A
when held down for a certain amount of time it does action B
when rapidly double tapped does action C

although for this particular mod people may be spamming the keybind to change it anyway, so maybe not a double tap one

I think you can be more efficient with your keybinds.

For example - instead of having three keybinds, have one keybind that:
when pressed normally does action A
when held down for a certain amount of time it does action B
when rapidly double tapped does action C

although for this particular mod people may be spamming the keybind to change it anyway, so maybe not a double tap one
I don't see much point. Although I know where you are coming from, not worth putting that effort into a simple add-on.