Noisy Pants Posted July 15, 2019 Share Posted July 15, 2019 I would like to know what line I need to type to remove an item from the game in a mod file so I won't have redundancies, I think it would start with "<remove property name=...". Anyone know? - - - Updated - - - here's my problem, i made a mod to get more out of my lead and now i have two bullet tip options which i don't want. <config> <append xpath="/recipes"> <recipe name="resourceBulletTip" count="100" craft_area="forge" craft_tool="toolAndDieSet" material_based="true" tags="learnable"> <ingredient name="unit_lead" count="1"/> <ingredient name="unit_clay" count="1"/> </recipe> </append> </config> Link to comment Share on other sites More sharing options...
Tin Posted July 15, 2019 Share Posted July 15, 2019 I would like to know what line I need to type to remove an item from the game in a mod file so I won't have redundancies, I think it would start with "<remove property name=...". Anyone know? - - - Updated - - - here's my problem, i made a mod to get more out of my lead and now i have two bullet tip options which i don't want. <config> <append xpath="/recipes"> <recipe name="resourceBulletTip" count="100" craft_area="forge" craft_tool="toolAndDieSet" material_based="true" tags="learnable"> <ingredient name="unit_lead" count="1"/> <ingredient name="unit_clay" count="1"/> </recipe> </append> </config> I think maybe you want '<set xpath=' in place of append. That way you can adjust the item directly. like:<set xpath="/recipes/recipe[@name='foodBaconAndEggs']"> <ingredient name="foodEgg" count="2"/> <ingredient name="foodRawMeat" count="1"/> </set> That way it will just override the vanilla one and use your new one. example for item as well: <set xpath="/items/item[@name='foodBaconAndEggs']"> <property name="HoldType" value="31"/> <property name="DisplayType" value="food"/> <property name="Meshfile" value="Items/Misc/parcelPrefab"/> <property name="DropMeshfile" value="Items/Misc/sack_droppedPrefab"/> <property name="Material" value="Morganic"/> <property name="Stacknumber" value="50"/> <!-- STK food --> <property name="EconomicValue" value="72"/> <property class="Action0"> <property name="Class" value="Eat"/> <property name="Delay" value="2.1"/> <property name="Use_time" value="..."/> <property name="Sound_start" value="player_eating"/> </property> <property name="Smell" value="largeSmell"/> <property name="Group" value="Food/Cooking"/> <effect_group tiered="false"> <triggered_effect trigger="onSelfPrimaryActionEnd" action="ModifyCVar" cvar="$foodAmountAdd" operation="add" value="40"/> <triggered_effect trigger="onSelfPrimaryActionEnd" action="ModifyCVar" cvar="foodHealthAmount" operation="multiply" value="34"/> <triggered_effect trigger="onSelfPrimaryActionEnd" action="AddBuff" target="self" buff="buffProcessConsumables"/> </effect_group> </set> Link to comment Share on other sites More sharing options...
Noisy Pants Posted July 15, 2019 Author Share Posted July 15, 2019 so here is the code i used without errors loading that does not work: <set xpath="/recipes/recipe[@name='resourceBulletTip']" count="50" craft_area="forge" craft_tool="toolAndDieSet" material_based="true" tags="learnable"> <ingredient name="unit_lead" count="1"/> <ingredient name="unit_clay" count="1"/> </set>[/Code] I'm using this, which works but it shows two bullet tips options: [Code]<recipe name="resourceBulletTip" count="50" craft_area="forge" craft_tool="toolAndDieSet" material_based="true" tags="learnable"> <ingredient name="unit_lead" count="1"/> <ingredient name="unit_clay" count="1"/> </recipe>[/Code] Link to comment Share on other sites More sharing options...
Tin Posted July 15, 2019 Share Posted July 15, 2019 Give me a bit, Im going to see if I can't get someone on this. I need to learn this more as well lol. Link to comment Share on other sites More sharing options...
Tin Posted July 15, 2019 Share Posted July 15, 2019 <set xpath="/recipes/recipe[@name='resourceBulletTip']/@count">50 <!--<recipe name="resourceBulletTip" count="1" craft_area="forge" craft_tool="toolAndDieSet" material_based="true" tags="learnable">--> <ingredient name="unit_lead" count="2"/> <ingredient name="unit_clay" count="1"/> </set> use that. Srry I should have tested that out first but I figured it out. the above works. edit: obviously you can change the other values as you need. Link to comment Share on other sites More sharing options...
Belgeranrg Posted July 15, 2019 Share Posted July 15, 2019 Okay since nobody is actually answering your question, I will. The code you want in your recipes.xml is <remove xpath="/recipes/recipe[@name='resourceBulletTip']"></remove> with this BELOW it, anywhere below but this part needs to come after the </remove> bit of the code above: <append xpath="/recipes"> <recipe name="resourceBulletTip" count="100" craft_area="forge" craft_tool="toolAndDieSet" material_based="true" tags="learnable"> <ingredient name="unit_lead" count="1"/> <ingredient name="unit_clay" count="1"/> </recipe> </append> Some warnings (which come after the spells): 1. If there are multiple recipes (like resourceGlue) you'll need one <remove>*Glue*</remove> code for each one in the base game. 2. If you try to remove something that is not in the game (as in maybe you removed it 3 times and there were only two) it will error out your mod and stop it from loading the rest of whichever XML is messed up. 3. (not for recipes but) If you remove a block or item that "Extends" another item your game will freak out and stop your mod from loading. You need to <remove> and <append> all blocks, sub blocks, and dependent items in a series. 4. This is the WORST way to mod anything that is not a recipe. This is the fastest way to change recipes but will most likely break your game if used in any other XML. 5. This only applies to making changes to existing code. Anything you add is a lot more flexible. Sorry for the long post Link to comment Share on other sites More sharing options...
Tin Posted July 15, 2019 Share Posted July 15, 2019 The reason I did it that way, is because he didn't need to remove anything, just change values. No reason to be indignant about it. lol Link to comment Share on other sites More sharing options...
Belgeranrg Posted July 16, 2019 Share Posted July 16, 2019 I didn't mean to come across indignant. I only meant that the OPs question went unanswered. I gave him the answer to the question he asked. You gave him a solution to a problem. Your contribution is greater than mine but I had to make sure he knew two ways to do it JIC Link to comment Share on other sites More sharing options...
Tin Posted July 16, 2019 Share Posted July 16, 2019 I didn't mean to come across indignant. I only meant that the OPs question went unanswered. I gave him the answer to the question he asked. You gave him a solution to a problem. Your contribution is greater than mine but I had to make sure he knew two ways to do it JIC haha, it did come across as being such. I was all like But your answer was good because you gave him another option to look at. also, I screwed up my initial response to him... anyhow. Sorry. I sometimes read into thing too much, and sometimes get it wrong. Link to comment Share on other sites More sharing options...
Belgeranrg Posted July 19, 2019 Share Posted July 19, 2019 The error is mine. I was in a foul humor when I made the first post. Sometimes I get extra ♥♥♥♥ about things that I don't need to stress over. Thank you for being understanding. I'm still new to forums in general and I forget inflection doesn't translate well in written text. Link to comment Share on other sites More sharing options...
Guppycur Posted July 20, 2019 Share Posted July 20, 2019 Holy crap folks, it was my fault. I'm practicing to be a sith apprentice and sometimes my sessions go awry. Link to comment Share on other sites More sharing options...
Tin Posted July 20, 2019 Share Posted July 20, 2019 Holy crap folks, it was my fault. I'm practicing to be a sith apprentice and sometimes my sessions go awry. I agree. It's Guppy's fault. He is a cult leader, by his own admission. Link to comment Share on other sites More sharing options...
Belgeranrg Posted July 20, 2019 Share Posted July 20, 2019 Well, if you're crazy you can be part of the cult... but if you're deranged... we'll make you our leader. Link to comment Share on other sites More sharing options...
Noisy Pants Posted July 21, 2019 Author Share Posted July 21, 2019 <set xpath="/recipes/recipe[@name='resourceBulletTip']/@count">50 <!--<recipe name="resourceBulletTip" count="1" craft_area="forge" craft_tool="toolAndDieSet" material_based="true" tags="learnable">--> <ingredient name="unit_lead" count="2"/> <ingredient name="unit_clay" count="1"/> </set> use that. Srry I should have tested that out first but I figured it out. the above works. edit: obviously you can change the other values as you need. I tried this and no go, here is the code: <config> <append xpath="/recipes"> <set xpath="/recipes/recipe[@name='resourceBulletTip']/@count">2 <!--<recipe name="resourceBulletTip" count="1" craft_area="forge" craft_tool="toolAndDieSet" material_based="true" tags="learnable">--> <ingredient name="unit_lead" count="1"/> <ingredient name="unit_clay" count="1"/> </set <recipe name="ammo44MagnumBullet" count="1" craft_area="workbench" tags="learnable"> <ingredient name="resourceBulletTip" count="1"/> <ingredient name="resourceGunPowder" count="1"/> <ingredient name="resourceBulletCasing" count="1"/> </recipe> <recipe name="ammo44MagnumBulletSteel" count="1" craft_area="workbench" tags="learnable"> <ingredient name="resourceBulletTip" count="1"/> <ingredient name="resourceGunPowder" count="1"/> <ingredient name="resourceBulletCasingSteel" count="1"/> </recipe> <recipe name="ammo762mmBulletFMJ" count="1" craft_area="workbench" tags="learnable"> <ingredient name="resourceBulletTip" count="1"/> <ingredient name="resourceGunPowder" count="1"/> <ingredient name="resourceBulletCasing" count="1"/> </recipe> <recipe name="ammo762mmBulletFMJSteel" count="1" craft_area="workbench" tags="learnable"> <ingredient name="resourceBulletTip" count="1"/> <ingredient name="resourceGunPowder" count="1"/> <ingredient name="resourceBulletCasingSteel" count="1"/> </recipe> <recipe name="ammoCrossbowBoltExploding" count="1" craft_area="workbench" tags="learnable"> <ingredient name="resourceArrowHeadSteelAP" count="1"/> <ingredient name="resourceGunPowder" count="2"/> <ingredient name="resourceDuctTape" count="1"/> <ingredient name="resourceWood" count="1"/> <ingredient name="resourceFeather" count="1"/> </recipe> </append> </config>[/Code] Link to comment Share on other sites More sharing options...
Noisy Pants Posted July 21, 2019 Author Share Posted July 21, 2019 I am very appreciative of the information Tin and Belgeranrg provided, thank you. I want to go with Tin's idea after all if the kinks can be ironed out. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.