Jump to content
rsxownes

How can I change the view distance cap on my server?

Recommended Posts

You can get the current view distance using the viewDistance command.

 

You can set view distance with setViewDistance.

 

The minimum is 200, the max is 10,000.

 

You can reset it to default using setViewDistance = -1;

 

Make sure you change the object view distance too.

Share this post


Link to post
Share on other sites

You can get the current view distance using the viewDistance command.

 

You can set view distance with setViewDistance.

 

The minimum is 200, the max is 10,000.

 

You can reset it to default using setViewDistance = -1;

 

Make sure you change the object view distance too.

 

And these commands are to change it server side? I want it to be where i set the object view distance cap to say 2300 on the server.

Share this post


Link to post
Share on other sites
On 15.12.2014 at 2:04 AM, rsxownes said:

In your server settings in the SC Folder under Users there should be a .arma3profile file in there. 

viewDistance=3000;

Change that to what you want your servers max view distance to be.

Did that change ? Cause whatever I change, viewdistance stays low.

Share this post


Link to post
Share on other sites
2 hours ago, Tarabas said:

Did that change ? Cause whatever I change, viewdistance stays low.

Its set in the security_checks.h found in epoch_server_settings/configs/security

 

Change mode = "Standard"; to another preset or change Standard to your likings. After that you must add a befilter for that for non-admin players not beeing kicked

Share this post


Link to post
Share on other sites
Quote

Last I checked you could change the sliders but it did not change anything after these are set, that may not be the case anymore. Kenobi this feature only effects non admin players so if you want to test it make sure your not an admin. 

Does that last sentence mean (logged) admins have no possibility to get the effect of more viewdistance ?

Thank you Drokz and Kenobi

 

Share this post


Link to post
Share on other sites

No I only use Epoch AH. No infostar.

I changed to:

        class Custom
        {
            viewDistance = 6500; // High+
            viewDistanceObects = 6000; // High+
            terrainGrid = 10; // Default in MP: 10
        };
        mode = "Custom";

 

So it's not working for me as Admin with Epoch AH, but it's working for players, they just can't change it to anything back if they want.

Wouldn't it be possible to make it editable for everyone somehow ?

And viewable aswell for admins ?

 

Share this post


Link to post
Share on other sites
On 1/27/2018 at 8:54 PM, Tarabas said:

Anyone has an idea for that ?

How can i change view distance for Epoch AH admins aswell ?

From my understanding with the default AH any changes to the view distance do not apply to any listed player in the epochah.hpp

to test changes remove yourself from the  epochah.hpp and you will see the changes that way.

view distance is set server-side

epoch_server.pbo -  epoch_server\system\server_securityfunctions.sqf - their are 15 references to viewDistance thou i dare not play around with it cause i break shit all the time....

I also enforce settings at the very top in my init.sqf  see below

setTerrainGrid 3.125;					//	do i need to write it...
setViewDistance 1600;					//	do i need to write it...
setObjectViewDistance [2000,100];		  	 //	Object render distance and shadow distance

hope it helps

cheers

natoed

Share this post


Link to post
Share on other sites

Thank you for your input natoed

On 29.1.2018 at 1:33 AM, natoed said:

to test changes remove yourself from the  epochah.hpp and you will see the changes that way.

that's what I did. It works fine, but I'm not happy with the situation, listed players can not see the changes and I am searching for a solution for exactly that.

On 29.1.2018 at 1:33 AM, natoed said:

I also enforce settings at the very top in my init.sqf  see below

What changes does that make, when it is forced serversided already ?

hmm, I'm really not understanding that viewdistance part in server_securityfunctions.sqf aswell..maybe someone else here does ?

Share this post


Link to post
Share on other sites
On 1/31/2018 at 9:44 AM, Tarabas said:

What changes does that make, when it is forced serversided already ?

no one can gets an advance by increasing or lower graphics card settings

On 1/31/2018 at 9:44 AM, Tarabas said:

hmm, I'm really not understanding that viewdistance part in server_securityfunctions.sqf aswell..maybe someone else here does ?

soz I looked into this some time ago, I couldn't find a solution, I did try editing server_securityfunctions.sqf in regards to limit viewdistance for listed admins

but I just broke shit so i move on

Share this post


Link to post
Share on other sites

Would changing these lines in security_checks.h in epoch_server_settings work? Have not tested, I use infiSTAR:

    class forcedQuality {
        // Configs for forced viewdistances via AH matching A3 presets
        class Standard
        {
            viewDistance = 1600; // Standard Preset = 1600
            viewDistanceObects = 1300; // Standard Preset = 1300
            terrainGrid = 10; // Standard Preset = 25
        };
        class High
        {
            viewDistance = 2200; // High Preset = 2200
            viewDistanceObects = 1800; // High Preset = 1800
			terrainGrid = 10; // High Preset = 12.5
        };
        class VeryHigh
        {
            viewDistance = 3000; // Very High Preset = 3000
            viewDistanceObects = 2600; // Very High Preset = 2600
			terrainGrid = 10; // Very High Preset = 6.25
        };
        class Ultra
        {
            viewDistance = 3800; // Ultra Preset = 3800
            viewDistanceObects = 3200; // Ultra Preset = 3200
			terrainGrid = 10; // Ultra Preset = 3.125
        };
        class Custom
        {
            viewDistance = 2500; // High+
            viewDistanceObects = 2000; // High+
			terrainGrid = 10; // Default in MP: 10
        };
        mode = "Standard";
    };

That is the file loaded in server_securityfunctions.sqf when it accesses the CfgSecConf config

Share this post


Link to post
Share on other sites
7 hours ago, Grahame said:

Would changing these lines in security_checks.h in epoch_server_settings work? Have not tested, I use infiSTAR:

    class forcedQuality {
        // Configs for forced viewdistances via AH matching A3 presets
        class Standard
        {
            viewDistance = 1600; // Standard Preset = 1600
            viewDistanceObects = 1300; // Standard Preset = 1300
            terrainGrid = 10; // Standard Preset = 25
        };
        class High
        {
            viewDistance = 2200; // High Preset = 2200
            viewDistanceObects = 1800; // High Preset = 1800
			terrainGrid = 10; // High Preset = 12.5
        };
        class VeryHigh
        {
            viewDistance = 3000; // Very High Preset = 3000
            viewDistanceObects = 2600; // Very High Preset = 2600
			terrainGrid = 10; // Very High Preset = 6.25
        };
        class Ultra
        {
            viewDistance = 3800; // Ultra Preset = 3800
            viewDistanceObects = 3200; // Ultra Preset = 3200
			terrainGrid = 10; // Ultra Preset = 3.125
        };
        class Custom
        {
            viewDistance = 2500; // High+
            viewDistanceObects = 2000; // High+
			terrainGrid = 10; // Default in MP: 10
        };
        mode = "Standard";
    };

That is the file loaded in server_securityfunctions.sqf when it accesses the CfgSecConf config

Hey Grahame.

Yes, that's what we did before, but that works for players only .

Logged admins would not get the effect of higher viewdistance. That's what we are trying to change.

Share this post


Link to post
Share on other sites

UPDATE: I got some time before heading off for meetings and tested the below "solution". Can confirm that admin's viewdistance is now limited as a player's is... Other admin tools seem to be fine too. If others can also test then I will work on adding a variable to epochAH.hpp, the reading of same in server_securityfunctions.sqf and then wrap the added lines in an if based on that variable. Hopefully the devs will accept that back and people will not have to maintain custom code each release...

Would inserting the following:

	[] spawn {
		disableSerialization;
		waitUntil{!isNull (findDisplay 46)};
		setViewDistance "+str _skn_viewDistance+";
		setObjectViewDistance["+str _skn_viewDistanceObects+", 100];
		setTerrainGrid "+str _skn_terrainGrid+";
	};		

before line 1271 which reads:

	uiNamespace setVariable['ESP_mainMap', findDisplay 12 displayCtrl 51];

in server_securityfunctions.sqf do the trick. Might have time to test this evening. Basically though, the admins have a separate code path for AH initialization than non-admins as shown in the following code:

531	EPOCH_server_pushPlayer = compileFinal ("
	params ['_playerNetID','_playerUID','_C_SET','_fsmHandle','_player'];
	if (_playerUID in "+ str _skn_adminUIDArray+") then {
		_playerNetID publicVariableClient '"+_skn_Admin_Code+"';
		_playerNetID publicVariableClient '"+_skn_pv_adminLog+"';
		_playerNetID publicVariableClient '"+_skn_pv_hackerLog+"';
		_C_SET pushBack '[] spawn "+_skn_Admin_Init+"';
	} else {
		_C_SET pushBack '[] spawn "+_skn_AH_Init+"';
	};
	[_fsmHandle,['_C_SET', _C_SET]] remoteExecCall ['setFSMVariable', _player];
	true
	");

So basically the _skn_code_antihack function that includes the viewdistance settings for normal players is replaced by _skn_admincode for admins and the proposal above runs the viewdistance related code in the admin function too...

Share this post


Link to post
Share on other sites

Hmm.. I followed your instructions Grahame.. double checked, think I added it all right.. Test-Server is running fine with the additions, but as a logged admin I still get no higher view distance effect.

Share this post


Link to post
Share on other sites

Hmm... And god effing damn it... I cannot post images since I only have 0.04 MB left in my allowance and despite the fact that I have verified the links for these images the damned forum will not accept the URLs... even though I have opened them in other browser windows... FFS!!!

I modded security_checks.h to set the view distance to 1400. My video settings are as follows, I just changed them randomly to be sure that they would be different:

http://epochz.net/images/video_settings.jpg

Without the code change:

http://epochz.net/images/standard_ah.jpg

Note 1600 view distance. With modification:

http://epochz.net/images/modded_ah.jpg

Note the 1400 view distance...

 

Share this post


Link to post
Share on other sites
On 2/8/2018 at 1:01 AM, Grahame said:

Would inserting the following:

	[] spawn {
		disableSerialization;
		waitUntil{!isNull (findDisplay 46)};
		setViewDistance "+str _skn_viewDistance+";
		setObjectViewDistance["+str _skn_viewDistanceObects+", 100];
		setTerrainGrid "+str _skn_terrainGrid+";
	};		

before line 1271 which reads:

	uiNamespace setVariable['ESP_mainMap', findDisplay 12 displayCtrl 51];

Ok it is working on my dedi server oddly not on my test server....arh 1600m viewdistance is great thx again @Grahame

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Advertisement
  • Advertisement
  • Supporters
  • Advertisement
  • Discord

×