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

Help needed, can this be done? RE: recipe multiple unlock requirements.

DiscipleOfBryan

New member
I'm planning to add a recipe (schematic) to the game and for the purpose of balance, I'm hoping to make it so that a player must meet all of the following requirements before they can craft the item in question:

  1. Level 5 in <Existing Perk A>
  2. Level 5 in <Existing Perk B>
  3. Obtain and read <Schematic created by Mod>


Is the above possible? If so, any assistance you can provide in pointing me where I need to look/make changes is appreciated, but I'm also quite happy to figure it out myself just armed with the knowledge that it's possible.

As a further question related to the mod I'm planning, what is the maximum amount of different ingredients a recipe/schematic can require in order to craft the item it provides?

 
Yes, that's doable. Look at painkillers.
Sorry but are you sure you understood what I'm after? From what I can see, painkillers can't even be crafted? (Forgive me if I'm missing it, still fresh at finding where everything is in the config files)

 
You can control when a crafting unlock is usable. This is one way to do it.
Okay, this was the approach I tried:

(Intended effect was that you would not be able to read the schematic without having Level 5 of Perks A & B)

Code:
<item name={REDACTED}>
<property name="Extends" value="schematicNoQualityRecipeMaster"/>
<property name="CreativeMode" value="Player"/>
<property name="CustomIcon" value={REDACTED}/>
<property name="Unlocks" value={REDACTED}/>
<effect_group tiered="false">
	<requirement name="ProgressionLevel" progression_name={REDACTED} operation="Equals" value="5"/>
	<requirement name="ProgressionLevel" progression_name={REDACTED} operation="Equals" value="5"/>
		<triggered_effect trigger="onSelfPrimaryActionEnd" action="ModifyCVar" cvar={REDACTED} operation="set" value="1"/>
		<triggered_effect trigger="onSelfPrimaryActionEnd" action="GiveExp" exp="50"/>
</effect_group>
</item>
My current character is not level 5 in both perks, but could use the schematic and can now craft the item. Now comes the part where I need a tad more direct assistance.

 
Did a quick search for ProgressionLevel, and found this under the ammo44MagnumBulletBall

Code:
<passive_effect name="EntityPenetrationCount" operation="base_set" value="1">
		<requirement name="ProgressionLevel" progression_name="perkEnforcerComplete" operation="Equals" value="1"/>
	</passive_effect>
Which looks like the requirement is put inside the effect, rather than the effect being after the requirement.

Edit: for a triggered_effect example, ammoArrowStone:

Code:
<triggered_effect trigger="onSelfAttackedOther" action="AddBuff" target="other" buff="buffInjuryCrippled01">
		<requirement name="!EntityTagCompare" tags="player"/>
		<requirement name="ProgressionLevel" progression_name="perkRangersCripplingShot" operation="Equals" value="1"/>
		<requirement name="HitLocation" body_parts="LeftUpperLeg,RightUpperLeg,LeftLowerLeg,RightLowerLeg"/>
	</triggered_effect>
 
You'd want something like this.

Code:
<level_requirements level="1">
<requirement name="ProgressionLevel" progression_name="perk1" operation="Equals" value="5" desc_key="yourdesckey"/>
<requirement name="ProgressionLevel" progression_name="perk2" operation="Equals" value="5" desc_key="yourdesckey"/>
<requirement name="CVarCompare" cvar="nameofrecipethatschematicunlocks" operation="Equals" value="1" desc_key="yourdesckey"/>
</level_requirements>
 
Back
Top