Baning Thermal Optics

  • Offline CREAMPIE
  • Armaholic
  • Veteran
  • ******
  • Posts: 1077
  • ^_^;;

Re: Baning Thermal Optics

« Reply #15 posted: Apr 28, 2015, 10:48 PM »
oh thx man you are a god !! Theres any way to only allow thermal for certain stuffs ? for exemple, allow termal for AT AA and stuffs that uses the UAV terminal ?

I am looking at the code and will be allowing certain items when equipped to allow thermal - but for now it's a blanket no thermal script.

Keep you posted.

- from the grassy knoll -

Re: Baning Thermal Optics

« Reply #16 posted: Apr 29, 2015, 01:05 AM »
tank you cream :)
  • Offline Mokey
  • Fractured Wasteland
  • Elite
  • ******
  • Posts: 588
  • Https://Fractured-Gaming.com

Re: Baning Thermal Optics

« Reply #17 posted: Apr 29, 2015, 02:11 AM »
Cream if you want help with this I can help. I enjoy working with you sir.
Posts once, edits post 40 times in 60 seconds. STUPID FAT FINGERS!
  • Offline CREAMPIE
  • Armaholic
  • Veteran
  • ******
  • Posts: 1077
  • ^_^;;

Re: Baning Thermal Optics

« Reply #18 posted: Apr 29, 2015, 07:12 AM »
Cream if you want help with this I can help. I enjoy working with you sir.

I will send you what I have - I have already started with exceptions!

Some pretty cool ideas came to light with the code :>

- from the grassy knoll -
  • Offline CREAMPIE
  • Armaholic
  • Veteran
  • ******
  • Posts: 1077
  • ^_^;;

Re: Baning Thermal Optics

« Reply #19 posted: Apr 29, 2015, 11:44 PM »
I have made a few tweaks here ...


1) You can choose which launchers to exclude by looking at the launcher array

2) UAV Quadrotor Thermals are disabled if the user is connected to a UAV

3) All other thermals are restricted to 1500m view distance(TWS / Nightstalker / Laser Des )

Known issue - players can manually adjust their view distance while zoomed in - I need to relook where I am setting the view distance here .. will get it right ;) too lazy now

Players connected to a UAV are not able to use any other thermal device unless they disconnect.

Code: [Select]
// disableTheral.sqf
// by CRE4MPIE
// ver 0.2
// 2015-04-29 11:44pm
// contributions from BIStudio Forums, edited by CRE4MPIE


_layer = 85125;
_launchers =["launch_I_Titan_short_F","launch_O_Titan_short_F","launch_B_Titan_short_F","launch_Titan_short_F","launch_Titan_F","launch_O_Titan_F","launch_I_Titan_F","launch_B_Titan_F"];  // launcher array


while {true} do
{
if (currentVisionMode player == 2) then // check for TI Mode
{
if (currentweapon player in _launchers) then // check if player has launcher as current weapon
{
            _layer    cutText ["Thermal Imaging OFFLINE!.","BLACK",-1]; // Blackout screen with Text
playSound "FD_CP_Not_Clear_F";
            waituntil {currentVisionMode player != 2};
            _layer cutText ["", "PLAIN"];
}
else
{
if (alive (getConnectedUAV player)) then // check if player is connected to a UAV
{
            _layer    cutText ["Thermal Imaging OFFLINE while connected to a UAV terminal!.","BLACK",-1]; // Blackout screen with Text
playSound "FD_CP_Not_Clear_F";
            waituntil {currentVisionMode player != 2};
            _layer cutText ["", "PLAIN"];
}
else
{
setViewDistance 1250; // set viewdistance for all other thermals
waituntil {currentVisionMode player != 2};
setViewDistance -1; // reset viewdistance to default
}
};
};

sleep 1;
};




- from the grassy knoll -

Re: Baning Thermal Optics

« Reply #20 posted: Aug 05, 2015, 10:24 PM »
Looking for a method what all Vehicles and Optic thermal Disabled only at Day !


I use

Code: [Select]
// disableTheral.sqf
// by CRE4MPIE
// ver 0.2
// 2015-04-29 11:44pm
// contributions from BIStudio Forums, edited by CRE4MPIE


_layer = 85125;
_launchers =["launch_I_Titan_short_F","launch_O_Titan_short_F","launch_B_Titan_short_F","launch_Titan_short_F","launch_Titan_F","launch_O_Titan_F","launch_I_Titan_F","launch_B_Titan_F","Laserdesignator","Laserdesignator_02","Laserdesignator_03","B_HMG_01_high_F","B_static_AA_F","B_static_AT_F","B_GMG_01_F"];  // launcher array


while {true} do
{
if (currentVisionMode player == 2) then // check for TI Mode
{
if ((currentweapon player in _launchers) && (daytime <= 20 && daytime > 4))then // check if player has launcher as current weapon
{
            _layer    cutText ["Thermal Imaging OFFLINE!.","BLACK",-1]; // Blackout screen with Text
playSound "FD_CP_Not_Clear_F";
            waituntil {currentVisionMode player != 2};
            _layer cutText ["", "PLAIN"];
}
else
{
if (alive (getConnectedUAV player)) then // check if player is connected to a UAV
{
            _layer    cutText ["Thermal Imaging OFFLINE while connected to a UAV terminal!.","BLACK",-1]; // Blackout screen with Text
playSound "FD_CP_Not_Clear_F";
            waituntil {currentVisionMode player != 2};
            _layer cutText ["", "PLAIN"];
};
};
sleep 1;
};
};


My problem is this script disabled only at Day UAV,Laiser and not Optic`s



sorry for my bad english

Re: Baning Thermal Optics

« Reply #21 posted: Aug 05, 2015, 10:57 PM »
Theres probably other options but i removed the thermal optics from the storeConfig.sqf and in the LSlootLists.sqf (think there is only the NightStalker in LSlootLists.sqf) and possibly somewhere else....

Re: Baning Thermal Optics

« Reply #22 posted: Aug 05, 2015, 11:40 PM »
No no this settings works :


Code: [Select]
_layer = 85125;

while {true} do
{
    if (currentVisionMode player == 2) then
        {
              //hint "Thermals are active";
            _layer    cutText ["Thermal Imaging currently OFFLINE!.","BLACK",-1];
playSound "FD_CP_Not_Clear_F";
            waituntil {currentVisionMode player != 2};
            _layer cutText ["", "PLAIN"];
        };
        sleep 1;
}


My problem is i need this settings , with Day and Night settings :(

Code: [Select]
(daytime <= 20 && daytime > 4))then

Re: Baning Thermal Optics

« Reply #23 posted: Aug 21, 2015, 06:50 AM »
Here's a fix for the thermals on your server ...

This will remove ALL thermals from your server for ALL vehicles and optics that use TI.

init.sqf
Code: [Select]
[] execVM "addons\disableThermal\disablethermal.sqf";  //disable thermal vision
addons\disableThermal\disablThermal.sqf
Code: [Select]
_layer = 85125;

while {true} do
{
    if (currentVisionMode player == 2) then
        {
              //hint "Thermals are active";
            _layer    cutText ["Thermal Imaging currently OFFLINE!.","BLACK",-1];
playSound "FD_CP_Not_Clear_F";
            waituntil {currentVisionMode player != 2};
            _layer cutText ["", "PLAIN"];
        };
        sleep 1;


Feel free to have a look at my GIT for other cool stuff xD

https://github.com/CRE4MPIE/ArmA3_Wasteland_1.1d.Stratis

Hey CREAMPIE, this 'no thermals' script was chewing up 25-30 CPS on my server.  Modified it to exit if running on a server:

https://github.com/speedweasel/ArmA3_Wasteland.Altis/commit/8ad0de5c5b8d971b9506cf8cd2a46d2a30d93d92

Anyone else run into this problem?
  • Offline CREAMPIE
  • Armaholic
  • Veteran
  • ******
  • Posts: 1077
  • ^_^;;

Re: Baning Thermal Optics

« Reply #24 posted: Aug 21, 2015, 07:24 AM »
Hey CREAMPIE, this 'no thermals' script was chewing up 25-30 CPS on my server.  Modified it to exit if running on a server:

https://github.com/speedweasel/ArmA3_Wasteland.Altis/commit/8ad0de5c5b8d971b9506cf8cd2a46d2a30d93d92

Anyone else run into this problem?

client/init.sqf

I see you put that in your main init.  I run it from the client init.So imo has no affect on the server cps ...


- from the grassy knoll -

Re: Baning Thermal Optics

« Reply #25 posted: Aug 21, 2015, 09:26 AM »
Thanks CREAMPIE.  I've changed the way I execute this script.   :D

Re: Baning Thermal Optics

« Reply #26 posted: Jan 08, 2018, 07:19 PM »
client/init.sqf

I see you put that in your main init.  I run it from the client init.So imo has no affect on the server cps ...


I know this post is old

but I would like to use this script and I can not find it anymore, could you pass me the file and how to install it?
sorry my awful english
  • Offline AgentRev
  • Developer
  • Veteran
  • ******
  • Posts: 2483

Re: Baning Thermal Optics

« Reply #27 posted: Jan 08, 2018, 10:45 PM »
Change the following lines (218-220): https://github.com/A3Wasteland/ArmA3_Wasteland.Altis/blob/74011f8a0359de93615910667b19903cc42db070/client/functions/drawPlayerIcons.sqf#L218-L220

to
Code: [Select]
if (_thermalActive && {cameraOn == vehicle player && _weapon in weapons player && _ownWeapon}) then
This will block thermal modes in all handheld weapon scopes, while still allowing UAV thermals.

Re: Baning Thermal Optics

« Reply #28 posted: Jan 10, 2018, 05:20 PM »
Change the following lines (218-220): https://github.com/A3Wasteland/ArmA3_Wasteland.Altis/blob/74011f8a0359de93615910667b19903cc42db070/client/functions/drawPlayerIcons.sqf#L218-L220

to
Code: [Select]
if (_thermalActive && {cameraOn == vehicle player && _weapon in weapons player && _ownWeapon}) then
This will block thermal modes in all handheld weapon scopes, while still allowing UAV thermals.


I want to remove from titan, tank, armed vehicles and heli armed


Thank you for your help

but if you can help me in this I will be very grateful
  • Offline AgentRev
  • Developer
  • Veteran
  • ******
  • Posts: 2483

Re: Baning Thermal Optics

« Reply #29 posted: Jan 11, 2018, 09:03 AM »
I want to remove from titan, tank, armed vehicles and heli armed

This is the default behavior of the mission in its original state. There are no edits required.