Jump to content

Possible bug with xpath


JasonX

Recommended Posts

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>

 

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

6 hours ago, JasonX said:

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...

Link to comment
Share on other sites

  • 3 weeks later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...