Jump to content
Sign in to follow this  
El' Rabito

Base Camera sorting

Recommended Posts

Gets rid of the number changing base cameras and sorts them by distance so they should always have the same number.

Make a CfgExileCustomCode override for ExileClient_gui_baseCamera_event_onLoad.sqf with the code below.

 

Support Me: www.buymeacoffee.com/ElRabito

/**
 * ExileClient_gui_baseCamera_event_onLoad
 *
 * Exile Mod
 * www.exilemod.com
 * © 2015 Exile Mod Team
 *
 * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. 
 * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
 */
 
private["_display", "_camerasCombo", "_range", "_cameras", "_index"];
_display = uiNamespace getVariable ["RscExileCameraView",displayNull];
_camerasCombo = _display displayCtrl 4005;
_range = ExileCameraSystemBase getVariable ["ExileTerritorySize",0];
_cameras = nearestObjects [ExileCameraSystemBase, ["Exile_Construction_BaseCamera_Static"], _range];

lbClear _camerasCombo;
if(_cameras isEqualTo [])then
{
	_index = _camerasCombo lbAdd "No cameras in your base";
	_camerasCombo lbSetData [_index,"0"];
	_camerasCombo lbSetPictureRight [_index,"\exile_assets\texture\ui\cameraView\camera.paa"];
}
else
{
	_index = _camerasCombo lbAdd "Select a Camera";
	_camerasCombo lbSetData [_index,"0"];
	_camerasCombo lbSetPictureRight [_index,"\exile_assets\texture\ui\cameraView\camera.paa"];
	{
		_index = _camerasCombo lbAdd ("Camera " + (str _forEachIndex));
		_camerasCombo lbSetData [_index,netId _x];
		_camerasCombo lbSetPicture [_index,"\exile_assets\texture\ui\cameraView\camera.paa"];
		if(_x getVariable ["ExileCameraInUse",false])then
		{
			_camerasCombo lbSetColor [_index,[221/255, 38/255, 38/255, 1]];
			_camerasCombo lbSetPictureRightColor [_index,[221/255, 38/255, 38/255, 1]];
			_camerasCombo lbSetTextRight [_index,"IN USE!"];
			_camerasCombo lbSetColorRight [_index,[221/255, 38/255, 38/255, 1]];
		}
		else
		{
			_camerasCombo lbSetColor [_index,[160/255, 223/255, 59/255, 1]];
		};
	}
	forEach _cameras;
};
ExileClientPlayerIsInSecurityCamera = true;
ExileClientPostProcessingColorCorrections ppEffectAdjust [1, 1, 0, [0, 0, 0, 0], [0.39, 0.32, 0.25, 1], [0.5,0.5,0.5,0], [0,0,0,0,0,0,4]]; 
ExileClientPostProcessingColorCorrections ppEffectCommit 0;
ExileClientPostProcessingColorCorrections ppEffectEnable true;
ExileClientPostProcessingSecurityCameraFilmGrain ppEffectCommit 0;
ExileClientPostProcessingSecurityCameraFilmGrain ppEffectEnable true;
false call ExileClient_gui_hud_toggle;
_camerasCombo
  • Like 4
  • Thanks 2

Share this post


Link to post
Share on other sites

@El' Rabito - I want to say publicly, that I had always appreciated all the work you have done with Exile in the past years.  This script is but one example of the stuff you do!

 

Thanks!

😀

 

  • Like 1

Share this post


Link to post
Share on other sites
1 hour ago, z80cpu said:

@El' Rabito - I want to say publicly, that I had always appreciated all the work you have done with Exile in the past years.  This script is but one example of the stuff you do!

 

Thanks!

😀

 


Well it's nothing i just changed 😅
 

_cameras = ExileCameraSystemBase nearObjects ["Exile_Construction_BaseCamera_Static",_range];

to
 

_cameras = nearestObjects [ExileCameraSystemBase, ["Exile_Construction_BaseCamera_Static"], _range];

https://community.bistudio.com/wiki/nearObjects
https://community.bistudio.com/wiki/nearestObjects

  • Thanks 1

Share this post


Link to post
Share on other sites

@El' Rabito - Well, what is simple to some fold is mighty hard to others!  Interesting change  though.  This would be/is over my head though!  I am lower-medium scripter in ARMA, and I would not gotten this one I think.

 

I also tried it out last night...works like a champ!

 

Once again, thank you for this and all the OTHER scripts (here and on the original Exile site) too!

 

😀

Share this post


Link to post
Share on other sites

Hi i get an error when using this

Spoiler

15:11:03 "ERROR: Override of ExileClient_gui_baseCamera_event_onLoad in CfgExileCustomCode points to a non-existent file: Custom\ExileClient_gui_baseCamera_event_onLoad .sqf . Defaulting to vanilla Exile code!"

 

I have the custom code in my mission config like this

Spoiler

// Base Camera sorting
    ExileClient_gui_baseCamera_event_onLoad = "Custom\ExileClient_gui_baseCamera_event_onLoad .sqf ";

And have the custom sqf file added to my Custom folder like so

unknown.png

 

Any ideas what is causing the error?

Share this post


Link to post
Share on other sites

Well it says whats wrong.

"ERROR: Override of ExileClient_gui_baseCamera_event_onLoad in CfgExileCustomCode points to a non-existent file: Custom\ExileClient_gui_baseCamera_event_onLoad .sqf . Defaulting to vanilla Exile code!"

Share this post


Link to post
Share on other sites
2 hours ago, El' Rabito said:

Well it says whats wrong.

"ERROR: Override of ExileClient_gui_baseCamera_event_onLoad in CfgExileCustomCode points to a non-existent file: Custom\ExileClient_gui_baseCamera_event_onLoad .sqf . Defaulting to vanilla Exile code!"

Yeah that's why i posted as i can't see why it says that taking in consideration what i posted above, I'm at a loss🤷‍♂️

Share this post


Link to post
Share on other sites
5 hours ago, Sgt Smash said:

Yeah that's why i posted as i can't see why it says that taking in consideration what i posted above, I'm at a loss🤷‍♂️

You don't have it in  CfgCustomcode but in CfgExileCustomCode.

 

Make a CfgCustomcode override for ExileClient_gui_baseCamera_event_onLoad.sqf with the code below!!!

 

Share this post


Link to post
Share on other sites
class CfgExileCustomCode 
{

ExileClient_gui_baseCamera_event_onLoad = "Exile_Client_Overrides\ExileClient_gui_baseCamera_event_onLoad.sqf";

};

 

Share this post


Link to post
Share on other sites
8 hours ago, OdinCZ said:

You don't have it in  CfgCustomcode but in CfgExileCustomCode.

 

Make a CfgCustomcode override for ExileClient_gui_baseCamera_event_onLoad.sqf with the code below!!!

 

 

That CfgCustomcode still go in mission file config like that CfgExileCustomCode but i make it's own class section?

 

Strange that is say's "Make a CfgExileCustomCode override for ExileClient_gui_baseCamera_event_onLoad.sqf with the code below." at the top of the thread.

 

Share this post


Link to post
Share on other sites

While i got you does any of these need to go in to CfgCustomcode rather than CfgExileCustomCode?

Spoiler

    // CBA Compatible Gear
    ExileClient_util_gear_getCompatibleWeaponItems = "Custom\CBACompatibleGear\ExileClient_util_gear_getCompatibleWeaponItems.sqf";
    ExileClient_util_item_getCompatibleWeaponItems = "Custom\CBACompatibleGear\ExileClient_util_item_getCompatibleWeaponItems.sqf";
    
    //Vehicle Protection System
    ExileServer_object_player_database_load = "overrides\ExileServer_object_player_database_load.sqf";
    ExileServer_object_vehicle_database_load = "overrides\ExileServer_object_vehicle_database_load.sqf";
    ExileServer_object_vehicle_database_update = "overrides\ExileServer_object_vehicle_database_update.sqf";
    
    
    // Fix Vehicle Trader Spawns
    ExileServer_system_trading_network_purchaseVehicleRequest = "Fixes\TraderFixes\ExileServer_system_trading_network_purchaseVehicleRequest.sqf";
    
    //Base Respawn (Can't use with xSpawn)
    ExileClient_gui_selectSpawnLocation_show = "Custom\baserespawn.sqf";


    //Enigma Deploybike
    ExileClient_gui_inventory_event_onSlotDoubleClick = "Custom\EnigmaPersonalVehicle\ExileClient_gui_inventory_event_onSlotDoubleClick.sqf";
    
    
    // Custom Loadout
    ExileServer_object_player_createBambi = "Custom\CustomLoadout\ExileServer_object_player_createBambi.sqf";
    ExileServer_object_player_network_createPlayerRequest = "Custom\CustomLoadout\ExileServer_object_player_network_createPlayerRequest.sqf";

    //eXpochVector
    ExileClient_object_construction_move = "eXpochVectorBldg\ExileClient_object_construction_move.sqf";
    ExileClient_gui_hud_event_onKeyDown = "eXpochVectorBldg\ExileClient_gui_hud_event_onKeyDown.sqf";
    ExileClient_gui_hud_event_onKeyUp = "eXpochVectorBldg\ExileClient_gui_hud_event_onKeyUp.sqf";
    ExileClient_construction_beginExistingObject = "eXpochVectorBldg\ExileClient_construction_beginExistingObject.sqf";
    ExileClient_construction_beginNewObject = "eXpochVectorBldg\ExileClient_construction_beginNewObject.sqf";
    ExileClient_construction_thread = "eXpochVectorBldg\ExileClient_construction_thread.sqf";
    ExileClient_gui_constructionMode_update = "eXpochVectorBldg\ExileClient_gui_constructionMode_update.sqf";
    ExileClient_util_world_canBuildHere = "eXpochVectorBldg\ExileClient_util_world_canBuildHere.sqf";
    
    
    //ExAd XM8
    ExileClient_gui_xm8_slide                       = "ExAdClient\XM8\CustomCode\ExileClient_gui_xm8_slide.sqf";
    ExileClient_gui_xm8_show                        = "ExAdClient\XM8\CustomCode\ExileClient_gui_xm8_show.sqf";
    
    //Revive script
    ExileClient_object_player_death_startBleedingOut = "custom\EnigmaRevive\ExileClient_object_player_death_startBleedingOut.sqf"; //Happys Revive
    ExileClient_object_player_event_onInventoryOpened = "custom\EnigmaRevive\ExileClient_object_player_event_onInventoryOpened.sqf"; //Happys Revive AntiDupe ---NEW with v0.65
    
    
    //VG Poptab dupe fix
    ExileClient_gui_virtualGarageDialog_event_onConfirmButtonClicked = "Custom\fix\ExileClient_gui_virtualGarageDialog_event_onConfirmButtonClicked.sqf";
    ExileServer_object_vehicle_network_storeVehicleRequest = "Custom\fix\ExileServer_object_vehicle_network_storeVehicleRequest.sqf";

Or are these ok in CfgExileCustomCode?

Share this post


Link to post
Share on other sites

There is only one way to do overrides in exile. CfgExileCustomCode

  • Like 1

Share this post


Link to post
Share on other sites
4 hours ago, El' Rabito said:

class CfgExileCustomCode 
{

ExileClient_gui_baseCamera_event_onLoad = "Exile_Client_Overrides\ExileClient_gui_baseCamera_event_onLoad.sqf";

};

 

Trying the CfgCustomcode method above didn't work, I've relocated my file into a new folder named "Exile_Client_Overrides" and used your line and don't get an error now. Strange it didn't let me locate it to the other overrides i have in my Custom folder.

Share this post


Link to post
Share on other sites
4 hours ago, Sgt Smash said:

 

That CfgCustomcode still go in mission file config like that CfgExileCustomCode but i make it's own class section?

 

Strange that is say's "Make a CfgExileCustomCode override for ExileClient_gui_baseCamera_event_onLoad.sqf with the code below." at the top of the thread.

 

This was in the original post by El' Rabito before he edited it on.

 

But it also doesn't work for me, then you can't connect to the server

Share this post


Link to post
Share on other sites
9 minutes ago, OdinCZ said:

This was in the original post by El' Rabito before he edited it on.

Yea i edited it to avoid confusion. CfgCustomcode seems not clear enough for everbody ^^

Share this post


Link to post
Share on other sites

Thanks guys all working now

All i gotta do now is work out how to change the range from  laptop to cameras, as the camera that is on the other side of my bases i can view but can't control unless i use a laptop closer to it then i can control it.

Share this post


Link to post
Share on other sites

Sorry El' Rabito fix works.  Autorun Exploits fix does not work for me, cant connect server

Share this post


Link to post
Share on other sites
36 minutes ago, OdinCZ said:

Sorry El' Rabito fix works.  Autorun Exploits fix does not work for me, cant connect server


Then you did something wrong. Try again with fresh a override.

Share this post


Link to post
Share on other sites
Sign in to follow this  

×