Jump to content
z80cpu

Stupid Question

Recommended Posts

It has been so long, I can not remember if there is a setting or where in the Exile files I could modify it, but I am seeking where the 'plant time' for bombs is located so that I could adjust those values.

 

I have searched several time thru the server config as well as the mission config and found nothing.  Google turns up nothing.  😞

 

Could someone be as so kind as to show me how big a dummy I am?

 

Thanks!

 

🙂

 

*****

 

Also, I forgot about these two things.  Years ago, there was 2 add-ons that were pretty kool.  I can not think of their names nor even where to get them.

 

#1 - Sort Trader Items - Once you pulled up the trader's 'shopping list', you could sort by alphabetical order.  It was pretty kool.

 

#2 - This add-on would show you the price of the item in trader when you went to pick it up.  This would prevent a player from picking up garbage that was worthless.

 

Bonus - Is there an add-on that would allow a player to search all traders to find which one has that item a player is looking for?  it could be likened to the search you find in InfiSTAR.

 

Thanks again!

 

🙂

 

 

Share this post


Link to post
Share on other sites
#include "delayed_actions.hpp"

Add the above to the mission config.cpp

And then add the following into the delayed_actions.hpp
 

class CfgExileDelayedActions
{
	class Abstract
	{
		duration=10;
		abortInCombatMode=1;
		durationFunction="";
		animation="";
		animationType="switchMove";
		failChance=0;
		conditionFunction="";
		completedFunction="";
		abortedFunction="";
		failedFunction="";
		repeatingCheckFunction="";
	};
	class RepairVehicle: Abstract
	{
		duration=37;
		animation="Exile_Acts_RepairVehicle01_Animation01";
		conditionFunction="ExileClient_action_repairVehicle_condition";
		completedFunction="ExileClient_action_repairVehicle_completed";
	};
	class HotwireVehicle: Abstract
	{
		duration="4 * 60";
		failChance=40;
		animation="Exile_Acts_RepairVehicle01_Animation01";
		conditionFunction="ExileClient_action_hotwireVehicle_condition";
		completedFunction="ExileClient_action_hotwireVehicle_completed";
		failedFunction="ExileClient_action_hotwireVehicle_failed";
	};
	class StealFlag: Abstract
	{
		duration=60;
		abortInCombatMode=0;
		durationFunction="ExileClient_action_stealFlag_duration";
		animation="Exile_Acts_RepairVehicle01_Animation01";
		conditionFunction="ExileClient_action_stealFlag_condition";
		completedFunction="ExileClient_action_stealFlag_completed";
	};
	class HackLock: Abstract
	{
		animationType = "switchMove";
		animation = "Acts_TerminalOpen";
		abortInCombatMode = 0;
		failChanceFunction = "ExileClient_action_hackLock_failChance";
		durationFunction = "ExileClient_action_hackLock_duration";
		conditionFunction = "ExileClient_action_hackLock_condition";
		completedFunction = "ExileClient_action_hackLock_completed";
		failedFunction = "ExileClient_action_hackLock_failed";
		abortedFunction = "ExileClient_action_hackLock_aborted";
	};
	class GrindLock: Abstract
	{
		animationType = "switchMove";
		animation = "Acts_TerminalOpen";
		abortInCombatMode = 0;
		failChanceFunction = "ExileClient_action_grindLock_failChance";
		durationFunction = "ExileClient_action_grindLock_duration";
		conditionFunction = "ExileClient_action_grindLock_condition";
		completedFunction = "ExileClient_action_grindLock_completed";
		failedFunction = "ExileClient_action_grindLock_failed";
		abortedFunction = "ExileClient_action_grindLock_aborted";
	};
	class HideBody: Abstract
	{
		duration=10;
		animation="Exile_Shovel_Dig01";
		conditionFunction="ExileClient_action_HideBody_condition";
		completedFunction="ExileClient_action_HideBody_completed";
	};
	class PlantChargeWood: Abstract
	{
		duration="3 * 60";
		abortInCombatMode=0;
		animation="Acts_TerminalOpen";
		conditionFunction="ExileClient_action_breaching_condition";
		completedFunction="ExileClient_action_breaching_completed";
		failedFunction="ExileClient_action_breaching_failed";
		abortedFunction="ExileClient_action_breaching_aborted";
	};
	class PlantChargeMetal: PlantChargeWood
	{
		duration="4 * 60";
		animation="Acts_TerminalOpen";
	};
	class PlantChargeConcrete: PlantChargeWood
	{
		duration="5 * 60";
		animation="Acts_TerminalOpen";
	};
	class RepairConstruction: Abstract
	{
		animation="Exile_Acts_RepairVehicle01_Animation01";
		durationFunction="ExileClient_action_repairConstruction_duration";
		conditionFunction="ExileClient_action_repairConstruction_condition";
		completedFunction="ExileClient_action_repairConstruction_completed";
	};
	class GutAnimal: Abstract
	{
		duration=25;
		animationType="playMoveNow";
		animation="AinvPknlMstpSnonWnonDr_medic5";
		conditionFunction="ExileClient_action_GutAnimal_condition";
		completedFunction="ExileClient_action_GutAnimal_completed";
	};

};

Create an override for ExileClient_action_execute and change the line with _actionConfig and add the line with _missionConfig

_missionConfig = missionConfigFile >> "CfgExileDelayedActions" >> _actionName;
_actionConfig = if (isClass _missionConfig) then {_missionConfig} else {configFile >> "CfgExileDelayedActions" >> _actionName};

 

  • Thanks 1

Share this post


Link to post
Share on other sites

Hello @El' Rabito - Never seen it done this way, though I guess it could!  😉

 

I THOUGHT there was a 'straight out' variable I could set, for example:  'SafeHackTime = 10'.  Like I said, it has been a long time and as far as I know, maybe in the very early versions of Exile, was this present...I do not remember...  😉

 

Thank you for this as well as your time!  I shall give it a whirl!

 

 

🙂

 

PS - Just curious, where did find out about such stuff?  I dug thru some of the code and as I am 'lower medium'  scripter, I could not see anything.  For I was going to 'hard code' a value in once I found the spot.

 

Share this post


Link to post
Share on other sites

z80cpu, you can find a lot of "hidden" hardcoded configurations in ExileMod\addons\exile_client\config  file.
You can always overwrite it with your own custom one, via addon or like Rabito did via missionConfig variables. It depends on the hierarchy of how things load and what can or can't be overwritten.
In this case, there is no need for side-addon. CfgExileDelayedActions class can be overwritten via Description.ext. Instead of calling for classname from addon config (exilemod), it will call it from your mission.  @El' Rabito correct me if I'm wrong here.

PS: Next time, try giving topics a more informative name & less self judgemental 😉 Cheers

  • Thanks 1

Share this post


Link to post
Share on other sites

@chernaruski - Thank you and worry not about 'being judgemental'.  Did you lie?  No, so why should I object to the truth?  I should not and nor do I!  🙂

 

This config file does not exist, at least not by what you're calling it nor its location.  Unless you're referring to the Config.BIN.  Today, I did 'extract' that and it does have a load of stuff in it (900k+).  I will examine it later.  Please et me know if this is the file you're talking about.  🙂

 

@El' Rabito - Thank you for the updated info.  I have inserted it into the overwrite file.

 

Again, thank you to both of you for your input!

 

🙂

 

Share this post


Link to post
Share on other sites

@El' Rabito - Well, I put in that addition, now I tried to 'steal a flag' and it does nothing.  I get the action menu listing, you can select it, you can not 'activate it'.

 

So, this is what I have:

 

I have the delayed action HPP in my mission root.

 

At the very bottom of my config.cpp file, last line is the #include.  It is outside of all brackets.

 

In my config file, I have the overwrite:  ExileClient_action_execute = "overwrites\DelayedActions\ExileClient_action_execute.Sqf";.

 

And in that file I have:

 

Spoiler

/**
 * ExileClient_action_execute
 *
 * 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["_actionName", "_parameters", "_progress", "_actionConfig", "_duration", "_durationFunction", "_failChance", "_failChanceFunction", "_animation", "_animationType", "_conditionFunction", "_abortInCombatMode", "_repeatingCheckFunction", "_startTime", "_sleepDuration", "_failAt", "_errorMessage", "_keyDownHandle", "_mouseButtonDownHandle", "_display", "_label", "_progressBarBackground", "_progressBarMaxSize", "_progressBar", "_repeatingCheck", "_function", "_progressBarColor"];
disableSerialization;
if (ExileClientActionDelayShown) exitWith { false };
ExileClientActionDelayShown = true;
ExileClientActionDelayAbort = false;
// Line Below Added For Delayed Actions
_missionConfig = missionConfigFile >> "CfgExileDelayedActions" >> _actionName;
_actionName = _this select 0;
_parameters = _this select 1;
_progress = 0;
// Line Below Added For Delayed Actions With Org Rem'ed Out
//_actionConfig = configFile >> "CfgExileDelayedActions" >> _actionName;
_actionConfig = if (isClass _missionConfig) then {_missionConfig} else {configFile >> "CfgExileDelayedActions" >> _actionName};
_duration = getNumber (_actionConfig >> "duration");
_durationFunction = getText (_actionConfig >> "durationFunction");
_failChance = getNumber (_actionConfig >> "failChance");
_failChanceFunction = getText (_actionConfig >> "failChanceFunction");
_animation = getText (_actionConfig >> "animation");
_animationType = getText (_actionConfig >> "animationType");
_conditionFunction = getText (_actionConfig >> "conditionFunction");
_abortInCombatMode = (getText (_actionConfig >> "abortInCombatMode")) isEqualTo 1;
_repeatingCheckFunction = getText (_actionConfig >> "repeatingCheckFunction");
_startTime = diag_tickTime;
_sleepDuration = _duration / 100;
_failAt = diag_tickTime + 99999;
_errorMessage = "";
if !(_conditionFunction isEqualTo "") then
{
    _errorMessage = _parameters call (missionNameSpace getVariable [_conditionFunction,{}]);
};
if !(_errorMessage isEqualTo "") exitWith
{
    ExileClientActionDelayShown = false;
    ["ErrorTitleAndText", ["Whoops!", _errorMessage]] call ExileClient_gui_toaster_addTemplateToast;
};
if !(_durationFunction isEqualTo "") then
{
    _duration = _parameters call (missionNameSpace getVariable [_durationFunction,{}]);
};
if !(_failChanceFunction isEqualTo "") then
{
    _failChance = _parameters call (missionNameSpace getVariable [_failChanceFunction,{}]);
};
if ((floor (random 100)) < _failChance) then
{
    _failAt = _startTime + _duration * (0.5 + (random 0.5));
};
("ExileActionProgressLayer" call BIS_fnc_rscLayer) cutRsc ["RscExileActionProgress", "PLAIN", 1, false];
_keyDownHandle = (findDisplay 46) displayAddEventHandler ["KeyDown","_this call ExileClient_action_event_onKeyDown"];
_mouseButtonDownHandle = (findDisplay 46) displayAddEventHandler ["MouseButtonDown","_this call ExileClient_action_event_onMouseButtonDown"];
_display = uiNamespace getVariable "RscExileActionProgress";   
_label = _display displayCtrl 4002;
_label ctrlSetText "0%";
_progressBarBackground = _display displayCtrl 4001;  
_progressBarMaxSize = ctrlPosition _progressBarBackground;
_progressBar = _display displayCtrl 4000;  
_progressBar ctrlSetPosition [_progressBarMaxSize select 0, _progressBarMaxSize select 1, 0, _progressBarMaxSize select 3];
_progressBar ctrlSetBackgroundColor [0, 0.78, 0.93, 1];
_progressBar ctrlCommit 0;
_progressBar ctrlSetPosition _progressBarMaxSize;
_progressBar ctrlCommit _duration;
if !(_animation isEqualTo "") then
{
    if (_animationType isEqualTo "switchMove") then
    {
        player switchMove _animation;
        ["switchMoveRequest", [netId player, _animation]] call ExileClient_system_network_send;
    }
    else
    {
        player playMoveNow _animation;
    };
};
try
{
    while {_progress < 1} do
    {
        if (diag_tickTime >= _failAt) then
        {
            throw 1;
        };
        if (ExileClientActionDelayAbort) then
        {
            throw 2;
        };
        if (ExileClientPlayerIsInCombat) then
        {
            if (_abortInCombatMode) then
            {
                throw 2;
            };
        };
        if !(alive player) then
        {
            throw 2;
        };
        if !(_repeatingCheckFunction isEqualTo "") then
        {
            _repeatingCheck = _parameters call (missionNameSpace getVariable [_repeatingCheckFunction,{}]);
            if !(_repeatingCheck) then
            {
                throw 2;
            };
        };
        uiSleep _sleepDuration;
        _progress = ((diag_tickTime - _startTime) / _duration) min 1;
        _label ctrlSetText format["%1%2", round (_progress * 100), "%"];
    };
    _errorMessage = "";
    if !(_conditionFunction isEqualTo "") then
    {
        _errorMessage = _parameters call (missionNameSpace getVariable [_conditionFunction,{}]);
    };
    if !(_errorMessage isEqualTo "") exitWith
    {
        ["ErrorTitleAndText", ["Whoops!", _errorMessage]] call ExileClient_gui_toaster_addTemplateToast;
        throw 2;
    };
    throw 0;
}
catch
{
    _function = "";
    _progressBarColor = [];
    switch (_exception) do
    {
        case 0:     
        {
            _function = getText (_actionConfig >> "completedFunction");
            _progressBarColor = [0.7, 0.93, 0, 1];
        };
        case 2:     
        {
            _function = getText (_actionConfig >> "abortedFunction");
            _progressBarColor = [0.82, 0.82, 0.82, 1];
        };
        case 1:      
        {
            _function = getText (_actionConfig >> "failedFunction");
            _progressBarColor = [0.91, 0, 0, 1];
        };
    };
    _progressBar ctrlSetBackgroundColor _progressBarColor;
    if !(_function isEqualTo "") then
    {
        _parameters call (missionNameSpace getVariable [_function,{}]);
    };
    if !(_animation isEqualTo "") then
    {
        player switchMove "";
        ["switchMoveRequest", [netId player, ""]] call ExileClient_system_network_send;
    };
    _progressBar ctrlSetPosition _progressBarMaxSize;
    _progressBar ctrlCommit 0;
};
("ExileActionProgressLayer" call BIS_fnc_rscLayer) cutFadeOut 2;
(findDisplay 46) displayRemoveEventHandler ["KeyDown", _keyDownHandle];
(findDisplay 46) displayRemoveEventHandler ["MouseButtonDown", _mouseButtonDownHandle];
ExileClientActionDelayShown = false;
ExileClientActionDelayAbort = false;

 

Line 18 and 24 have your 'updated' instructions.

 

I changed nothing in your HPP file and only the 2 items you mentioned in the update.

 

Now, at least with the 'steal flag', you can not activate it.  I am going to assume this is the same with the other 'exile actions' too.

 

 

Share this post


Link to post
Share on other sites

@El' Rabito - Ignore my last post.  I left it for others so they do not make the same mistake as I did.

 

After looking at that SQF code and your lines, I saw my mistake.  I was 'stepping on' the variable that was being replaced, thus the 'no action'.

 

So for others, this is the original line in ExileClient_action_execute.Sqf

 

Line 20:

_actionConfig = configFile >> "CfgExileDelayedActions" >> _actionName;

 

 

Now the copy in your OverWrite folder becomes:

 

// Line Below Added For Delayed Actions With Org Rem'ed Out
//_actionConfig = configFile >> "CfgExileDelayedActions" >> _actionName;
_missionConfig = missionConfigFile >> "CfgExileDelayedActions" >> _actionName;
_actionConfig = if (isClass _missionConfig) then {_missionConfig} else {configFile >> "CfgExileDelayedActions" >> _actionName};

 

 

Doing corrected the error I was having.  Of course you had your listed this way, to ME, it was not clear where the 'mission' line should go.  Hopefully, what I wrote above will make it crystal clear to all.  🙂

 

 

 

Thanks again!

 

🙂

 

Share this post


Link to post
Share on other sites
12 hours ago, z80cpu said:

@chernaruski - Thank you and worry not about 'being judgemental'.  Did you lie?  No, so why should I object to the truth?  I should not and nor do I!  🙂

 

This config file does not exist, at least not by what you're calling it nor its location.  Unless you're referring to the Config.BIN.  Today, I did 'extract' that and it does have a load of stuff in it (900k+).  I will examine it later.  Please et me know if this is the file you're talking about.  🙂

 

@El' Rabito - Thank you for the updated info.  I have inserted it into the overwrite file.

 

Again, thank you to both of you for your input!

 

🙂

 

yeah, that's the file. it's binarized (therefore .bin), but if you unbin it with arma tools or whatever its just a text file .cpp

Share this post


Link to post
Share on other sites

Thank you @chernaruski - The day I read your post, I 'took it apart' and saw all the stuff in there...

 

Thanks again!

 

🙂

 

Share this post


Link to post
Share on other sites

×