Kobayashi

[ExAd XM8 APP] BRAma Cookbook

50 posts in this topic

Since the changes made to the XM8 in the last Exile release, XM8Apps and Improved XM8 Apps are no longer needed. @Janski has created an addon called ExAd, which adds functionality to the new "More" XM8 slide. I've converted the original BRAma Cookbook code to plug into his addon. ExAd will create buttons on the Extra Apps slide in the XM8, and if done properly, you can plug BRAma Cookbook into his framework with very little difficulty.

I am not the author of BRAma Cookbook, I simply converted the original code designed for XM8Apps to work with ExAd instead. I'm not going to support or modify BRAma Cookbook, if there's something you want changed, you probably should figure it out on your own. In it's current form, it works just fine, so I'm leaving it at that. The original script author has been sort of MIA, so I'm starting this topic to have a place to get the version of the app that works with the new "More" button on the XM8.

You can get ExAd here:

http://exile.majormittens.co.uk/topic/13865-updated-tutorial-appexad-package-of-virtual-garagexm8halo-parachuteadmin-eventshackinggrindingvehicle-upgrade/

It's fairly easy to install, questions on ExAd should be directed to that thread.

 

You can download the updated version of BRAma Cookbook here:

https://github.com/ndavalos/BRAmaRecipes-for-ExAd

Follow the installation instructions and it should work fine. There is a sample mission also if you need to look at how this was added to a vanilla Exile install. The map is Namalsk, I can't guarantee that you can load the mission, but you can at least see how it plugs into ExAd in the mission code. 

If there is an update for ExAd that requires changing this script, I'll try to fix things when I can.

You can find the original code written by Brun here:

http://exile.majormittens.co.uk/topic/11296-xm8-app-brama-cookbook-updated/

 

If Brun ever shows back up again then maybe he can take this code back and start a new topic :)

 

  • Like 6

Share this post


Link to post
Share on other sites
On 2016-07-24 at 11:51 PM, Kobayashi said:

If there is an update for ExAd that requires changing this script, I'll try to fix things when I can.

I'll always going to try to make it backward compatible, so hopefully you won't need to do that. ;) 

  • Like 4

Share this post


Link to post
Share on other sites
Advertisement

any way to help me out with an issue getting the cookbook to work with the concrete mixers. Some items need concrete mixers and the workbench to build, how can I make this work. Doing it like so will not work.. 

requiredInteractionModelGroup[] = 
    {    
        "WorkBench",
        "ConcreteMixer"
    };

 

or 

requiredInteractionModelGroup = ["WorkBench","ConcreteMixer"];

 

or 

requiredInteractionModelGroup = { "WorkBench","ConcreteMixer";};

I do not have the concrete mixer set as a interactionmodel, as I figured it was already set somewhere, since it is used in crafting, but its not in the mpmission/config.cpp
  

Share this post


Link to post
Share on other sites

HI

Great conversion, I got this to work but only with battleye =0. When run with battleye it kicks and kicks and kicks for all sorts of things.

Has anyone else had same issue ?

// EDIT  never mind it was typo by me,  doh !!

Works good thanks.

Edited by BustrR

Share this post


Link to post
Share on other sites
On 9/9/2016 at 9:31 PM, williamv1999 said:

any way to help me out with an issue getting the cookbook to work with the concrete mixers. Some items need concrete mixers and the workbench to build, how can I make this work. Doing it like so will not work.. 

requiredInteractionModelGroup[] = 
    {    
        "WorkBench",
        "ConcreteMixer"
    };

 

or 

requiredInteractionModelGroup = ["WorkBench","ConcreteMixer"];

 

or 

requiredInteractionModelGroup = { "WorkBench","ConcreteMixer";};

I do not have the concrete mixer set as a interactionmodel, as I figured it was already set somewhere, since it is used in crafting, but its not in the mpmission/config.cpp
  

It appears the recipies were originally designed to use getText not getArray for requiredInteractionModelGroup, so it will probably have to get fixed to use getArray and display the members of the array. I see where the problem is, it's a matter of me getting around to tweaking that. I'm in the middle of working on the Epoch 1.0.6 upgrade for some A2 servers. 

If you switch this line in  fnc_components_Load in the file onOpen.sqf:

_requiredInteractionModelGroup = getText(missionConfigFile >> "CfgCraftingRecipes" >> SelectedRecipe >> "requiredInteractionModelGroup");

_requiredInteractionModelGroup = getText(missionConfigFile >> "CfgCraftingRecipes" >> SelectedRecipe  >> "requiredInteractionModelGroup");

To:

_requiredInteractionModelGroup = getArray(missionConfigFile >> "CfgCraftingRecipes" >> SelectedRecipe  >> "requiredInteractionModelGroup");

Then go find this part:

	if (_requiredInteractionModelGroup != "")  then 
	{
		_foundObject = false;
		
		_interactionModelGroupConfig = missionConfigFile >> "CfgInteractionModels" >> _requiredInteractionModelGroup;
		_RequiredDispName = getText(_interactionModelGroupConfig >> "name");
		_interactionModelGroupModels = getArray(_interactionModelGroupConfig >> "models");
	
		//Exile Code
		if ([ASLtoAGL (getPosASL player), 10, _interactionModelGroupModels] call ExileClient_util_model_isNearby) then
		{
			(_display displayCtrl 85502) lbAdd Format["%1 - [OK]",_RequiredDispName];
			_lbsize = lbSize (_display displayCtrl 85502);
			(_display displayCtrl 85502) lbSetColor [_lbsize-1, [0.698, 0.925, 0,1]];			
			_foundObject = true;	
		}
		else 
		{
			if ( _interactionModelGroupModels call ExileClient_util_model_isLookingAt ) then
			{
				(_display displayCtrl 85502) lbAdd Format["%1 - [OK]",_RequiredDispName];
				_lbsize = lbSize (_display displayCtrl 85502);
				(_display displayCtrl 85502) lbSetColor [_lbsize-1, [0.698, 0.925, 0,1]];			
				_foundObject = true;	
			};
		};
		if !(_foundObject) then
		{
			(_display displayCtrl 85502) lbAdd Format["%1 - [MISSING]",_RequiredDispName];
			_lbsize = lbSize (_display displayCtrl 85502);
			(_display displayCtrl 85502) lbSetColor [_lbsize-1, [0.918, 0, 0,1]];				
		};
	
		_lbsize = lbSize (_display displayCtrl 85502);
		(_display displayCtrl 85502) lbSetData [_lbsize-1,_requiredInteractionModelGroup];
	};

And make it use a forEach loop to add each interaction model to the display it should work.

Of course if you do fix it and want to submit a pull request I can merge the changes into the git project :)

  • Like 1

Share this post


Link to post
Share on other sites

Probably, I don't have time to attempt to put it in, you're more than welcome to try it. It should work since they are both doing very similar things to add apps to the XM8.

After A2 Epoch is released I'll be working on A3 Exile stuff again.

Share this post


Link to post
Share on other sites
Advertisement

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.