AaronG85 Posted June 7, 2022 Share Posted June 7, 2022 What would be the best code to use to add an item to a new group? or add one to a group if that vanilla item doesn't have a group? Link to comment Share on other sites More sharing options...
BFT2020 Posted June 7, 2022 Share Posted June 7, 2022 InsertAfter 1 Link to comment Share on other sites More sharing options...
AaronG85 Posted June 8, 2022 Author Share Posted June 8, 2022 7 hours ago, BFT2020 said: InsertAfter Thanks BFT2020 but using modDyeBlack as an example how would i add it to a group (like the full code if you could help) Link to comment Share on other sites More sharing options...
BFT2020 Posted June 8, 2022 Share Posted June 8, 2022 (edited) Adding to an existing group: <insertAfter xpath="/lootcontainers/lootgroup[@name='modMeleeT1']/item[@name='modFuelTankSmall']"> <item name="modDyeBlack"/> </insertAfter > Adding a new group <insertAfter xpath="/lootcontainers/lootgroup[@name='dyes']"> <lootgroup name="dyesNew"> <item name="modDyeBlack"/> </lootgroup> </insertAfter > You can also use insertBefore Edited June 8, 2022 by BFT2020 (see edit history) 1 Link to comment Share on other sites More sharing options...
AaronG85 Posted June 10, 2022 Author Share Posted June 10, 2022 Thanks heaps of for this @BFT2020 Link to comment Share on other sites More sharing options...
AaronG85 Posted June 10, 2022 Author Share Posted June 10, 2022 On 6/8/2022 at 11:38 PM, BFT2020 said: Adding to an existing group: Adding a new group You can also use insertBefore I'm doing something wrong here, I'm trying to add the dyes into the CFChemicals group so they show up in the chemistry station menu? <insertAfter xpath="/lootcontainers/lootgroup[@name='dyes']/item[@name='Group']"> <lootgroup name="CFChemicals"> <item name="modDyeBlack"/> <item name="modDyeBlue"/> <item name="modDyeBrown"/> <item name="modDyeGreen"/> <item name="modDyePink"/> <item name="modDyePurple"/> <item name="modDyeRed"/> <item name="modDyeWhite"/> <item name="modDyeYellow"/> </lootgroup> </insertAfter > Link to comment Share on other sites More sharing options...
BFT2020 Posted June 11, 2022 Share Posted June 11, 2022 Since you are inserting a new group, rmove the /item[....] after 'dyes'] What it is looking for is a item group inside of lootgroup "dyes" instead of creating a new group after the dyes group. It should be <insertAfter xpath="/lootcontainers/lootgroup[@name='dyes']"> Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now