Redbeard_Actual 28 Report post Posted October 14, 2016 I have been reading on the BIS and other forums to get a better general idea of how to manipulate config classes. So far I have relearned a lot of what I already understood. But my curiosity has not been sated. I get how to edit the classes directly. I get how to add classes I have written with an include command. I still have not figured out if I can take it a step further. What I need to know, is whether I can manipulate these classes with SQF files. For example, is it possible to check a players UID/PID (for which I know how to write the code), then add classes to the CfgCraftingRecipes class if the player UID/PID matches one of the stored UID/PID's? I'm trying to limit some of the custom crafting I am writing to my donators. Any pointers or links to information will be most greatly received. Share this post Link to post Share on other sites
Mezo 1264 Report post Posted October 14, 2016 (edited) Short answer is no. But there's a better way. Create new class of crafting recipes, that inherits from "CfgCraftingRecipes" for players that are allowed to use them. Edited October 14, 2016 by Mezo 1 Share this post Link to post Share on other sites
Redbeard_Actual 28 Report post Posted October 14, 2016 19 minutes ago, Mezo said: Short answer is no. But there's a better way. Create new class of crafting recipes, that inherits from "CfgCraftingRecipes" for players that are allowed to use them. Could you point me to anything that may kick me in the right direction? I am unsure how to restrict the new crafting recipes to just selected players. Share this post Link to post Share on other sites
Mezo 1264 Report post Posted October 14, 2016 (edited) Let's say you have an array of donator UID in an array. DONATORS = []; // Array must be global and contain a lit of UID's for your donators. if ((getPlayerUID player) in DONATORS) then { _config = (missionConfigFile >> "CfgDonatorCraftingRecipes"); //Replacing The normal config if the player's id is in your list. }; Basically, find wherever it checks the recipe and run the above right under wherever the config path is defined. No reason why that shouldn't work Obviously that isn't the full code, but it's a rough idea. Edited October 14, 2016 by Mezo 1 Share this post Link to post Share on other sites
Redbeard_Actual 28 Report post Posted October 14, 2016 41 minutes ago, Mezo said: Let's say you have an array of donator UID in an array. DONATORS = []; // Array must be global and contain a lit of UID's for your donators. if ((getPlayerUID player) in DONATORS) then { _config = (missionConfigFile >> "CfgDonatorCraftingRecipes"); //Replacing The normal config if the player's id is in your list. }; Basically, find wherever it checks the recipe and run the above right under wherever the config path is defined. No reason why that shouldn't work Obviously that isn't the full code, but it's a rough idea. Thanks matey, This is somewhat along the lines that I was thinking. You have been a great help in clearing my frantic little mind with a bit of help. Cheers! Share this post Link to post Share on other sites
Redbeard_Actual 28 Report post Posted October 14, 2016 I had a good long look at the code this morning for crafting. Figured I could use CfgExileCustomCode to overwrite the code. That was a rabbit hole I should have avoided. I see all the places where the configs are called. But I'll be damned if I can figure out how all the files interact. Looks like I would have to edit 3 or 4 files. And I'm still unsure any of the edits would work. Share this post Link to post Share on other sites
Redbeard_Actual 28 Report post Posted October 14, 2016 2 minutes ago, Metalman10 said: ill see if i can make something for you.. This is a case of having an interesting Idea. Then blood hounding it until my head hurts. I'm slowly understanding how the rile structure works and I understand how to replace the functions using CfgExileCustomCode. I think I need to sleep or play or something to distract myself. As always though, any help is always greeted with gratitude. Share this post Link to post Share on other sites
Redbeard_Actual 28 Report post Posted October 14, 2016 That's my favorite reason. "Because ArmA!" Share this post Link to post Share on other sites
Redbeard_Actual 28 Report post Posted October 14, 2016 That looks like it should work. Getting it into all the places it has to go is going to be the trick. Four or Five functions use the same config for different things. One of them gets a list of all the recipes, one gets a list of what recipes are show when you open the crafting menu on an item, one is accessed when you actually click to craft the item and on and on and on. Figuring this out is going to be the magic. Share this post Link to post Share on other sites
Mezo 1264 Report post Posted October 14, 2016 Will have a look a bit later @Redbeard_Actual 1 Share this post Link to post Share on other sites