Jump to content
tonic-_-

TAW View Distance Script

Recommended Posts

View Distance Script
Version: 1.

Screen Shot
tawvd_new.jpg

v1.5 Video

 

Please don't ask me for my permission to do whatever you want with whatever I have created, I really don't care. You want to upload it to steam workshop, go ahead and do it, want to include it in a community pack? full send, want to maintain? Knock yourself out. I dropped out of the arma scene a very long time ago and I really don't care what is done with my stuff, I don't even care if I am credited, just do what you want. I am just putting this here for the few that respect the creative work of others, I don't want to waste your time of being considerate and asking because odds are I will never see it or respond. I randomly remembered that ARMA existed and figured this was appropriate.

JbBufj8.png


ADDON VERSION:
TAW View Distance Script (Addon Version)

Description:
This is something that was lacking for ARMA 3 (Alpha). So I have created a simple to use View Distance & Grass Settings Dialog to allow players to adjust their view distance levels. There are three types of view distance levels.

- On foot: View distance set will only effect a player while they're on foot.
- In Car: View distance set will only effect a player when they're in a land vehicle or ship.
- In Air: View distance set will only effect a player when they're in an aircraft.
- Drone: View distance while operating a UGV/UAV.
- Multiple Saves for various settings

And it also features 4 grass settings (None/Low/Normal/High).

Notes:
Example mission provided

To disable the grass Option 'None' place:
tawvd_disablenone = true;

To set a maximum allowed viewing distance you can put the following in your init.sqf:
tawvd_maxRange = 12000;

ACE3 Interaction Menu:
If you want the menu to be accessed through the ACE3 Self Interaction menu instead of an addaction like the addon version use this fn_stateTracker.fsm: http://tonic.pw/a3/fn_stateTracker.rar
Will be included in versions greater then v1.5 

NOW INCLUDED IN 1.6

 

Github:

https://github.com/Tonnilson/view-distance-settings

Installation:
First drag the taw_vd folder into your mission and then in the description.ext put:

#include "taw_vd\GUI.h"

class CfgFunctions
{
    #include "taw_vd\CfgFunctions.hpp"
};

 

If CfgFunctions already exists then put #include "taw_vd\CfgFunctions.hpp" in it.

Change log:

v1.6:

Fixed: Save manager was not working (typo that took 4 years to fix PogChamp)

Added: Ground slider now controls both land and sea vehicles.

Added: ACE3 Integration now in scripted version, can be accessed via self interaction menu as View Distance Settings

 

v1.5:
Changed: Code brought up to current coding techniques & small fixes
Added: Drone slider for changing the view & object settings while operating a UGV/UAV.
Added: Edit Boxes (Something the addon version has had for awhile).
Added: Save Manager for loading and saving various settings variations.

v1.4:
Added: Ability to sync object rendering distance with view distance

v1.3:
Changed: Updated GUI Resources for new patch.

v1.2:
Changed: Updated the script version to be on par with the addon (updated technologies).
Added: Ability to disable the grass option 'None'


v1.1
Fixed: Players that JIP'd in couldn't use the menu.

Download:

View Distance Script v1.6
Armaholic - TAW View Distance v1.5

 

 

 

  • Thanks 2

Share this post


Link to post
Share on other sites

Good job Tonic, I can't wait to stick it in DWS!

Edited by zorrobyte

Share this post


Link to post
Share on other sites

I understand that you have some view distance options in the video settings. What is the difference between the options in the video settings and using this script? :)

Share this post


Link to post
Share on other sites
I understand that you have some view distance options in the video settings. What is the difference between the options in the video settings and using this script? :)

This is intended for Multiplayer. The options in the video settings sadly carry the same effects as previous ARMA games, they work but only for singleplayer, they do not work for multiplayer (minus Object Distance), but the actual Visibility option does not work for MP, only SP.

I was hoping in A3 they would of changed that, who knows... It's an alpha, it may yet change but for now I built this.

Share this post


Link to post
Share on other sites
This is intended for Multiplayer. The options in the video settings sadly carry the same effects as previous ARMA games, they work but only for singleplayer, they do not work for multiplayer (minus Object Distance), but the actual Visibility option does not work for MP, only SP.

I was hoping in A3 they would of changed that, who knows... It's an alpha, it may yet change but for now I built this.

I did not know that, so this is basically a must have for your missions. I'm trying to get it working, but right now im a little confused what folders I have to put into the mission folder. :)

Share this post


Link to post
Share on other sites

open mission folder an open desc.txt than add #include "taw_vd\dialog.hpp"

in editor u can add [] execVM "taw_vd\init.sqf"; to init of character or init file in mission folder least thats how I will.

Share this post


Link to post
Share on other sites
I did not know that, so this is basically a must have for your missions. I'm trying to get it working, but right now im a little confused what folders I have to put into the mission folder. :)

Apologies, should have been more clear. Used to most people having a general mission editing skill set.

First off you want to drag the taw_vd folder from the scripts folder provided in the download to the mission folder / path you are working on, then you want to edit your description.ext (if you do not have one then create one) and put:

#include "taw_vd\dialog.hpp"

After that you want to put the following code below into your init.sqf (preferred near the bottom). Again if you do not have one then create one.

[] execVM "taw_vd\init.sqf";

After that, test your mission and it should work and thus giving you a scroll wheel option for 'Settings'.

There is an example mission provided showing how it should look called viewdistance.Stratis

Share this post


Link to post
Share on other sites

nevermind, got it working. this is amazing. I'm 2km out in the sea and I can totally overwatch the whole island. :D

Edited by KNG

Share this post


Link to post
Share on other sites

Great script, works great! Like Thompson said, its not JIP supported yet. Hope you guys are gonna do it or are working on it.

Thanks!

Share this post


Link to post
Share on other sites
Great script, works great! Like Thompson said, its not JIP supported yet. Hope you guys are gonna do it or are working on it.

Thanks!

Ahh, that didn't hit me. The issue with it not working for JIP is simple, the script is executing to add the action to the player, but when jip the player is null for a period of time. For a quick fix till I push an update.

Edit taw_vd\init.sqf and under if(isDedicated) exitWith {}; add this:

waitUntil {!isNull player && player == player};

Share this post


Link to post
Share on other sites

Does it effect object VD when you change VD as well?

Share this post


Link to post
Share on other sites
Does it effect object VD when you change VD as well?

No, The Object View distance option through your video options seems to work on both SP & MP so there wasn't a need.

UPDATE: v1.1

Change log:

Fixed: Players that JIP'd in couldn't use the menu.

Download:

Armafiles.info V1.1

Edited by Tonic-_-

Share this post


Link to post
Share on other sites

Ok Tonic Im asking for a feature request here. I am using this already on my server and I went through the script and took out the grass setting "none". Is there any way you can maybe throw in a future release and pass an option into the array to disable none and force the clients to at least have low grass setting when joining?

There was a big discussion on this in another thread which it seemed like a lot of peeps including myself agreed that grass should stay on at least low, simply because playing without grass of any kind takes away the whole simulator feel.

Maybe just a:

[boolean] execVM "taw_vd\init.sqf"; // add true to array to disable grass off option

Perhaps we could even expand to:

[boolean, 3000, 3000, 5000] execVM "taw_vd\init.sqf"; // grass disable option/ max_s_foot sliderSetRange / max_s_car sliderSetRange / max_s_air sSR..

inside init.sqf:

_max_foot = _this select 1;
_max_car = _this select 2;
_max_air = _this select 3;

[max_foot, max_car, max_air] taw_vd\open.sqf

open.sqf:

_max_foot = _this select 0;
_max_car = _this select 1;
_max_air = _this select 2;

_s_foot sliderSetRange [100,_max_foot];

etc..

I like it so far anyhow, I'll modify it as needed if you dont feel like adding this stuff, but I think you should get the full credit for a nice little mod. I like it. Cheers!

Share this post


Link to post
Share on other sites
Ok Tonic Im asking for a feature request here. I am using this already on my server and I went through the script and took out the grass setting "none". Is there any way you can maybe throw in a future release and pass an option into the array to disable none and force the clients to at least have low grass setting when joining?

There was a big discussion on this in another thread which it seemed like a lot of peeps including myself agreed that grass should stay on at least low, simply because playing without grass of any kind takes away the whole simulator feel.

Maybe just a:

[boolean] execVM "taw_vd\init.sqf"; // add true to array to disable grass off option

Perhaps we could even expand to:

[boolean, 3000, 3000, 5000] execVM "taw_vd\init.sqf"; // grass disable option/ max_s_foot sliderSetRange / max_s_car sliderSetRange / max_s_air sSR..

inside init.sqf:

_max_foot = _this select 1;
_max_car = _this select 2;
_max_air = _this select 3;

[max_foot, max_car, max_air] taw_vd\open.sqf

open.sqf:

_max_foot = _this select 0;
_max_car = _this select 1;
_max_air = _this select 2;

_s_foot sliderSetRange [100,_max_foot];

etc..

I like it so far anyhow, I'll modify it as needed if you dont feel like adding this stuff, but I think you should get the full credit for a nice little mod. I like it. Cheers!

Sure, in the next version I'll look into adding various configuration options. When I first started creating it I was aiming towards keeping it as basic and simple as possible.

Suppose I will have a configuration set like so:

Max view distance that can be set.

Disable/enable 'None' for grass

Disable/enable 'Low' for grass

Disable/enable 'Normal' for grass'

Share this post


Link to post
Share on other sites

I would imagine the only ones you'd need are max view distance and none and high grass options. None for those looking for more realism in their server and high for those worried about low fps, if were even sure grass has a substantial impact on fps...

But awesome, good news regardless.

Share this post


Link to post
Share on other sites

Hi Tonic,

Another great script that I am sure will help us immensly.

not sure if its related, but is there a setting anywhere for underwater view distance?

It seems very close. Even in the shallow water where you should be able to see a lot further than current settings allow.

Before anyone says something about realism with diving - I know it gets darker and less visible in deep water, but I am only after a 10 -20m extra view distance not 100's.

cheers.

Share this post


Link to post
Share on other sites
Hi Tonic,

Another great script that I am sure will help us immensly.

not sure if its related, but is there a setting anywhere for underwater view distance?

It seems very close. Even in the shallow water where you should be able to see a lot further than current settings allow.

Before anyone says something about realism with diving - I know it gets darker and less visible in deep water, but I am only after a 10 -20m extra view distance not 100's.

cheers.

Currently, no.

Before the alpha release when I was keeping up to date on the new scripting commands I seen one that would do it on the Wiki but was later removed. I do agree the visibility is quite bad you generally have about 28m distance in shallow water.

Share this post


Link to post
Share on other sites

thanks tonic, i will keep my eyes out for anytinhg that may help.

Share this post


Link to post
Share on other sites

@Tonic - Have you heard about an issue with a mission that uses TAW View Distance Script on a dedicated server and works perfectly but if the player leaves the server and comes back in, the TAW View Distance Script menu option is not there?

Any help would be appreciated

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×