stompbox108 Posted January 12, 2019 Share Posted January 12, 2019 I created a couple new seeds to add more mutant crops, everything works but now I want to add how they will be introduced into the game without using a workaround recipe just to add them. Here is the existing lootgroup <lootgroup name="seeds"> <item name="plantedPotato1"/> <item name="plantedCoffee1"/> <item name="plantedCorn1"/> <item name="plantedBlueberry1"/> <item name="plantedCotton1" prob="0.5"/> <item name="plantedGoldenrod1"/> <item name="plantedAloe1"/> <item name="plantedMushroom1"/> <item name="plantedYucca1"/> <item name="plantedChrysanthemum1" prob="0.5"/> <item name="treePlantedMountainPine1m" prob="0.3"/> <item name="treePlantedWinterPine1m" prob="0.3"/> </lootgroup> I am trying to figure out how I can add two more items to the group about. Would this work as far as an xpath command. superfood is the name of my mod. Helps me stay organized. <superfood> <insertafter xpath="/loot/lootgroup[@name=seeds]> <item name="Super Potato (Seed)"/> <item name="Super Mushroom (Seed)"/> </insertafter> </superfood> any and all help is appreciated. Link to comment Share on other sites More sharing options...
FringeRecall Posted January 13, 2019 Share Posted January 13, 2019 Hi. If you check out items.xml, you'll see that each crop has different growth stages which translates to different item names for the same crop. You'll have to create this progression by appending items.xml with your new seeds, growth stages and harvestable crop before you can add them to the loot group. Or, minimally without functional seeds, you can add just the first stage item (which would be the seed): SuperPotato1 This should get you started in the right direction. Link to comment Share on other sites More sharing options...
stompbox108 Posted January 13, 2019 Author Share Posted January 13, 2019 sorry all that is taken care of , i just want to add it to loot containers. Link to comment Share on other sites More sharing options...
FringeRecall Posted January 13, 2019 Share Posted January 13, 2019 sorry all that is taken care of , i just want to add it to loot containers. Gotcha. My bad. Try this: <append xpath="/lootcontainers/lootgroup[@name='seeds']"> <item name="Super Potato (Seed)"/> <item name="Super Mushroom (Seed)"/> </append> Link to comment Share on other sites More sharing options...
stompbox108 Posted January 13, 2019 Author Share Posted January 13, 2019 Gotcha. My bad. Try this: <append xpath="/lootcontainers/lootgroup[@name='seeds']"> <item name="Super Potato (Seed)"/> <item name="Super Mushroom (Seed)"/> </append> thanks I'll try that Link to comment Share on other sites More sharing options...
stasis78 Posted January 13, 2019 Share Posted January 13, 2019 You'll want to update both loot.xml and trader.xml. See examples here -> Loot.xml Traders.xml Link to comment Share on other sites More sharing options...
stompbox108 Posted January 14, 2019 Author Share Posted January 14, 2019 this worked thanks <append xpath="/lootcontainers/lootgroup[@name=seeds]"> <item name="Super Potato (Seed)"/> <item name="Super Mushroom (Seed)"/> </append> Link to comment Share on other sites More sharing options...
Crater Creator Posted January 14, 2019 Share Posted January 14, 2019 In the future, you can wrap your script in the tag to preserve white space, making your code more readable here. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.