Jump to content

Unlocking Recipes through Skill Magazine Progression


Recommended Posts

Hey modders!

 

So lately I've been enjoying playing without traders and am trying to change aspects of the game that are dependent on them, such as mods for the dew collector. I've already created and added to the game 3 recipes. Now I'd like to tie the ability to actually learn those recipes through skill magazine progression, similar to how the bellows and anvil are unlocked. I got about halfway, but it wasn't working quite right. Just looking for some help on how to accomplish this as I'm getting the sense it isn't just a simple change to a line in the XML. Also, I'm sure localization will be needed as well.

 

Any help that can be provided or if there's a good video that covers this specific topic would be greatly appreciated. Thanks!

Link to comment
Share on other sites

I can help you later, I have a mod that removes schematics and rolls them into the crafting magazine system.  Would you mind providing some examples of the recipes and where you want to put them so I can provide targeted help rather than a long winded answer?  😉  I am at work currnetly but should hopefully be able to start helping this evening

Link to comment
Share on other sites

So for the unlocks, those will be easy to code:

 

    <append xpath="//crafting_skill[@name='craftingWorkstations']/effect_group">
            <passive_effect name="RecipeTagUnlocked" operation="base_set" level="8,100" value="1" tags="toolDewGatherer"/>        
            <passive_effect name="RecipeTagUnlocked" operation="base_set" level="12,100" value="1" tags="toolDewTarp"/>
            <passive_effect name="RecipeTagUnlocked" operation="base_set" level="16,100" value="1" tags="toolDewFilter"/>    
    </append>

 

Note, the max number of workstation magazines is 75 but for some reason TFP have 100 as the max level.  Change the first number in level to where you want to unlock them at.

 

For display, you need to add them as a tier in the appropriate display node.  Using my numbers above as an example,

 

    <insertAfter xpath="//crafting_skill[@name='craftingWorkstations']/display_entry/unlock_entry[@item='forge']">
            <unlock_entry item="toolDewGatherer" unlock_tier="3" />
    </insertAfter>
    <set xpath="//crafting_skill[@name='craftingWorkstations']/display_entry[contains(@icon,'cntDewCollector')]/@unlock_level">2,5,8</set>

 

This will now add the Dew Gatherer to the first display entry and update the unlock levels for it.  The other two items would need to be added the next display node.

 

If you want to add localization, then one way to do that is

 

    <set xpath="//crafting_skill[@name='craftingWorkstations']/display_entry[contains(@icon,'cntDewCollector')]/@name_key">workstationsT1-1,workstationsT1-2,workstationsT1-3</set>

 

That replaces the current name key with a new one that includes the original 2 and a third new one you can now reference in the localization file.

 

Another method is to use csv to simply add the new code

 

 <csv xpath="//crafting_skill[@name='craftingWorkstations']/display_entry[contains(@icon,'cntDewCollector')]/@name_key" delim="," op="add" >workstationsT1-3</csv>

 

Assuming I didn't mess up any of my code above, it should add the new name key to the existing ones.

Link to comment
Share on other sites

@BFT2020 Thank you so much! I apologize for not replying sooner and did not get you example of the recipes. I have a mod created already that adds the 3 recipes to the game. Unfortunately I'm not on my personal computer at the moment to grab the code. I'll pop back in hopefully tonight and drop it here.

Link to comment
Share on other sites

19 hours ago, Syphon583 said:

@BFT2020 Thank you so much! I apologize for not replying sooner and did not get you example of the recipes. I have a mod created already that adds the 3 recipes to the game. Unfortunately I'm not on my personal computer at the moment to grab the code. I'll pop back in hopefully tonight and drop it here.

 

No worries

Link to comment
Share on other sites

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
×
×
  • Create New...