GodSponge Posted April 1, 2022 Share Posted April 1, 2022 I am looking to move the Master Chef perk to a different attribute, but I'm having a hard time figuring out what to do. I've read a couple of mod tutorials, but they are almost all related to craftable items. I know that I need to look in progression, but I don't know where to find the perk, how to move it, or if moving it will break anything else. Any help would be appreciated Link to comment Share on other sites More sharing options...
Ethreon Posted April 1, 2022 Share Posted April 1, 2022 First you should decide whether you want to make this a standalone mod or just modify base game files. First one is much more preferable but requires you to study xpath patching and it's what I'd recommend you do.Open progression.xml and at the top you can see the main attributes listed. This will help with the att. name;Do a search for the word chef and the first result should be your Master Chef perk. There's multiple things that have to be replaced here as far as I can tell 1. parent="skillStrengthGeneral" with your desired skill parent - options here determine which tab under the attribute your perk will go and depend on each perk; 2. progression_name="attStrength" with the replacing attribute name you find at the top of the document; 3. desc_key="reqStrengthLevel01" with the replacement key of the new attribute; These steps have to be performed for each of the 5 lines. In addition to that you would also have to change the descriptions for the changed perk which can be found in Localization.txt to whatever you want them to be, if needed.If you directly edit the game files this is a very quick find and replace job, but it's not something I'd recommend both to preserve the functionality of the base game and to avoid losing your changes after an update. The safer and correct way to do this would be with an xpath patch mod, and personally I'd recommend using remove and append to simply get rid of the old node and replace it with your edited one that you can create using the instructions above <remove xpath="/progression/perks/perk[@name='perkMasterChef']" /> <append xpath="progression/perks"> <perk name="perkMasterChef" parent="your new parent here" name_key="your new key here" desc_key="NEWperkMiner69rDesc" icon="ui_game_symbol_mining"> <level_requirements level="1"><requirement name="ProgressionLevel" progression_name="your new attribute here" operation="GTE" value="1" desc_key="your new requirement here"/></level_requirements> .... </perk> </append>This is ofc just a quick example I made, you will have to make sure it's completed. Study other mods that do this to get better examples of how to xpath for this specific game. Make sure you define NEWperkMiner69rDesc in a custom Localization.txt if anything needs changing, else leave the default desc_key in. long_desc_key can be replaced with the new text you desire or left as is. Link to comment Share on other sites More sharing options...
GodSponge Posted April 1, 2022 Author Share Posted April 1, 2022 OK, after doing some research on xpath I figured out what I thought would be correct. I tried <setattribute xpath="/progression/perks/perk[@name='perkMasterChef']" name="@parent">skillIntellectCraftsmanship</setattribute> which is the way it is used on the 7 days fandom wiki about xpath. and <setattribute xpath="/progression/perks/perk[@name='perkMasterChef']/@parent">skillIntellectCraftsmanship</setattribute> but neither of these change anything. Just to make sure that I wasn't typing anything wrong with my selector, I used <removeattribute xpath="/progression/perks/perk[@name='perkMasterChef']/@parent" /> and this removed the parent="skillStrengthGeneral" from the line as it should. I'm not sure what I'm doing wrong with the setattribute command. Link to comment Share on other sites More sharing options...
GodSponge Posted April 1, 2022 Author Share Posted April 1, 2022 Think I've almost got it. I'll post an update if i do :D Link to comment Share on other sites More sharing options...
GodSponge Posted April 1, 2022 Author Share Posted April 1, 2022 Ok, well that took forever to figure out. I'm really not used to xpath... I finally got it with modifications. Much cleaner to just change the current one than delete and remake it. Link to comment Share on other sites More sharing options...
Ethreon Posted April 1, 2022 Share Posted April 1, 2022 Either works. You can use set but that means you have to use a lot of operations, or remove and append for only 2 operations. Set allows for better compatibility however, so it's a manner of how much work you're willing to put into it. Link to comment Share on other sites More sharing options...
Recommended Posts