Jump to content
JasonX

Possible bug with xpath

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>

 

Share this post


Link to post
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!

Share this post


Link to post
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...

Share this post


Link to post
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

×
×
  • Create New...