Jump to content

Best code to use


Recommended Posts

 

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 by BFT2020 (see edit history)
Link to comment
Share on other sites

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...