Iceburg71 Posted February 25, 2020 Share Posted February 25, 2020 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 More sharing options...
Life_For_Dead Posted February 25, 2020 Share Posted February 25, 2020 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> Link to comment Share on other sites More sharing options...
sphereii Posted February 25, 2020 Share Posted February 25, 2020 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 More sharing options...
Iceburg71 Posted February 25, 2020 Author Share Posted February 25, 2020 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. Link to comment Share on other sites More sharing options...
Life_For_Dead Posted February 25, 2020 Share Posted February 25, 2020 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. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.