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

Modding Help

Iceburg71

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

 
I'm a noob too but I think you use the wrong command & path section... No use "insertafter" but better "append" in your case & so try this:

<configs>

<append xpath="entitygroups/entitygroup[name=FriendlyAnimalsSnow]">

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

</append>

ect...

</configs>

 
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.

 
yeah. I noticed that as well. thanks to the both of you for your help. Order is not really important.

How does the prob=.0.29 affect the spawning of the zombie\animal. that has been a question I have had.

 
Yes I forgot the @

Normaly prob = 0 to 1 mean 0 to 100% & you can set to 5 or 10 or more... I do my own mod too & I test 1 & 5, with this 5 seem like I got more zombies than 1.

 
Back
Top