Announcement

Collapse
No announcement yet.

Alpha 18 mod help with adding recipe if schematic is read

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Info Alpha 18 mod help with adding recipe if schematic is read

    Hello All!

    I'm trying to make a recipe be unlocked if the Auger schematic is read but there are no perks in the progression.xml file for schematics. Just books. If I wanted to make a recipe unlock from reading the auger schematic how would I do that?

    I am able to add a recipe that unlocks with the advancedEngeneeringPark.

    #2
    Recipes are cvars.

    So you'd have something like this.

    Code:
    <item name="meleeToolAugerSchematic">
    	<property name="Extends" value="schematicMaster"/>
    	<property name="CreativeMode" value="Player"/>
    	<property name="CustomIcon" value="meleeToolAuger"/>
    	<property name="Unlocks" value="meleeToolAuger"/>
    	<effect_group tiered="false">
    		<triggered_effect trigger="onSelfPrimaryActionEnd" action="ModifyCVar" cvar="meleeToolAuger" operation="set" value="1"/>
    		<triggered_effect trigger="onSelfPrimaryActionEnd" action="GiveExp" exp="50"/>
    	</effect_group>
    </item>
    See the ModifyCvar bit? The cvar name is your recipe (meleeToolAuger in this instance) and setting it to 1 means "You have learned this recipe."

    Setting it to 0 would remove it from the player.

    Comment


      #3
      Man, I meant to reply to this earlier, but forgot. Khaine explained how it works.

      I just did something similar, so if you want an example of the xpath for it, here it is.

      Code:
      <append xpath="/items/item[@name='gunMR10Schematic']/effect_group">
      	
      		<triggered_effect trigger="onSelfPrimaryActionEnd" action="ModifyCVar" cvar="gunLAR" operation="set" value="1"/>
      	
      </append>
      So just change the schematic name and add you recipe instead of gunLAR, and you should be good.

      Comment


        #4
        Thanks guys for the reply! Really, cool. I'm planning on writing an app to easily create mods for 7d2d. If that already exists and is good let me know. Otherwise, when that is complete I'll shoot you a link. This game is really cool and the mod I'm writing will add all parts (e.g. Motor Tool Parts, Shotgun Parts) as craftable for alpha 18.3. I really want it to be balanced and a good way to do that is tie it to schematics and perks through leveling.

        Comment

        Working...
        X