00Prescott Posted November 29, 2020 Share Posted November 29, 2020 I'm completely at a loss on this one. If the tag that is used is "perkLivingOffTheLandCrafting" which is shown in the recipe: <recipe name="farmPlotBlockPlayer" count="1" tags="perkLivingOffTheLandCrafting" craft_time="20"> <ingredient name="resourceWood" count="4"/> <ingredient name="foodRottingFlesh" count="10"/> <ingredient name="resourcePotassiumNitratePowder" count="25"/> <ingredient name="resourceClayLump" count="100"/> <effect_group> <passive_effect name="CraftingIngredientCount" level="1,2,3" operation="perc_add" value="-.3,-.5,-.5" tags="foodRottingFlesh,resourcePotassiumNitratePowder,resourceClayLump"/> </effect_group> </recipe> Then wouldn't all I need to do is adjust the CraftingIngredientCount for levels 4 and 5 (assuming I wanted to decrease the ingredient count)? I've attempted setting the xpath, appending the xpath, removing and then adding a new recipe . I can't get anything to work changing levels 4 and 5 (they default to 0 for perc_add). I've scoured these forums, watched videos, downloaded other modlets, etc. and I have not run across anything that shows me how much a simple dum dum mistake I'm making here. Please help this dodo out. Thank you. Link to comment Share on other sites More sharing options...
Gouki Posted November 29, 2020 Share Posted November 29, 2020 25 minutes ago, 00Prescott said: I'm completely at a loss on this one. If the tag that is used is "perkLivingOffTheLandCrafting" which is shown in the recipe: <recipe name="farmPlotBlockPlayer" count="1" tags="perkLivingOffTheLandCrafting" craft_time="20"> <ingredient name="resourceWood" count="4"/> <ingredient name="foodRottingFlesh" count="10"/> <ingredient name="resourcePotassiumNitratePowder" count="25"/> <ingredient name="resourceClayLump" count="100"/> <effect_group> <passive_effect name="CraftingIngredientCount" level="1,2,3" operation="perc_add" value="-.3,-.5,-.5" tags="foodRottingFlesh,resourcePotassiumNitratePowder,resourceClayLump"/> </effect_group> </recipe> Then wouldn't all I need to do is adjust the CraftingIngredientCount for levels 4 and 5 (assuming I wanted to decrease the ingredient count)? I've attempted setting the xpath, appending the xpath, removing and then adding a new recipe . I can't get anything to work changing levels 4 and 5 (they default to 0 for perc_add). I've scoured these forums, watched videos, downloaded other modlets, etc. and I have not run across anything that shows me how much a simple dum dum mistake I'm making here. Please help this dodo out. Thank you. Hi 00Prescott I understand that perkLivingOffTheLand is only 3 levels, so it does not make any changes. Or did you add those levels again? Regards Link to comment Share on other sites More sharing options...
00Prescott Posted November 29, 2020 Author Share Posted November 29, 2020 Yes, I'm sorry for not posting the progression portion of this. Link to comment Share on other sites More sharing options...
stample Posted November 30, 2020 Share Posted November 30, 2020 Without knowing what you tried, its hard to say what you did wrong. I would expect this entry to work to reduce by 70% and 90% for levels 4 and 5. <passive_effect name="CraftingIngredientCount" level="1,2,3,4,5" operation="perc_add" value="-.3,-.5,-.5,-.7,-.9" tags="foodRottingFlesh,resourcePotassiumNitratePowder,resourceClayLump"/> You'll need to update both the value attribute's values and the level attribute's value, so 2 xpath statements. When you get stuck on xpath, I recommend hard-coding your changes directly into the config xml, rather than a mod with xpath statements. Then you can separate if its what you're doing, vs the xpath statements themselves being wrong. Link to comment Share on other sites More sharing options...
00Prescott Posted November 30, 2020 Author Share Posted November 30, 2020 I often take for granted how much information might be excluded. I started editing the XML directly so I know that aspect should work. I think the hang up is in the syntax writing it as a modlet. Im not at my computer right now but would it be a set xpath=recipes/recipe/[@name=farmPlot]/effect_group/passive_effect[@name='CraftingIngerdients'] and [@level='4'] .... and it's about here where I get confused... how to I write it such that its adding -.7 and -.9 to levels 4 and 5? If anyone could eli5, I would be grateful and I apologize for not being more forthcoming with the details and for my general ignorance. Thank you. Link to comment Share on other sites More sharing options...
00Prescott Posted November 30, 2020 Author Share Posted November 30, 2020 progression.xml <configs> <setattribute name="max_level" xpath="/progression/perks/perk[@name='perkLivingOffTheLand']">5</setattribute> <set xpath="/progression/perks/perk[@name='perkLivingOffTheLand']/effect_group"> <passive_effect name="CraftingTier" operation="base_set" level="0,5" value="0,5" tags="perkLivingOffTheLandCrafting"/><!-- fake crafting perk that is used to scale resources --> <passive_effect name="HarvestCount" operation="perc_add" level="1,2,3,4,5" value="1,1,2,3,4" tags="cropHarvest,wildCropsHarvest"/> <passive_effect name="RecipeTagUnlocked" operation="base_set" level="1,5" value="1" tags="plantedAloe1,plantedChrysanthemum1,plantedGoldenrod1,plantedYucca1"/> <passive_effect name="RecipeTagUnlocked" operation="base_set" level="2,5" value="1" tags="plantedBlueberry1,plantedCoffee1,plantedCorn1,plantedCotton1,plantedMushroom1,plantedPotato1,plantedHop1,plantedPumpkin1,plantedGraceCorn1"/> <effect_description level="1" desc_key="perkLivingOffTheLandRank1Desc" long_desc_key="Harvest 2 items from wild or planted crops. Craft seeds for flowers and decorative plants like goldenrod, chrysanthemum, aloe, and yucca.\nFarm plots cost 30% less to craft."/> <effect_description level="2" desc_key="perkLivingOffTheLandRank2Desc" long_desc_key="You can craft seeds for berries and vegetables.\nFarm plots cost 50% less to craft."/> <effect_description level="3" desc_key="perkLivingOffTheLandRank3Desc" long_desc_key="Harvest 3 items from wild or planted crops."/> <effect_description level="4" desc_key="perkLivingOffTheLandRank4Desc" long_desc_key="Harvest 4 items from wild or planted crops.\nFarm plots cost 70% less to craft."/> <effect_description level="5" desc_key="perkLivingOffTheLandRank5Desc" long_desc_key="Harvest 5 items from wild or planted crops.\nFarm plots cost 85% less to craft."/> </set> </configs> Localization.txt Key,File,Type,UsedInMainMenu,NoTranslate,english perkLivingOffTheLandRank1Desc,progression,perk,,,Gardener perkLivingOffTheLandRank2Desc,progression,perk,,,Grower perkLivingOffTheLandRank3Desc,progression,perk,,,Farmer perkLivingOffTheLandRank4Desc,progression,perk,,,Agriculturist perkLivingOffTheLandRank5Desc,progression,perk,,,Horticulturist recipe.xml <configs> <set xpath="/recipes/recipe[@name='farmPlotBlockPlayer']"> <ingredient name="resourceWood" count="4"/> <ingredient name="foodRottingFlesh" count="10"/> <ingredient name="resourcePotassiumNitratePowder" count="25"/> <ingredient name="resourceClayLump" count="100"/> <effect_group> <passive_effect name="CraftingIngredientCount" level="1,2,3,4,5" operation="perc_add" value="-.3,-.5,-.5,-.7,-.9" tags="foodRottingFlesh,resourcePotassiumNitratePowder,resourceClayLump"/> </effect_group> </set> </configs> Which I did this stupid recipe 500,000 times yesterday and it wouldn't take now all of the sudden it works. I am absolutely baffled. So, nevermind everyone. I really appreciate everyone taking a moment to look in on this. I'll post this modlet up on Nexus if anyone wants it (or you can CnP from here). Thanks! Link to comment Share on other sites More sharing options...
stample Posted November 30, 2020 Share Posted November 30, 2020 Ah, gotcha. Here, this does it. <configs> <set xpath="/recipes/recipe[@name='farmPlotBlockPlayer']/effect_group/passive_effect/@level">1,2,3,4,5</set> <set xpath="/recipes/recipe[@name='farmPlotBlockPlayer']/effect_group/passive_effect/@value">-.3,-.5,-.5,-.7,-.9</set> </configs> Edit: Ha, beat me by a minute! Your way works too, but if they change the recipe, yours will overwrite it. The above is more selective and less prone to breakage. Certainly either way works, though. Link to comment Share on other sites More sharing options...
00Prescott Posted November 30, 2020 Author Share Posted November 30, 2020 Maybe there was a cache issue and that's why mine wasnt working yesterday *shrug*... but I really like your approach. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.