Jump to content

Help a new modder out! Thanks!!


thatloopydude

Recommended Posts

My issue has been solved! Thank you to all that helped!!!!

 

 

 

I am adding new bullets to the game and wanting them to be unlocked via the sniper skill book tree, however the items won't unlock when the book is learned. The base ammo 50cal is unlocked by default and I can craft it. The 50capHP and 50calAP are locked. I can spawn the items in question via cm and use them in the gun. Just cant craft em. the Bundled version of all the versions are locked as well and are uncraftable.

Please help me out here... I've been at this for over 8 hours and I'm going to be bald before my genetics take part :miserable: :miserable: :miserable: :miserable: Link to paste.org

 

item.xml http://bit.ly/2ScMOKl

 

recipes.xml

<LoopyBarrett>
<append xpath="recipes">



<recipe name="Barrett M82" count="1" craft_area="workbench" tags="learnable,workbenchCrafting,perkDeadEye">
<ingredient name="gunHuntingRifleParts" count="8"/>
<ingredient name="resourceForgedSteel" count="26"/>
<ingredient name="resourceDuctTape" count="14"/>
<ingredient name="resourceScrapPolymers" count="32"/>
<ingredient name="resourceSpring" count="12"/>
<effect_group>
	<passive_effect name="CraftingIngredientCount" level="1,6" operation="perc_add" value="0,5" tags="gunHuntingRifleParts,resourceForgedSteel,resourceDuctTape,resourceScrapPolymers,resourceSpring"/>
</effect_group>
</recipe>



<recipe name="50cal" count="1" craft_area="workbench" tags="workbenchCrafting">
<ingredient name="resourceBulletTip" count="1"/>
<ingredient name="resourceGunPowder" count="5"/>
<ingredient name="resourceBulletCasing" count="1"/>
</recipe>

<recipe name="Bundle50cal" count="1" craft_time="240" craft_area="workbench" tags="learnable,workbenchCrafting">
<ingredient name="resourceBulletTip" count="80"/>
<ingredient name="resourceGunPowder" count="400"/>
<ingredient name="resourceBulletCasing" count="80"/>
</recipe>


<recipe name="50calHP" count="1" craft_area="workbench" tags="learnable,workbenchCrafting">
<ingredient name="resourceBulletTip" count="1"/>
<ingredient name="resourceGunPowder" count="7"/>
<ingredient name="resourceBulletCasing" count="1"/>
</recipe>

<recipe name="Bundle50calHP" count="1" craft_time="240" craft_area="workbench" tags="learnable,workbenchCrafting">
<ingredient name="resourceBulletTip" count="80"/>
<ingredient name="resourceGunPowder" count="560"/>
<ingredient name="resourceBulletCasing" count="80"/>
</recipe>

<recipe name="50calAP" count="1" craft_area="workbench" tags="learnable,workbenchCrafting">
<ingredient name="resourceBulletTip" count="1"/>
<ingredient name="resourceGunPowder" count="9"/>
<ingredient name="resourceBulletCasing" count="1"/>
</recipe>

<recipe name="Bundle50calAP" count="1" craft_time="240" craft_area="workbench" tags="learnable,workbenchCrafting">
<ingredient name="resourceBulletTip" count="80"/>
<ingredient name="resourceGunPowder" count="720"/>
<ingredient name="resourceBulletCasing" count="80"/>
</recipe>



</append>
</LoopyBarrett>

 

progression.xml

<LoopyBarrett>
<append 
   xpath="/progression/perks/perk[@name='perkSniperAPAmmo']/effect_group">
       <passive_effect name="RecipeTagUnlocked" operation="perc_add" level="1" value="1" tags="50calAP"/>
</append>

<append 
   xpath="/progression/perks/perk[@name='perkSniperHPAmmo']/effect_group">
       <passive_effect name="RecipeTagUnlocked" operation="perc_add" level="1" value="1" tags="50calHP"/>
</append>

<append 
   xpath="/progression/perks/perk[@name='perkSniperComplete']/effect_group">
       <passive_effect name="RecipeTagUnlocked" operation="perc_add" level="1" value="1" tags="Bundle50cal,Bundle50calHP,Bundle50calAP"/>
</append>

</LoopyBarrett>

 

Edit; Updating code to main post

Link to comment
Share on other sites

Check progression.xml. Needs something there as well.

 

Like, for the .44 AP:

 

<item name="ammo44MagnumBulletAP">
<property name="Extends" value="ammo44MagnumBulletBall"/>
<property name="DisplayType" value="ammoBulletAP"/>
<property name="EconomicValue" value="15"/>
<property name="DescriptionKey" value="ammoAPGroupDesc"/>
<property name="UnlockedBy" value="perkEnforcerAPAmmo"/>
<effect_group name="ammo44MagnumBulletAP" tiered="false">
	<passive_effect name="EntityDamage" operation="base_set" value="80"/>
	<passive_effect name="BlockDamage" operation="base_set" value="14"/>
	<passive_effect name="TargetArmor" operation="perc_add" value="-.2"/>
	<display_value name="dTargetArmor" value="-.2"/>
	<passive_effect name="EntityPenetrationCount" operation="base_set" value="1"/>
	<display_value name="dTargetPenetration" value="1"/>
	<passive_effect name="DegradationPerUse" operation="perc_add" value=".3" tags="perkGunslinger"/>
	<display_value name="dDegradationPerUse" value=".3"/>
</effect_group>
</item>

 

and in progression.xml, you have this:

 

<perk name="perkEnforcerAPAmmo" parent="skillEnforcer" max_level="1" base_skill_point_cost="0" name_key="bookEnforcerAPAmmo" desc_key="perkEnforcerAPAmmoDesc" long_desc_key="perkEnforcerAPAmmoLongDesc">
	<effect_group>
		<passive_effect name="RecipeTagUnlocked" operation="base_set" level="1" value="1" tags="ammo44MagnumBulletAP"/>
	</effect_group>
</perk>

Link to comment
Share on other sites

In an advanced post, look for the # to post code.

 

One thing I can see that looks out of place is the

 

<passive_effect name="RecipeTagUnlocked" operation="perc_add" level="1" value="1" tags="50calAP"/>

 

should look like this I think:

 

<passive_effect name="RecipeTagUnlocked" operation="base_set" level="1" value="1" tags="50calAP"/>

Link to comment
Share on other sites

Actually, now that I think about it, are you just using the perk to unlock ammo? Not add any effects?

 

If so, this is a book I have in my Nuka Colas mod to unlock their crafting recipe:

 

<item name="bookNukaRecipes">
		<property name="DescriptionKey" value="bookNukaRecipesDesc"/>
		<property name="CreativeMode" value="Player"/>
		<property name="HoldType" value="21"/>
		<property name="Meshfile" value="Items/Misc/bookPrefab"/>
		<property name="DropMeshfile" value="Items/Misc/sack_droppedPrefab"/>
		<property name="Material" value="Mpaper"/>
		<property name="CustomIcon" value="schematicMaster"/> <property name="CustomIconTint" value="D42F2F"/>	
		<property name="AltItemTypeIcon" value="book_read"/>
		<property name="Stacknumber" value="50"/> 
		<property name="EconomicValue" value="10000"/>
		<property name="SellableToTrader" value="true"/>
		<property name="FuelValue" value="4"/>
		<property name="Weight" value="40"/>
		<property name="Group" value="Books"/>
		<property name="Unlocks" value="resourceNukaBaseIngredients,drinkNukaCola,drinkNukaCherry,drinkNukaQuartz,drinkNukaQuantum"/>
		<property class="Action0">
			<property name="Class" value="Eat"/> 
			<property name="Consume" value="true"/> 
			<property name="Delay" value="1.0"/>
			<property name="Use_time" value="..."/>
			<property name="ActionExpBonusMultiplier" value="0"/> 
			<property name="Sound_start" value="recipe_unlocked"/>
		</property>

		<effect_group tiered="false">
			<triggered_effect trigger="onSelfPrimaryActionEnd" action="GiveSkillExp" target="self" skill="attIntellect" experience="1000"/>
			<triggered_effect trigger="onSelfPrimaryActionEnd" action="ModifyCVar" cvar="resourceNukaBaseIngredients" operation="set" value="1"/>
			<triggered_effect trigger="onSelfPrimaryActionEnd" action="ModifyCVar" cvar="drinkNukaCola" operation="set" value="1"/>
			<triggered_effect trigger="onSelfPrimaryActionEnd" action="ModifyCVar" cvar="drinkNukaCherry" operation="set" value="1"/>
			<triggered_effect trigger="onSelfPrimaryActionEnd" action="ModifyCVar" cvar="drinkNukaQuartz" operation="set" value="1"/>
			<triggered_effect trigger="onSelfPrimaryActionEnd" action="ModifyCVar" cvar="drinkNukaQuantum" operation="set" value="1"/>
			<triggered_effect trigger="onSelfPrimaryActionEnd" action="ShowToolbeltMessage" target="self" message="Recipe Unlocked: Nuka Base Ingredients"/>
			<triggered_effect trigger="onSelfPrimaryActionEnd" action="ShowToolbeltMessage" target="self" message="Recipe Unlocked: Nuka Cola"/>
			<triggered_effect trigger="onSelfPrimaryActionEnd" action="ShowToolbeltMessage" target="self" message="Recipe Unlocked: Nuka Cherry"/>
			<triggered_effect trigger="onSelfPrimaryActionEnd" action="ShowToolbeltMessage" target="self" message="Recipe Unlocked: Nuka Quartz"/>
			<triggered_effect trigger="onSelfPrimaryActionEnd" action="ShowToolbeltMessage" target="self" message="Recipe Unlocked: Nuka Quantum"/>
		</effect_group>
	</item>

 

Could try replacing the cvars to your ammo, and you'd need to add

tags="learnable"

to your recipes. Would that accomplish what you're wanting? Just unlocking recipes for ammo with a book? Or is there more to it? The perk method is how it looks like TFP handled it, but the book should do just fine for this. Should save you from having to mess with progression.

Link to comment
Share on other sites

Okay so here is the updated progression.xml I am still unable to craft the hp, ap, and bulk ammos

 

<LoopyBarrett>
<append xpath="progression">

<perk name="perkSniperAPAmmo" parent="skillSniper" max_level="1" base_skill_point_cost="0" name_key="bookSniperAPAmmo" desc_key="perkSniperAPAmmoDesc" long_desc_key="perkSniperAPAmmoLongDesc">
	<effect_group>
		<passive_effect name="RecipeTagUnlocked" operation="base_set" level="1" value="1" tags="50calAP"/>
	</effect_group>
</perk>
<perk name="perkSniperHPAmmo" parent="skillSniper" max_level="1" base_skill_point_cost="0" name_key="bookSniperHPAmmo" desc_key="perkSniperHPAmmoDesc" long_desc_key="perkSniperHPAmmoLongDesc">
	<effect_group>
		<passive_effect name="RecipeTagUnlocked" operation="base_set" level="1" value="1" tags="50calHP"/>
	</effect_group>
</perk>
<perk name="perkSniperComplete" parent="skillSniper" max_level="1" base_skill_point_cost="0" name_key="perkSniperCompleteName" desc_key="perkSniperCompleteDesc" long_desc_key="perkSniperCompleteLongDesc">
	<effect_group>
		<passive_effect name="RecipeTagUnlocked" operation="base_set" level="1" value="1" tags="Bundle50cal,Bundle50calHP,Bundle50calAP"/>
	</effect_group>
</perk>


</append>
</LoopyBarrett>

Link to comment
Share on other sites

Wait, I think I see it. Derp. Been a long night. Lol.

 

Are you just wanting to add your ammo to unlock with the vanilla bookSniperAPAmmo/bookSniperHPAmmo items?

 

If so, you'll need to be more specific in your xml. Like:

 

<append xpath="/item/item[@name='bookSniperAPAmmo']/property[@name='Unlocks']/@value">,50calAP,Bundle50calAP</append>

<append xpath="/item/item[@name='bookSniperHPAmmo']/property[@name='Unlocks']/@value">,50calHP,Bundle50calHP</append>

 

I *think* that should work for the items.xml part of it.

Link to comment
Share on other sites

And for the progression side, something like:

 

<append xpath="/progression/perks/perk[@name='perkSniperAPAmmo']/effect_group">
<passive_effect name="RecipeTagUnlocked" operation="perc_add" level="1" value="1" tags="50calAP"/>
</append>

 

<append xpath="/progression/perks/perk[@name='perkSniperHPAmmo']/effect_group">
<passive_effect name="RecipeTagUnlocked" operation="perc_add" level="1" value="1" tags="50calHP"/>
</append>

 

<append xpath="/progression/perks/perk[@name='perkSniperComplete']/effect_group">
<passive_effect name="RecipeTagUnlocked" operation="perc_add" level="1" value="1" tags="Bundle50cal,Bundle50calHP,Bundle50calAP"/>
</append>

 

Again, I think that should work. I'm not super great at xpath by any means, so there might be some mistakes.

Link to comment
Share on other sites

So in my item.xml I replace this code

<item name="bookSniperAPAmmo">
<property name="Extends" value="bookSniperDamage"/>
<property name="DescriptionKey" value="perkSniperAPAmmoLongDesc"/>
<property name="Unlocks" value="perkSniperAPAmmo,50calAP,Bundle50calAP"/>
<effect_group tiered="false">
	<triggered_effect trigger="onSelfPrimaryActionEnd" action="SetProgressionLevel" progression_name="perkSniperAPAmmo" level="-1"/>
	<triggered_effect trigger="onSelfPrimaryActionEnd" action="GiveExp" exp="50"/>
	<triggered_effect trigger="onSelfPrimaryActionEnd" action="SetProgressionLevel" progression_name="perkSniperComplete" level="-1">
		<requirement name="PerksUnlocked" skill_name="skillSniper" operation="GTE" value="7"/></triggered_effect>
	<triggered_effect trigger="onSelfPrimaryActionEnd" action="PlaySound" sound="read_skillbook_final" play_in_head="true">
		<requirement name="PerksUnlocked" skill_name="skillSniper" operation="GTE" value="7"/></triggered_effect>
</effect_group>
</item>



<item name="bookSniperHPAmmo">
<property name="Extends" value="bookSniperDamage"/>
<property name="DescriptionKey" value="perkSniperHPAmmoLongDesc"/>
<property name="Unlocks" value="perkSniperHPAmmo,50calHP,Bundle50calHP"/>
<effect_group tiered="false">
	<triggered_effect trigger="onSelfPrimaryActionEnd" action="SetProgressionLevel" progression_name="perkSniperHPAmmo" level="-1"/>
	<triggered_effect trigger="onSelfPrimaryActionEnd" action="GiveExp" exp="50"/>
	<triggered_effect trigger="onSelfPrimaryActionEnd" action="SetProgressionLevel" progression_name="perkSniperComplete" level="-1">
		<requirement name="PerksUnlocked" skill_name="skillSniper" operation="GTE" value="7"/></triggered_effect>
	<triggered_effect trigger="onSelfPrimaryActionEnd" action="PlaySound" sound="read_skillbook_final" play_in_head="true">
		<requirement name="PerksUnlocked" skill_name="skillSniper" operation="GTE" value="7"/></triggered_effect>
</effect_group>
</item>

 

with the code you posted above? with the extra appends? Sorry I am 100% unversed in modding and this is my first time attempting something like this

Link to comment
Share on other sites

Okay, so I after editing the two xml files I now get a yellow text "WRN XML patch for "items.xml" from mod "Loopy's Barrett M82" did not apply: <append xpath="/item/item[@name=bookSniperAPAmmo]/property[@name=Unlocks]/@value" for the ap and hp append

 

Items.xml http://bit.ly/2ScMOKl

 

Progression

<LoopyBarrett>
<append 
   xpath="/progression/perks/perk[@name='perkSniperAPAmmo']/effect_group">
       <passive_effect name="RecipeTagUnlocked" operation="perc_add" level="1" value="1" tags="50calAP"/>
</append>

<append 
   xpath="/progression/perks/perk[@name='perkSniperHPAmmo']/effect_group">
       <passive_effect name="RecipeTagUnlocked" operation="perc_add" level="1" value="1" tags="50calHP"/>
</append>

<append 
   xpath="/progression/perks/perk[@name='perkSniperComplete']/effect_group">
       <passive_effect name="RecipeTagUnlocked" operation="perc_add" level="1" value="1" tags="Bundle50cal,Bundle50calHP,Bundle50calAP"/>
</append>

</LoopyBarrett>

 

Still unable to craft. Im prob doing something wrong :miserable::miserable:

 

 

Edit Yes i am just trying to add my hp, ap, and bulk ammos to the sniper book tree that unlocks the 7.62 counterparts

Link to comment
Share on other sites

I think that I've found it.

 

<append xpath="/item/item[@name=bookSniperAPAmmo]/property[@name=Unlocks]/@value">,50calAP,Bundle50calAP</append>

 

should be:

 

<append xpath="/items/item[@name=bookSniperAPAmmo]/property[@name=Unlocks]/@value">,50calAP,Bundle50calAP</append>

 

You forgot the 's' on items. It's looking for item.xml instead of items.xml. With that fixed, it should append the book and subsequently allow you to unlock the recipes. This might have been already mentioned, though the above post that looked like they were mentioning this didn't specifically mention the correction.

 

Oops. Didn't realize it got fixed already. Oh well.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...