• If you have a mod, tool or prefab, please use the Resources section. Click Mods at the top of the forums.

Help with xpath mod

usafmaverick

New member
Trying to tweak some of the animal spawning for the game. Ive made modifications to entitygroups.xml and those all load just fine and have play tested in single player no problem. My mods to spawning.xml seem to load just fine in single player, but as soon as I load it to my linux server i start getting the following errors:

2024-08-18T14:43:27 52.852 WRN XML patch for "spawning.xml" from mod "MoreAnimals" did not apply: <set xpath="/spawning/biome[@name='pine_forest']/spawn[@entitygroup='WildGameForestNight']/@maxcount" (line 3 at pos 6)

2024-08-18T14:43:27 52.852 WRN XML patch for "spawning.xml" from mod "MoreAnimals" did not apply: <set xpath="/spawning/biome[@name='burnt_forest']/spawn[@entitygroup='WildGameForestNight']/@maxcount" (line 5 at pos 6)

2024-08-18T14:43:27 52.852 WRN XML patch for "spawning.xml" from mod "MoreAnimals" did not apply: <set xpath="/spawning/biome[@name='burnt_forest']/spawn[@entitygroup='EnemyAnimalsBurntForestAny']/@maxcount" (line 6 at pos 6)

2024-08-18T14:43:27 52.852 WRN XML patch for "spawning.xml" from mod "MoreAnimals" did not apply: <set xpath="/spawning/biome[@name='burnt_forest']/spawn[@entitygroup='EnemyAnimalsBurntForestNight']/@maxcount" (line 7 at pos 6)

2024-08-18T14:43:27 52.852 WRN XML patch for "spawning.xml" from mod "MoreAnimals" did not apply: <set xpath="/spawning/biome[@name='snow']/spawn[@entitygroup='WildGameStagNight']/@maxcount" (line 10 at pos 6)

2024-08-18T14:43:27 52.853 WRN XML patch for "spawning.xml" from mod "MoreAnimals" did not apply: <set xpath="/spawning/biome[@name='snow']/spawn[@entitygroup='EnemyAnimalsSnowNight']/@maxcount" (line 12 at pos 6)






I have put the code below. Whats interesting to me is that every iteration of WildGameForest works and the EnemyAnimalsSnow works, but none of the rest despite every line being nearly identical. I have also tried this as setattribute tags instead, however that version does not load into the single player game. Oddly enough I get the same warnings for the same entitygroups as above. Any and all assistance is greatly appreciated.

Code:
<configs>
    <set xpath="/spawning/biome[@name='pine_forest']/spawn[@entitygroup='WildGameForest']/@maxcount">3</set>
    <set xpath="/spawning/biome[@name='pine_forest']/spawn[@entitygroup='WildGameForestNight']/@maxcount">3</set>

    <set xpath="/spawning/biome[@name='burnt_forest']/spawn[@entitygroup='WildGameForest']/@maxcount">2</set>
    <set xpath="/spawning/biome[@name='burnt_forest']/spawn[@entitygroup='WildGameForestNight']/@maxcount">2</set>
    <set xpath="/spawning/biome[@name='burnt_forest']/spawn[@entitygroup='EnemyAnimalsBurntForestAny']/@maxcount">2</set>
    <set xpath="/spawning/biome[@name='burnt_forest']/spawn[@entitygroup='EnemyAnimalsBurntForestNight']/@maxcount">2</set>

    <set xpath="/spawning/biome[@name='desert']/spawn[@entitygroup='WildGameForest']/@maxcount">0</set>

    <set xpath="/spawning/biome[@name='snow']/spawn[@entitygroup='WildGameForest']/@maxcount">2</set>
    <set xpath="/spawning/biome[@name='snow']/spawn[@entitygroup='WildGameStagNight']/@maxcount">2</set>
    <set xpath="/spawning/biome[@name='snow']/spawn[@entitygroup='EnemyAnimalsSnow']/@maxcount">2</set>
    <set xpath="/spawning/biome[@name='snow']/spawn[@entitygroup='EnemyAnimalsSnowNight']/@maxcount">2</set>
</configs>
 
Last edited by a moderator:
Linux systems have strict requirements for file paths and filenames. Would you like to check if there are any issues with the case sensitivity of the file names? Also, check if there are any problems with the absolute and relative file paths.

 
Thanks for the feedback. Im not manipulating any linux pathways, Im only using xpath in the mod folder structure to modify spawning.xml. Which my mod structure must be correct since I am able to manipulate several of the entitygroups in spawning.xml. I just cant figure out what the rest are throwing errors as I wrote above.

 
I tested this on my own dedicated server and received no warnings. You can always share the server log just to show what else is in there, if anything. The only thing that stood out of the failed entries was that the vast majority are new to V1.0.

 
@arramus What I shared above is direct from the server logs, just spaced in between each error. I ended up finding a resolution (I think) by doing xpath remove and xpath insert befores using the following code. It did load on my server without any issues. But thanks for the testing. Ill let it play out and see if theres any further issues.

Code:
<configs>
	
<remove xpath="/spawning/biome[@name='pine_forest']"/>
<remove xpath="/spawning/biome[@name='burnt_forest']"/>
<remove xpath="/spawning/biome[@name='desert']"/>
<remove xpath="/spawning/biome[@name='snow']"/>
<remove xpath="/spawning/biome[@name='wasteland']"/>

<insertBefore xpath="/spawning/entityspawner[@name='Dog_Sm_Territorial']" >
	
	<biome name="pine_forest">
		<spawn maxcount="1" respawndelay="2.9" time="Day" entitygroup="ZombiesAll" notags="commercial,industrial,downtown" />
		<spawn maxcount="1" respawndelay="3.3" time="Night" entitygroup="ZombiesNight" notags="commercial,industrial,downtown" />

		<spawn maxcount="2" respawndelay="0.3" time="Day" entitygroup="ZombiesAll" tags="commercial,industrial" notags="downtown" />
		<spawn maxcount="3" respawndelay="0.15" time="Night" entitygroup="ZombiesNight" tags="commercial,industrial" notags="downtown" />

		<spawn maxcount="3" respawndelay="0.3" time="Day" entitygroup="ZombiesForestDowntown" tags="downtown" />
		<spawn maxcount="3" respawndelay="0.1" time="Night" entitygroup="ZombiesForestDowntownNight" tags="downtown" />

		<spawn maxcount="3" respawndelay="1" time="Any" entitygroup="WildGameForest" spawnDeadChance="0" />
		<spawn maxcount="2" respawndelay="1" time="Night" entitygroup="WildGameForestNight" spawnDeadChance="0" />
		<spawn maxcount="2" respawndelay="3.2" time="Night" entitygroup="EnemyAnimalsForest" spawnDeadChance="0" />
	</biome>
	
	<biome name="burnt_forest">
		<spawn maxcount="1" respawndelay="2.8" time="Day" entitygroup="ZombiesBurntForest" />
		<spawn maxcount="1" respawndelay="3.2" time="Night" entitygroup="ZombiesNight" />

		<spawn maxcount="3" respawndelay="0.25" time="Day" entitygroup="ZombiesAll" tags="commercial,industrial" notags="downtown" />
		<spawn maxcount="4" respawndelay="0.15" time="Night" entitygroup="ZombiesNight" tags="commercial,industrial" notags="downtown" />

		<spawn maxcount="3" respawndelay="0.15" time="Day" entitygroup="ZombiesDowntown" tags="downtown" />
		<spawn maxcount="4" respawndelay="0.1" time="Night" entitygroup="ZombiesDowntown" tags="downtown" />

		<spawn maxcount="2" respawndelay="1" time="Any" entitygroup="WildGameForest" spawnDeadChance="0" />
		<spawn maxcount="2" respawndelay="1.1" time="Any" entitygroup="EnemyAnimalsBurntForestAny" spawnDeadChance="0" />
		<spawn maxcount="2" respawndelay="1" time="Night" entitygroup="WildGameForestNight" spawnDeadChance="0" />
		<spawn maxcount="2" respawndelay="1.1" time="Night" entitygroup="EnemyAnimalsBurntForestNight" spawnDeadChance="0" />
	</biome>
	
	<biome name="desert">
		<spawn maxcount="1" respawndelay="2.7" time="Any" entitygroup="ZombiesAll" notags="commercial,industrial,downtown" />
		<spawn maxcount="1" respawndelay="2.1" time="Night" entitygroup="ZombiesNight" notags="commercial,industrial,downtown" />
		
		<spawn maxcount="3" respawndelay="0.2" time="Day" entitygroup="ZombiesAll" tags="commercial,industrial" notags="downtown" />
		<spawn maxcount="3" respawndelay="0.1" time="Night" entitygroup="ZombiesNight" tags="commercial,industrial" notags="downtown" />

		<spawn maxcount="3" respawndelay="0.2" time="Day" entitygroup="ZombiesDowntown" tags="downtown" />
		<spawn maxcount="4" respawndelay="0.09" time="Night" entitygroup="ZombiesDowntown" tags="downtown" />
		
		<spawn maxcount="0" respawndelay="1" time="Any" entitygroup="WildGameForest" spawnDeadChance="0" />
		<spawn maxcount="1" respawndelay="3.5" time="Any" entitygroup="EnemyAnimalsDesert" spawnDeadChance="0" />
		<spawn maxcount="1" respawndelay="3.5" time="Night" entitygroup="EnemyAnimalsDesertNight" spawnDeadChance="0" />
	</biome>
	
	<biome name="snow">
		<spawn maxcount="1" respawndelay="2.6" time="Any" entitygroup="SnowZombies" notags="downtown" />
		<spawn maxcount="1" respawndelay="1.7" time="Night" entitygroup="ZombiesNight" notags="commercial,industrial,downtown" />

		<spawn maxcount="4" respawndelay="0.09" time="Day" entitygroup="ZombiesAll" tags="commercial,industrial" notags="downtown" />
		<spawn maxcount="4" respawndelay="0.06" time="Night" entitygroup="ZombiesNight" tags="commercial,industrial" notags="downtown" />

		<spawn maxcount="4" respawndelay="0.07" time="Day" entitygroup="ZombiesDowntown" tags="downtown" />
		<spawn maxcount="4" respawndelay="0.04" time="Night" entitygroup="ZombiesDowntown" tags="downtown" />

		<spawn maxcount="2" respawndelay="1" time="Any" entitygroup="WildGameForest" spawnDeadChance="0" />
		<spawn maxcount="2" respawndelay="1" time="Night" entitygroup="WildGameStagNight" spawnDeadChance="0" />
		<spawn maxcount="2" respawndelay="3.1" time="Any" entitygroup="EnemyAnimalsSnow" spawnDeadChance="0" />
		<spawn maxcount="2" respawndelay="3.1" time="Night" entitygroup="EnemyAnimalsSnowNight" spawnDeadChance="0" />
	</biome>
	
	<biome name="wasteland">
		<spawn maxcount="1" respawndelay="0.3" time="Day" entitygroup="ZombiesWasteland" notags="commercial,industrial,downtown" />
		<spawn maxcount="2" respawndelay="0.001" time="Night" entitygroup="ZombiesWastelandNight" notags="commercial,industrial,downtown" />

		<spawn maxcount="4" respawndelay="0.033" time="Day" entitygroup="ZombiesWasteland" tags="commercial,industrial" notags="downtown" />
		<spawn maxcount="4" respawndelay="0.002" time="Night" entitygroup="ZombiesWastelandNight" tags="commercial,industrial" notags="downtown" />

		<spawn maxcount="4" respawndelay="0.0167" time="Day" entitygroup="ZombiesWastelandDowntown" tags="downtown" />
		<spawn maxcount="4" respawndelay="0.002" time="Night" entitygroup="ZombiesWastelandDowntown" tags="downtown" />

		<spawn maxcount="1" respawndelay="0.3" time="Any" entitygroup="EnemyAnimalsWasteland" spawnDeadChance="0" />
		<spawn maxcount="1" respawndelay="1" time="Night" entitygroup="WildGameStagNight" spawnDeadChance="0" />
		<spawn maxcount="1" respawndelay="1" time="Night" entitygroup="EnemyAnimalsWastelandNight" spawnDeadChance="0" />
	</biome>

</insertBefore>
</configs>
 
Back
Top