• If you have a mod, tool or prefab, please use the Resources section. Click Mods at the top of the forums.

Adding a new tier to Living off the Land

Kalnazzar

Refugee
Ok so I want to add a new tier for Living off the Land Perk to harvest a seed at rank 4. A friend gave me a quick setup example said it might work it might not. But it's not so I am not sure why. If anyone can help, I would be much appreciated. 

<remove xpath="/progression/perks[@name='perkLivingOffTheLand']"/>

<append xpath="/progression/perks">
    <perk name="perkLivingOffTheLand" max_level="4" parent="skillFortitudeSurvival" name_key="perkLivingOffTheLandName" desc_key="perkLivingOffTheLandDesc" icon="ui_game_symbol_tree">
        <level_requirements level="1"><requirement name="ProgressionLevel" progression_name="attFortitude" operation="GTE" value="1" desc_key="reqFortitudeLevel01"/></level_requirements>
        <level_requirements level="2"><requirement name="ProgressionLevel" progression_name="attFortitude" operation="GTE" value="3" desc_key="reqFortitudeLevel03"/></level_requirements>
        <level_requirements level="3"><requirement name="ProgressionLevel" progression_name="attFortitude" operation="GTE" value="5" desc_key="reqFortitudeLevel05"/></level_requirements>
        <level_requirements level="4"><requirement name="ProgressionLevel" progression_name="attFortitude" operation="GTE" value="7" desc_key="reqFortitudeLevel07"/></level_requirements>
        <level_requirements level="5"><requirement name="ProgressionLevel" progression_name="attFortitude" operation="GTE" value="10" desc_key="reqFortitudeLevel10"/></level_requirements>

        <effect_group>
            <passive_effect name="CraftingTier" operation="base_set" level="0,5" value="0,5" tags="perkLivingOffTheLandCrafting"/><!-- fake crafting perk that is used to scale resources -->

            <passive_effect name="HarvestCount" operation="perc_add" level="1,2,3,4" value="1,1,2,2" tags="cropHarvest,wildCropsHarvest"/>
            <passive_effect name="HarvestCount" operation="base_set" level="2,3,4" value="1,1,1" tags="bonusCropHarvest"/>
            
            <passive_effect name="HarvestCount" operation="base_set" level="4" value="1" tags="seedHarvest"/>
            
            <passive_effect name="RecipeTagUnlocked" operation="base_set" level="1,4" value="1" tags="plantedAloe1,plantedChrysanthemum1,plantedGoldenrod1,plantedYucca1"/>
            <passive_effect name="RecipeTagUnlocked" operation="base_set" level="2,4" value="1" tags="plantedBlueberry1,plantedCoffee1,plantedCorn1,plantedCotton1,plantedMushroom1,plantedPotato1,plantedHop1,plantedPumpkin1,plantedGraceCorn1"/>

            <effect_description level="1" desc_key="perkLivingOffTheLandRank1Desc" long_desc_key="perkLivingOffTheLandRank1LongDesc"/>
            <effect_description level="2" desc_key="perkLivingOffTheLandRank2Desc" long_desc_key="perkLivingOffTheLandRank2LongDesc"/>
            <effect_description level="3" desc_key="perkLivingOffTheLandRank3Desc" long_desc_key="perkLivingOffTheLandRank3LongDesc"/>
            <effect_description level="4" desc_key="perkLivingOffTheLandRank4Desc" long_desc_key="perkLivingOffTheLandRank4LongDesc"/>
            <effect_description level="5" desc_key="perkLivingOffTheLandRank5Desc" long_desc_key="perkLivingOffTheLandRank5LongDesc"/>
        </effect_group>
    </perk>
</append>

So this is what he sent me and it keeps saying it can't load it. 

 
Last edited by a moderator:
Just doublechecking some basic stuff. Does this chunk of xml begin and end with matching tags, such as <config> before the first remove, and </config> after the </append>? Does the modlet have its own folder, with a ModInfo.xml at the same level as the Config folder containing your new Progression.xml? 

 
Just doublechecking some basic stuff. Does this chunk of xml begin and end with matching tags, such as <config> before the first remove, and </config> after the </append>? Does the modlet have its own folder, with a ModInfo.xml at the same level as the Config folder containing your new Progression.xml? 
That last part confused me lol. Kinda new to this ok I am working on a total re-haul mode as I learn new things right now, I just have a bunch of new recipes and Items because that is pretty much all I know how to MOD currently I am a visual learner so I have to see something to understand how to do it myself and I can't find videos on how to MOD this part or terrain. But to answer your question the best I can I have tried this one and I also copied and pasted the original perk and just changed the part's he had changed and added. Both kept popping up yellow test saying it could not remove [SIZE=14.6px]'perkLivingOffTheLand because there was already a key with that name. But [/SIZE]no,[SIZE=14.6px] it's not [/SIZE]its[SIZE=14.6px] own MOD it has other stuff I edited which all work I use them on my own [/SIZE]server,[SIZE=14.6px] and this is the only thing I [/SIZE]can't[SIZE=14.6px] seem to get to work. At [/SIZE]first,[SIZE=14.6px] I thought maybe it was seedHarvest maybe that's not the code/command the game [/SIZE]registers[SIZE=14.6px] to harvest a seed [/SIZE]but[SIZE=14.6px] then I read the yellow text and it said it couldn't remove the [/SIZE]original[SIZE=14.6px] perk code.  [/SIZE]So,[SIZE=14.6px] my question is since I am new what do you mean by ""[/SIZE][SIZE=14.6px]with a ModInfo.xml at the same level as the Config folder"" I have a [/SIZE][SIZE=14.6px]Progression.xml in my config folder along with Item's and recipes, and quest. [/SIZE]

 
Last edited by a moderator:
<configs>
<remove xpath="/progression/perks[@name='perkLivingOffTheLand']"/>
<append xpath="/progression/perks">
<perk name="perkLivingOffTheLand" max_level="4" parent="skillFortitudeSurvival" name_key="perkLivingOffTheLandName" desc_key="perkLivingOffTheLandDesc" icon="ui_game_symbol_tree">
        <level_requirements level="1"><requirement name="ProgressionLevel" progression_name="attFortitude" operation="GTE" value="1" desc_key="reqFortitudeLevel01"/></level_requirements>
        <level_requirements level="2"><requirement name="ProgressionLevel" progression_name="attFortitude" operation="GTE" value="3" desc_key="reqFortitudeLevel03"/></level_requirements>
        <level_requirements level="3"><requirement name="ProgressionLevel" progression_name="attFortitude" operation="GTE" value="5" desc_key="reqFortitudeLevel05"/></level_requirements>
        <level_requirements level="4"><requirement name="ProgressionLevel" progression_name="attFortitude" operation="GTE" value="7" desc_key="reqFortitudeLevel07"/></level_requirements>
        <level_requirements level="5"><requirement name="ProgressionLevel" progression_name="attFortitude" operation="GTE" value="10" desc_key="reqFortitudeLevel10"/></level_requirements>
        <!--
        <effect_group>
            <requirement name="ItemHasTags" tags="perkLivingOffTheLand"/>
                <passive_effect name="BlockDamage" operation="perc_add" level="1,3" value=".3,1.5"/>
                <passive_effect name="EntityDamage" operation="perc_add" level="1,3" value=".1,.5"/>
        </effect_group>
        -->
        <effect_group>
            <passive_effect name="CraftingTier" operation="base_set" level="0,5" value="0,5" tags="perkLivingOffTheLandCrafting"/><!-- fake crafting perk that is used to scale resources -->

            <passive_effect name="HarvestCount" operation="perc_add" level="1,2,3,4" value="1,1,2,2" tags="cropHarvest,wildCropsHarvest"/>
            <passive_effect name="HarvestCount" operation="base_set" level="2,3,4" value="1,1,2" tags="bonusCropHarvest"/>
            <passive_effect name="HarvestCount" operation="base_set" level="4" value="1" tags="seedHarvest"/>
            
            <passive_effect name="RecipeTagUnlocked" operation="base_set" level="1,4" value="1" tags="plantedAloe1,plantedChrysanthemum1,plantedGoldenrod1,plantedYucca1"/>
            <passive_effect name="RecipeTagUnlocked" operation="base_set" level="2,4" value="1" tags="plantedBlueberry1,plantedCoffee1,plantedCorn1,plantedCotton1,plantedMushroom1,plantedPotato1,plantedHop1,plantedPumpkin1,plantedGraceCorn1"/>

            <effect_description level="1" desc_key="perkLivingOffTheLandRank1Desc" long_desc_key="perkLivingOffTheLandRank1LongDesc"/>
            <effect_description level="2" desc_key="perkLivingOffTheLandRank2Desc" long_desc_key="perkLivingOffTheLandRank2LongDesc"/>
            <effect_description level="3" desc_key="perkLivingOffTheLandRank3Desc" long_desc_key="perkLivingOffTheLandRank3LongDesc"/>
            <effect_description level="4" desc_key="perkLivingOffTheLandRank4Desc" long_desc_key="perkLivingOffTheLandRank4LongDesc"/>
            <effect_description level="5" desc_key="perkLivingOffTheLandRank5Desc" long_desc_key="perkLivingOffTheLandRank5LongDesc"/>
        </effect_group>
    </perk>
    </append>
</configs>

 
That last part confused me lol. Kinda new to this ok I am working on a total re-haul mode as I learn new things right now, I just have a bunch of new recipes and Items because that is pretty much all I know how to MOD currently I am a visual learner so I have to see something to understand how to do it myself and I can't find videos on how to MOD this part or terrain. But to answer your question the best I can I have tried this one and I also copied and pasted the original perk and just changed the part's he had changed and added. Both kept popping up yellow test saying it could not remove [SIZE=14.6px]'perkLivingOffTheLand because there was already a key with that name. But [/SIZE]no,[SIZE=14.6px] it's not [/SIZE]its[SIZE=14.6px] own MOD it has other stuff I edited which all work I use them on my own [/SIZE]server,[SIZE=14.6px] and this is the only thing I [/SIZE]can't[SIZE=14.6px] seem to get to work. At [/SIZE]first,[SIZE=14.6px] I thought maybe it was seedHarvest maybe that's not the code/command the game [/SIZE]registers[SIZE=14.6px] to harvest a seed [/SIZE]but[SIZE=14.6px] then I read the yellow text and it said it couldn't remove the [/SIZE]original[SIZE=14.6px] perk code.  [/SIZE]So,[SIZE=14.6px] my question is since I am new what do you mean by ""[/SIZE][SIZE=14.6px]with a ModInfo.xml at the same level as the Config folder"" I have a [/SIZE][SIZE=14.6px]Progression.xml in my config folder along with Item's and recipes, and quest. [/SIZE]


I believe Cranberry Monster wants to double-check that you are using this code in a modlet, and that the modlet is properly organized.

This code cannot go directly into the game's config files.

The "<remove..." and "<append..." tags are XPath commands, not configuration XML. The game only recognizes XPath if it is inside a modlet, in that modlet's "Config" folder, in a file whose name matches the name of a file within the game's "Config" folder. (EDIT: the filenames must match exactly, so "Progression.xml" won't match "progression.xml".) Also, the modlet won't work unless there is a ModInfo.xml file inside the root folder for that modlet.

If all that is true, then I'm not sure what to tell you. The code you posted above looks like it should not produce errors.

Whether it will do what you want, I cannot say. I searched the game's XML files and could not find a "seedHarvest" string anywhere. Getting a seed seems to be determined by the "Destroy" drop event in the crop's block, and that does not have any tags.

 
Last edited by a moderator:
I believe Cranberry Monster wants to double-check that you are using this code in a modlet, and that the modlet is properly organized.

This code cannot go directly into the game's config files.

The "<remove..." and "<append..." tags are XPath commands, not configuration XML. The game only recognizes XPath if it is inside a modlet, in that modlet's "Config" folder, in a file whose name matches the name of a file within the game's "Config" folder. (EDIT: the filenames must match exactly, so "Progression.xml" won't match "progression.xml".) Also, the modlet won't work unless there is a ModInfo.xml file inside the root folder for that modlet.

If all that is true, then I'm not sure what to tell you. The code you posted above looks like it should not produce errors.

Whether it will do what you want, I cannot say. I searched the game's XML files and could not find a "seedHarvest" string anywhere. Getting a seed seems to be determined by the "Destroy" drop event in the crop's block, and that does not have any tags.
I think I found a better work around because I started to see that even if I figure this out, I am goanna have to update the UI to show the perk. I don't know how to edit that yet. Can't find videos of people moding the harder stuff. But yet I have the rest of the stuff set up correctly in the modlet. 

 
Back
Top