Announcement

Collapse
No announcement yet.

Recipes learning from Books

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

    Recipes learning from Books

    So i know i can unlock Recipes with reading a book thats fine, but it seems its not possible to block reading the book if as example Intellect is not high enough.

    I plan to move all Recipes to Books again but at same i dont want that Players can as example learn how to craft Steel as long as they dont know how to make Iron and as long as Intellect is lower as value X .

    Would be great if someone can give me a hint how i can check this Values.

    #2
    <property class="Action0">
    <requirement name="CVarCompare" cvar="mayicgunARX160" operation="Equals" value="0"/>
    </property>
    <effect_group tiered="false">
    <triggered_effect trigger="onSelfPrimaryActionEnd" action="ModifyCVar" cvar="mayicgunARX160" operation="set" value="1"/>
    </effect_group>

    Find the CVar linked to the perk/skill you want (or create it) and use req to check if the user meets the requirement value or higher to unlock it

    Also, probably not the place for this posting. I believe you are looking for https://7daystodie.com/forums/forumd...n-and-Requests for questions about modding.

    Goodluck on your project!

    Comment


      #3
      Originally posted by Mayic View Post
      <property class="Action0">
      <requirement name="CVarCompare" cvar="mayicgunARX160" operation="Equals" value="0"/>
      </property>
      <effect_group tiered="false">
      <triggered_effect trigger="onSelfPrimaryActionEnd" action="ModifyCVar" cvar="mayicgunARX160" operation="set" value="1"/>
      </effect_group>

      Find the CVar linked to the perk/skill you want (or create it) and use req to check if the user meets the requirement value or higher to unlock it

      Also, probably not the place for this posting. I believe you are looking for https://7daystodie.com/forums/forumd...n-and-Requests for questions about modding.

      Goodluck on your project!
      Thanks seems i used wrong Forum sorry for that

      And thanks for your Answer , already tried that and it works for skills but if i use as example attIntellect as cvar its ignored cause it allow me to read the book with intellect 1 2 3 or whatever and ignore the number i set.

      Comment


        #4
        Easiest way to do what you want is to turn recipes into seperate perks, and then limit those perks based on the attribute you want.

        So.... example. This is my minibike perk.

        Code:
        	<perk name="perkMinibike" parent="skillBooks" min_level="0" max_level="1" base_skill_point_cost="1" cost_multiplier_per_level="1" name_key="perkMinibikeName" desc_key="perkMinibikeDesc" icon="ui_game_symbol_service">
        		<level_requirements level="1"><requirement name="PlayerLevel" target="self" operation="GTE" value="25" desc_base="reqPlayerLevel25"/><requirement name="ProgressionLevel" progression_name="attClassMechanic" operation="LT" value="1" desc_key="reqMechanicLevelNot01"/></level_requirements>
        
        		<effect_group>
        			<passive_effect name="RecipeTagUnlocked" operation="base_set" level="1" value="1" tags="vehicleMinibikeChassis,vehicleMinibikeHandlebars,vehicleMinibikePlaceable"/>
        			<effect_description level="1" desc_key="perkMinibikeRank1Desc"/>
        		</effect_group>
        	</perk>
        And then this is my book.

        Code:
        <item name="DFminibikeBook">
        	<property name="Extends" value="unlockBookMaster"/>
        	<property name="CreativeMode" value="Player"/>
        	<property name="CustomIcon" value="minibikesForDumb♥♥♥♥s" />
        	<property name="DescriptionKey" value="DFminibikeBookDesc"/>
            <property class="Action0">
        		<property name="Class" value="GainSkill"/>
        			<property name="Skills_to_gain" value="perkMinibike"/>
        		</property>
        	<property name="Stacknumber" value="1"/>
        	<property name="EconomicValue" value="500"/>
        </item>
        Downside is the read shortcut doesn't work for that book. You have to place it on the toolbar and left click. It will also unlock the perk if you don't meet the requirements, but it will disable the perk UNTIL those requirements are met.

        Comment


          #5
          Originally posted by KhaineGB View Post
          Easiest way to do what you want is to turn recipes into seperate perks, and then limit those perks based on the attribute you want.

          So.... example. This is my minibike perk.

          Code:
          	<perk name="perkMinibike" parent="skillBooks" min_level="0" max_level="1" base_skill_point_cost="1" cost_multiplier_per_level="1" name_key="perkMinibikeName" desc_key="perkMinibikeDesc" icon="ui_game_symbol_service">
          		<level_requirements level="1"><requirement name="PlayerLevel" target="self" operation="GTE" value="25" desc_base="reqPlayerLevel25"/><requirement name="ProgressionLevel" progression_name="attClassMechanic" operation="LT" value="1" desc_key="reqMechanicLevelNot01"/></level_requirements>
          
          		<effect_group>
          			<passive_effect name="RecipeTagUnlocked" operation="base_set" level="1" value="1" tags="vehicleMinibikeChassis,vehicleMinibikeHandlebars,vehicleMinibikePlaceable"/>
          			<effect_description level="1" desc_key="perkMinibikeRank1Desc"/>
          		</effect_group>
          	</perk>
          And then this is my book.

          Code:
          <item name="DFminibikeBook">
          	<property name="Extends" value="unlockBookMaster"/>
          	<property name="CreativeMode" value="Player"/>
          	<property name="CustomIcon" value="minibikesForDumb♥♥♥♥s" />
          	<property name="DescriptionKey" value="DFminibikeBookDesc"/>
              <property class="Action0">
          		<property name="Class" value="GainSkill"/>
          			<property name="Skills_to_gain" value="perkMinibike"/>
          		</property>
          	<property name="Stacknumber" value="1"/>
          	<property name="EconomicValue" value="500"/>
          </item>
          Downside is the read shortcut doesn't work for that book. You have to place it on the toolbar and left click. It will also unlock the perk if you don't meet the requirements, but it will disable the perk UNTIL those requirements are met.

          Found other way. Works also like this . Reading works like a magazine or other book and you cant read the book until you have the needed Requirments.
          Code:
          <item name="Basic Forging">
          	<property name="Extends" value="unlockBookMaster"/>
          	<property name="CreativeMode" value="Player"/>
          	<property name="CustomIcon" value="beerSchematic"/>
          	<property class="Action0">
          	<requirement name="ProgressionLevel" progression_name="attIntellect" operation="GTE" value="2"/>
          	<requirement name="ProgressionLevel" progression_name="perkHammerForge" operation="GTE" value="1"/>
          		<property name="Consume" value="true"/>-->
          	<!--</property>
          	<effect_group tiered="false">
          		<triggered_effect trigger="onSelfPrimaryActionEnd" action="ModifyCVar" cvar="forge" operation="set" value="1"/>
          		<triggered_effect trigger="onSelfPrimaryActionEnd" action="ModifyCVar" cvar="toolAnvil" operation="set" value="1"/>
          	</effect_group>
          </item>

          Comment

          Working...
          X