Jump to content

Modding Help


Iceburg71

Recommended Posts

Ok, I am new to modding but have learned a lot in a short time. At this point, I am just creating things that pop into my head to learn how things work. I am stumped on an issue I ran into.

 

I thought it would be neat to see if I could add baby deer and have them appear in only the same locations naturally as the Doe.

 

Issue is that I am getting a warning when the xpath is being applied to entity groups. I can manually spawn the baby deer, so I know that the entityclasses.xml is fine.

 

I am trying to use an insertafter to add in the baby deer in the sections that contain animalDoe.

 

I get the following message in the log:

2020-02-24T21:42:00 23.383 WRN XML patch for "entitygroups.xml" from mod "IceBurg - Baby Animals" did not apply: <insertAfter xpath="entitygroups/entitygroup/FriendlyAnimalsSnow/entity[@name=animalDoe]"

2020-02-24T21:42:00 23.385 WRN XML patch for "entitygroups.xml" from mod "IceBurg - Baby Animals" did not apply: <insertAfter xpath="entitygroups/entitygroup/FriendlyAnimalsForest/entity[@name=animalDoe]"

2020-02-24T21:42:00 23.386 WRN XML patch for "entitygroups.xml" from mod "IceBurg - Baby Animals" did not apply: <insertAfter xpath="entitygroups/entitygroup/FriendlyAnimalsBurntForest/entity[@name=animalDoe]"

2020-02-24T21:42:00 23.388 WRN XML patch for "entitygroups.xml" from mod "IceBurg - Baby Animals" did not apply: <insertAfter xpath="entitygroups/entitygroup/FriendlyAnimalsPlains/entity[@name=animalDoe]"

2020-02-24T21:42:00 23.390 WRN XML patch for "entitygroups.xml" from mod "IceBurg - Baby Animals" did not apply: <insertAfter xpath="entitygroups/entitygroup/AnimalsAll/entity[@name=animalDoe]"

 

 

Here is my entries from the entitygroupls.xml:

 

<BabyDeer>

 

<!-- Add in Baby Deer to Groups -->

<insertAfter xpath="entitygroups/entitygroup/FriendlyAnimalsSnow/entity[@name=animalDoe]">

<entity name="animalBabyDeer" prob="0.29" />

</insertAfter>

<insertAfter xpath="entitygroups/entitygroup/FriendlyAnimalsForest/entity[@name=animalDoe]">

<entity name="animalBabyDeer" prob="0.29" />

</insertAfter>

<insertAfter xpath="entitygroups/entitygroup/FriendlyAnimalsBurntForest/entity[@name=animalDoe]">

<entity name="animalBabyDeer" prob="0.29" />

</insertAfter>

<insertAfter xpath="entitygroups/entitygroup/FriendlyAnimalsPlains/entity[@name=animalDoe]">

<entity name="animalBabyDeer" prob="0.73"/>

</insertAfter>

<insertAfter xpath="entitygroups/entitygroup/AnimalsAll/entity[@name=animalDoe]">

<entity name="animalBabyDeer" prob="0.73" />

</insertAfter>

 

</BabyDeer>

 

 

Any help in teaching a newbie would be greatly appreciated.

 

 

Link to comment
Share on other sites

Try using an xpath like this: /entitygroups/entitygroup[@name=FriendlyAnimalsSnow]

 

Life_For_Dead was close, but forgot the @ on name. You should also include a leading /, just so there's no confusion on where it should start looing.

 

And apend would likely work, unless the order of the spawning is very important to you.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...