Jump to content

Alpha 18.3 recipes mod help


Guest wrathmaniac

Recommended Posts

Guest wrathmaniac

Hello all!

 

I'm trying to create a mod to add new recipes for various uncraftable parts such as "Motor tool parts", and "Shotgun parts". I can add the recipes just fine but I want to make it more balanced and immersive. I'm doing that by making the recipe learn-able and locked behind perks. The problem is there should be a way to set that in the recipes xml like so:

 

 

<recipe name="meleeToolChainsawParts" count="1" craft_time="15" craft_area="workbench" tags="perkAdvancedEngineering,learnable,workbenchCrafting">

<ingredient name="resourceForgedSteel" count="10"/>

<ingredient name="resourceMechanicalParts" count="5"/>

<ingredient name="resourceSpring" count="2"/>

<effect_group>

HERE I TRY TO SET INFO FOR LOCKING--><passive_effect name="RecipeTagUnlocked" tags="meleeToolChainsawParts"/>

<triggered_effect trigger="onSelfPrimaryActionEnd" action="ModifyCVar" cvar="meleeToolChainsawParts" operation="set" value="1">

</triggered_effect>

<requirement name="ProgressionLevel" progression_name="perkAdvancedEngineering" operation="GTE" value="1"/>

</effect_group>

</recipe>

 

 

I have found a way to set the recipe to unlock via the progressions.xml file. The problem is that it does not show up in the ui in game. Does anyone know how to do that? What Am I missing in the recipes.xml to make that work?

Link to comment
Share on other sites

Guest wrathmaniac
You are not closing the recipe tag so it's broken XML.

 

There is no problem with the xml. I actually discovered how to do it. You need to modify the items.xml file as well.

 

So there are three parts:

 

The items.xml:

 

<item name="meleeToolChainsawParts">

<property name="Extends" value="gunAk47Parts"/>

<property name="Material" value="MMotorToolParts"/>

<property name="EconomicValue" value="200"/>

ADD THIS LINE HERE----><property name="UnlockedBy" value="perkAdvancedEngineering"/>

</item>

 

The recipe.xml:

 

<recipe name="meleeToolChainsawParts" count="1" craft_time="15" craft_area="workbench" tags="perkAdvancedEngineering,learnable,workbenchCrafting">

<ingredient name="resourceForgedSteel" count="10"/>

<ingredient name="resourceMechanicalParts" count="5"/>

<ingredient name="resourceSpring" count="2"/>

</recipe>

 

The progressions.xml:

 

<perk name="perkAdvancedEngineering" parent="skillCraftsmanship" name_key="perkAdvancedEngineeringName" desc_key="perkAdvancedEngineeringDesc" icon="ui_game_symbol_workbench">

<level_requirements level="1"><requirement name="ProgressionLevel" progression_name="attIntellect" operation="GTE" value="1" desc_key="reqIntellectLevel01"/></level_requirements>

<level_requirements level="2"><requirement name="ProgressionLevel" progression_name="attIntellect" operation="GTE" value="4" desc_key="reqIntellectLevel04"/></level_requirements>

<level_requirements level="3"><requirement name="ProgressionLevel" progression_name="attIntellect" operation="GTE" value="6" desc_key="reqIntellectLevel06"/></level_requirements>

<level_requirements level="4"><requirement name="ProgressionLevel" progression_name="attIntellect" operation="GTE" value="8" desc_key="reqIntellectLevel08"/></level_requirements>

<level_requirements level="5"><requirement name="ProgressionLevel" progression_name="attIntellect" operation="GTE" value="10" desc_key="reqIntellectLevel10"/></level_requirements>

 

<effect_group>

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

 

<!-- Engineer use x% less material on all recipes in the forge... by adding it to non engineers T3 10% .9, T4 15% .85, T5 20% .8 -->

HERE I ADD THE RECIPE---><passive_effect name="RecipeTagUnlocked" operation="base_set" level="1,5" value="1" tags="meleeToolChainsawParts,forge"/>

<passive_effect name="CraftingTime" operation="perc_add" level="1,5" value="-0.2" tags="perkAdvancedEngineering"/>

<passive_effect name="RecipeTagUnlocked" operation="base_set" level="2,5" value="1" tags="workbench,tableSaw,cementMixer"/>

<passive_effect name="CraftingTime" operation="perc_add" level="2,5" value="-0.2" tags="workbenchCrafting,cementMixerCrafting,tableSawCrafting"/>

<passive_effect name="RecipeTagUnlocked" operation="base_set" level="3,5" value="1" tags="generatorbank,electricwirerelay,switch,ceilingLight01_player,industrialLight01_player,industrialLight02_player,armorMiningHelmet,spotlightPlayer,speaker,pressureplate,pressureplateLong,dartTrap,electrictimerrelay,motionsensor,tripwirepost,electricfencepost,bladeTrap"/>

<passive_effect name="ElectricalTrapXP" operation="base_set" level="3,4,5" value="0.2,0.35,0.5"/>

<passive_effect name="RecipeTagUnlocked" operation="base_set" level="4,5" value="1" tags="batterybank,shotgunTurret,gunToolNailgun,meleeToolAuger,meleeToolChainsaw,garageDoorMetal_v1Powered,garageDoorIndustrial_Powered,metalReinforcedWoodDrawBridgePowered,vaultHatch_v3_Powered,vaultDoor03_Powered"/>

<passive_effect name="RecipeTagUnlocked" operation="base_set" level="5" value="1" tags="toolForgeCrucible,autoTurret"/>

 

<effect_description level="1" desc_key="perkAdvancedEngineeringRank1Desc" long_desc_key="perkAdvancedEngineeringRank1LongDesc"/>

<effect_description level="2" desc_key="perkAdvancedEngineeringRank2Desc" long_desc_key="perkAdvancedEngineeringRank2LongDesc"/>

<effect_description level="3" desc_key="perkAdvancedEngineeringRank3Desc" long_desc_key="perkAdvancedEngineeringRank3LongDesc"/>

<effect_description level="4" desc_key="perkAdvancedEngineeringRank4Desc" long_desc_key="perkAdvancedEngineeringRank4LongDesc"/>

<effect_description level="5" desc_key="perkAdvancedEngineeringRank5Desc" long_desc_key="perkAdvancedEngineeringRank5LongDesc"/>

</effect_group>

</perk>

Link to comment
Share on other sites

Guest wrathmaniac

The problem is the xml I try for the recipes. I'm not using the right cVar stuff in the effect tags. I would prefer to do that all in the recipes object if possible. If you could help with that I would really appreciate it.

 

I tried a few things with the Effect tag nested in the recipes tag that didn't work.

 

<effect_group>

HERE I TRY TO SET INFO FOR LOCKING--><passive_effect name="RecipeTagUnlocked" tags="meleeToolChainsawParts"/>

<triggered_effect trigger="onSelfPrimaryActionEnd" action="ModifyCVar" cvar="meleeToolChainsawParts" operation="set" value="1">

</triggered_effect>

<requirement name="ProgressionLevel" progression_name="perkAdvancedEngineering" operation="GTE" value="1"/>

</effect_group>

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...