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

Possible bug with xpath

JasonX

Refugee
Hi,

I'm trying to mod the probability for wild animals in entitygroups.xml, but getting errors for each line...

"XML patch for "entitygroups.xml" from mod "..." did not apply: <set xpath="/entity_groups/entity_group[@name='WildGameForest"]/entity[@name='animalBoar']/@prob"

etc.

I tried switching "prob" to "value" but no difference. Maybe "prob" hasn't been implemented?

Code:
<configs>

<set xpath="/entity_groups/entity_group[@name='WildGameForest']/entity[@name='animalBoar']/@prob">10</set>
<set xpath="/entity_groups/entity_group[@name='WildGameForest']/entity[@name='animalStag']/@prob">10</set>
<set xpath="/entity_groups/entity_group[@name='WildGameForest']/entity[@name='animalDoe']/@prob">10</set>
<set xpath="/entity_groups/entity_group[@name='WildGameForest']/entity[@name='animalWolf']/@prob">10</set>

</configs>
 
This looks like it should work, to me.. I know I had problems getting basic lines of xml to do anything unless I had all my custom xml changes in the same mod package... try using only the one xml by itself...

keep us updated on how it's goin!

 
Hi,

I'm trying to mod the probability for wild animals in entitygroups.xml, but getting errors for each line...

"XML patch for "entitygroups.xml" from mod "..." did not apply: <set xpath="/entity_groups/entity_group[@name='WildGameForest"]/entity[@name='animalBoar']/@prob"

etc.

I tried switching "prob" to "value" but no difference. Maybe "prob" hasn't been implemented?

<configs>

<set xpath="/entity_groups/entity_group[@name='WildGameForest']/entity[@name='animalBoar']/@prob">10</set>
<set xpath="/entity_groups/entity_group[@name='WildGameForest']/entity[@name='animalStag']/@prob">10</set>
<set xpath="/entity_groups/entity_group[@name='WildGameForest']/entity[@name='animalDoe']/@prob">10</set>
<set xpath="/entity_groups/entity_group[@name='WildGameForest']/entity[@name='animalWolf']/@prob">10</set>

</configs>



It doesn't work, because it should have been

<configs>

<set xpath="/entitygroups/entitygroup[@name='WildGameForest']/entity[@name='animalBoar']/@prob">10</set>
<set xpath="/entitygroups/entitygroup[@name='WildGameForest']/entity[@name='animalStag']/@prob">10</set>
<set xpath="/entitygroups/entitygroup[@name='WildGameForest']/entity[@name='animalDoe']/@prob">10</set>
<set xpath="/entitygroups/entitygroup[@name='WildGameForest']/entity[@name='animalWolf']/@prob">10</set>

</configs>


Just a little oversight...

 
Back
Top