Jump to content
Rosso777

Modding exile_client config.bin

Recommended Posts

I’ve converted the exile client’s config.bin using the Arma tools CfgConvert (thanks to master @Larrow) and made a few specific changes. I converted back to .bin and readded/reuploaded to server (also changing the same files on the server’s @Exile client files). 

For some reason, none of the changes will happen. For example, I added a few tools for opening cans; Canopener was already there, so I simply added Knife, screwdriver, and pliers (using the correct item classnames). Nothing. 
 

Am I missing something here? Or should the process of editing the .bin be straight-forward?

Share this post


Link to post
Share on other sites

bin is binarized file you can't edit it straight-forward, well some parts you can, but potential of breaking something during is extremely high.  converting it to cpp, editing and converting it back to bin is the proper way to do it, so you did it properly.
if I understand correctly what you've done is edited this classname ?

class Exile_AbstractItem_Interaction_Eating_Can: Exile_AbstractItem_Interaction_Eating
    {
        tools[] = {"Exile_Item_CanOpener"};
    };

by adding other tools like so:         tools[] = {"Exile_Item_CanOpener","Exile_Item_Screwdriver"};

 

Quote

readded/reuploaded to server 


I don't understand how did you readd the edited and converted bin file back? Did you re-pbo the exile_client pbo?
If you did then your signature check will fail due to new pbo...if you didn't, then how did you add it back to pbo?

to overwrite mod configs, you need to create your own server mod and add config overwrites there, when your addon have dependency of exile_client set.
maybe instead of overwriting exile config, just change the code of ExileClient_object_item_consume.sqf and overwrite it via mission, as you do with many tweaks that doesn't require of you to go and change built in configs ?

Share this post


Link to post
Share on other sites

I’m aware of changing the ExileClient codes and calling the overwrites; I’ve done that successfully lots of times. On my private server, all my players have my version of exile (with edits) subscribed to on Steam so they get any updates I make. And the signatures have been adjusted to accommodate for changes. So no issues there. The proper way to convert to cpp, pbo and then add back to main @exile is exactly how I’ve done it, so I’m just not sure why the tools I’ve added are not working.  
 

One thing I will add is that I did make a change that showed up at one point— I changed the BambiOverall to a NakedBody so that players spawned in with only underwear. This displayed correctly but was the only working change. I also tried to lower/change the sounds of tree-chopping, and the aforementioned can-opening tools. Nada. 
 

if I can change all these things in the CustomCode config, great. But I also want the ability to ADD files that the client preStart precompiles; if there’s another easier way to do this, please let me know. This all started because I wanted to create a mod of the ‘nearestConcreteMixer’ file but as a ‘nearestWaterPump’ instead. 

Share this post


Link to post
Share on other sites

I'm sorry, its very hard to understand you, 
Can you explain what exactly you want to do and what you did and how, instead of bombarding with unrelated information about treechopping/bambi loadout/nearestConcreteMixer/etc? 

Have you done the overwrite as I've described and it didn't work or something else? You do not provide any information, how do you want to get help if we have no idea what you did and how?

What do you mean by "my version of exile" you've reuploaded exile mod client files to workshop as "alternative" version of exile?

Share this post


Link to post
Share on other sites

Okay so if I make an adjustment in the ItemConsume file as you've mentioned, does this look right?

Spoiler


//_itemClassName = _this select 0;
_itemClassName = ["Exile_Item_CanOpener","Exile_Item_Pliers","Exile_Item_Knife","Exile_Item_Screwdriver"];


if !(_itemClassName in (magazines player)) exitWith {false};
if( isClass(configFile >> "CfgMagazines" >> _itemClassName >> "Interactions" >> "Consuming") ) then
{
    _consumingConfig = configFile >> "CfgMagazines" >> _itemClassName >> "Interactions" >> "Consuming";

 

Share this post


Link to post
Share on other sites

No. _itemClassName is the item you interact with (food,drink,etc) and not the tool. What I've meant by "change it" is add a proper magazine check, (as its done in ExileClient_gui_itemDetails_show). If you don't know how to do it, you can try and make changes directly in ExileClient_gui_itemDetails_show.sqf in this part of code:

if( isClass(_itemConfig >> "Interactions" >> "Consuming") )  then
{
    _requiredTools = getArray (_itemConfig >> "Interactions" >> "Consuming" >> "tools");
    _hasAllTools = true;
    {
        if !(_x in _equippedMagazines) exitWith 
        {
            _hasAllTools = false;
        };
    }
    forEach _requiredTools;
    (_dialog displayCtrl 1300) ctrlEnable _hasAllTools;
};

the values of _requiredTools are the one you want , so add a check for items you want
  //  _requiredTools = getArray (_itemConfig >> "Interactions" >> "Consuming" >> "tools");

_requiredTools =  ["Exile_Item_CanOpener","Exile_Item_Pliers","Exile_Item_Knife","Exile_Item_Screwdriver"];

and the overwrite the ExileClient_gui_itemDetails_show via customcode, as you did hundreds times before.

Share this post


Link to post
Share on other sites

I appreciate the continued help. I tried your code and it resulted in the player requiring all the tools in the array; they should only require one of them.

 

i also tried: 

_requiredTools=  [["Exile_Item_CanOpener"],["Exile_Item_Pliers"],["Exile_Item_Knife"],["Exile_Item_Screwdriver"]]; which resulted in a strange text glitch in the consume menu. 

and then I tried:

_requiredTools=  ["Exile_Item_CanOpener" || “Exile_Item_Pliers" || "Exile_Item_Knife" || "Exile_Item_Screwdriver"]; which resulted in not being able to open an item at all for use/consume. 
 

not sure where to go from here. 

Share this post


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

I appreciate the continued help. I tried your code and it resulted in the player requiring all the tools in the array; they should only require one of them.

 

It does exactly what it should, for each _requiredTools. If you want it to check if one of the _requiredTools is in inventory you need to rewrite the code to something like this
I can't test things right now, so take this code as a general direction and as example and try to make it work from there ...
 

if( isClass(_itemConfig >> "Interactions" >> "Consuming") )  then
{

if ("Exile_Item_CanOpener" in magazines player || "Exile_Item_Pliers" in magazines player || "Exile_Item_Screwdriver"  in magazines player) then {_hasAllTools = true;} else {_hasAllTools = false;};
	

	(_dialog displayCtrl 1300) ctrlEnable _hasAllTools;
};

 

Share this post


Link to post
Share on other sites

×