champ-1

CH View Distance Script

97 posts in this topic

Not tested:

(findDisplay 46) displayAddEventHandler ["keyDown",{
_ctrl = _this select 0; 
_dikCode = _this select 1; 
_shift = _this select 2; 
_ctrlKey = _this select 3;
_alt = _this select 4;
_yourKey = 0x28; //https://community.bistudio.com/wiki/DIK_KeyCodes

if (_dikCode == _yourKey) then {
	[] call CHVD_fnc_openDialog;
	true
};
}];

Share this post


Link to post
Share on other sites

Looks nice and well done. :)

Two thoughts:

1) Why did you not add very high terrain detail option?

2) For the average player it would be better to use descriptive names instead of the technical ones.

Ie: Terrain => Grass/Clutter drawing distance: No grass, short, medium, far, max.

One problem is that terrain detail is about both clutter drawing distance and terrain grid complexity:

http://feedback.arma3.com/view.php?id=8658

Share this post


Link to post
Share on other sites
;2822519']Looks nice and well done. :)

Two thoughts:

1) Why did you not add very high terrain detail option?

2) For the average player it would be better to use descriptive names instead of the technical ones.

Ie: Terrain => Grass/Clutter drawing distance: No grass' date=' short, medium, far, max.

One problem is that terrain detail is about both clutter drawing distance and terrain grid complexity:

[url']http://feedback.arma3.com/view.php?id=8658[/url]

Thanks.

1) High is equal to Very High in this script.

2) Well it's not only about grass and I was looking for shorter names, so there is more space for buttons and sliders. I don't think this is a problem, you need to learn 1 time what does it mean and you will never forget it.

Share this post


Link to post
Share on other sites

Release frontpaged on the Armaholic homepage.

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

We have also "connected" these pages to your account ( DudeGuyManBro ) on Armaholic.

This means soon you will be able to maintain these pages yourself if you wish to do so. Once this new feature is ready we will contact you about it and explain how things work and what options you have.

When you have any questions already feel free to PM or email me!

Share this post


Link to post
Share on other sites

Very nice; gives a much finer degree of control, would love to include this in my mission.

Permission request sent.

Share this post


Link to post
Share on other sites

Very nice, looking forward the mod version. Although is there a way to differentiate ground objects from airborn objects when it comes to viewing distance? So planes could be seen from farther away than the value I'ld pick for constructions, infantry and ground vehicles. It would be useful I think for people who can't push view distance too high without breaking everything.

Edited by dunedain

Share this post


Link to post
Share on other sites
Very nice, looking forward the mod version. Although is there a way to differentiate ground objects from airborn objects when it comes to viewing distance? So planes could be seen from farther away than the value I'ld pick for constructions, infantry and ground vehicles. It would be useful I think for people who can't push view distance too high without breaking everything.
I think it's possible but not very practical and may cause a lot of lag. Because you have to hide every map object individually.

Share this post


Link to post
Share on other sites

Hello,

TAW viewdistance just released an update of sync object ... and guess what you also have..

Its not that i'm hating, i know evry one wants a piece of the cake, but its just... a D*** move.

You said you got inspired by him, but then take the time op make it look different and maybe other functions

Ps. your sync button is the same as his.

Pss. Did you ask his premision?

Edited by Semper

Share this post


Link to post
Share on other sites
Hello,

Is it me or is this just TAW viewdistance, but slightly modified just so it looks different?

Also TAW viewdistance just released an update of sync object ... and guess what you also have..

Its not that i'm hating, i know evry one wants a piece of the cake, but its just... a D*** move.

Edit:

Even the sync button looks the same..

I suggested my ideas to Tonic and he said that he has no interest in further updating TAW View Distance Script/Addon.

Then I wrote this script myself using some of Tonic's scripts as reference.

Not going to comment on this topic anymore.

Share this post


Link to post
Share on other sites
Hello,

TAW viewdistance just released an update of sync object ... and guess what you also have..

Its not that i'm hating, i know evry one wants a piece of the cake, but its just... a D*** move.

You said you got inspired by him, but then take the time op make it look different and maybe other functions

Ps. your sync button is the same as his.

Pss. Did you ask his premision?

Unfortunately Tonic isn't the only one who likes to write UIs. The sync 'button' you refer to looks to be a common check box control. I digress if the code was "stolen", but I don't think this is the case. I don't think Champ would do that. The only dick move here is ruining another's release thread. Atleast present visuals / code if you're gonna cause a shit storm.

I'll show myself to the door. Good day gents.

Edited by Iceman77

Share this post


Link to post
Share on other sites

A simple suggestion would be to use a combo box for the grass setting instead with the same options as the terrain setting in the graphics options.

You could have a selection changed event for the combo box to set the grass setting with the value you set with lbSetValue

Here are the grass values based on the terrain setting in the graphics options.

TerrainGrid values:

Low = 50 (NoGrass)

Standard = 25

High = 12.5

Very High = 6.25

Ultra = 3.125

Share this post


Link to post
Share on other sites

terrainGrid 48 is also a kick ass terrain grid for low end PCs. It's the lowest terrainGrid that still render's grass. It lets you render some grass, but performs identical terrainGrid 50. Well in A2 it worked well. My2C.

Share this post


Link to post
Share on other sites

Suggested it to Tonic before, so I'll also suggest it here:

Instead of using fixed values for objectViewDistance, change the slider to a percentage value, so it automaticaly gets calculated based on your viewdistance.

Seems more useful to me that way.

Share this post


Link to post
Share on other sites
A simple suggestion would be to use a combo box for the grass setting instead with the same options as the terrain setting in the graphics options.

You could have a selection changed event for the combo box to set the grass setting with the value you set with lbSetValue

Here are the grass values based on the terrain setting in the graphics options.

TerrainGrid values:

Low = 50 (NoGrass)

Standard = 25

High = 12.5

Very High = 6.25

Ultra = 3.125

That might work if I'll add 1 more terrain grid level, but for now it's easier and faster to use buttons.

---------- Post added at 22:55 ---------- Previous post was at 22:54 ----------

Suggested it to Tonic before, so I'll also suggest it here:

Instead of using fixed values for objectViewDistance, change the slider to a percentage value, so it automaticaly gets calculated based on your viewdistance.

Seems more useful to me that way.

That's a good one, I guess you never need Object View Distance higher than actual View Distance. Will look into that. Edited by Champ-1

Share this post


Link to post
Share on other sites

Hi Champ-1,

there is an serious issue with CHVD:

in your fn_init.sqf you use an endless while-Loop which doesn't terminate.

For ArmA is waiting that functions set to postInit=1;, it'll wait until every single postInit function is terminated before carrying on with the next one. As your's doens't terminate, it blocks other functions with postInit = 1; set or even some modules functions (as for me it was the case).

Solution?

Very simple. Just spawn your while-loop. Kind of like this:

[] spawn {
while {true} do {
	_currentVehicle = vehicle player;
	waitUntil {_currentVehicle != vehicle player};
	[] call CHVD_fnc_updateSettings;
	saveProfileNamespace;
};
};

I tested this solution and errors no longer appeared.

Edited by Fett_Li
missused "calling of functions"

Share this post


Link to post
Share on other sites

postinit functions are being ran in a non-scheduled environment (??). I think that's why suspending the function with waitUntils / sleeps and such causes the game to error / hang. Hence the needed spawned thread.

Oh man. I could be sooo wrong here. Just some of my warped (and probably wrong) thoughts =(. My bad 2c. Cheers.

Share this post


Link to post
Share on other sites
That's a good one, I guess you never need Object View Distance higher than actual View Distance. Will look into that.

Hey there Champ. ObjectVD cannot be set higher than actualVD anyway. It would be cool if you changed the sliders to behave like the original BI sliders, though (objectVD slider position calculated using actualVD as a maximum)

Share this post


Link to post
Share on other sites
Hi Champ-1,

there is an serious issue with CHVD:

in your fn_init.sqf you use an endless while-Loop which doesn't terminate.

For ArmA calling functions set to postInit=1;, ArmA'll wait until every single postInit function is terminated before carrying on with the next one. As your's doens't terminate, it blocks other functions with postInit = 1; set or even some modules functions (as for me it was the case).

Solution?

Very simple. Just spawn your while-loop. Kind of like this:

[] spawn {
while {true} do {
	_currentVehicle = vehicle player;
	waitUntil {_currentVehicle != vehicle player};
	[] call CHVD_fnc_updateSettings;
	saveProfileNamespace;
};
};

I tested this solution and errors no longer appeared.

Didn't know that. Will fix it as soon as possible.

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