Muriel Posted June 23, 2019 Share Posted June 23, 2019 I've created a prefab I want to be spawned in random worlds. In the "Prefab Properties" I set the "Group" to "Wilderness", as I don't want it to spawn in any city. I also set it to only be allowed in the "pine_forest" biome in the %prefabname%.xml file (I actually did this from the UI, but I forgot where ): <property name="AllowedBiomes" value="pine_forest" /> I've also created an XPath config file to try to insert it into the world with a probability of 100% to ensure it is spawn: <configs> <append xpath="/rwgmixer/prefab_rule[@name='wildernessGroup']"> <prefab name="%prefabname%" min_count="1" max_count="1" prob="10"/> </append> </configs> But when I generated a new world the prefab was nowhere to be found! So, how can I add a custom prefab to random worlds? Link to comment Share on other sites More sharing options...
TopMinder Posted June 23, 2019 Share Posted June 23, 2019 I don´t know exact how it is correct, but i think the prob should be max 1 (=100%) Give it a value of between 0.01 - 1 Link to comment Share on other sites More sharing options...
Muriel Posted June 23, 2019 Author Share Posted June 23, 2019 Traders have a prob of 2, which matches the wikipages that says traders have a probability of 20%. Link to comment Share on other sites More sharing options...
TopMinder Posted June 23, 2019 Share Posted June 23, 2019 <prefab_rule name="traderGroup"> <!-- Wilderness Zone groups --> <prefab name="settlement_trader_01" prob="0.25"/> <prefab name="settlement_trader_02" prob="0.25"/> <prefab name="settlement_trader_03" prob="0.25"/> <prefab name="settlement_trader_04" prob="0.25"/> <prefab name="settlement_trader_05" /> </prefab_rule> Original rgwmixer lines Link to comment Share on other sites More sharing options...
Muriel Posted June 23, 2019 Author Share Posted June 23, 2019 Yes, but there's also this in rgwmixer.xml: <prefab_rule name="wildernessGroup"> <prefab name="settlement_trader_01" min_count="1" max_count="1" prob="2" min_repeat_distance="800"/> I'll give setting prob to 1 a try, though. EDIT: No luck with prob="1". My prefab is still nowhere to be found in prefabs.xml in the newly generated world. EDIT 2: I noticed this in the debug log: WRN XML patch for "rgwmixer.xml" from mod MyMod did not apply: <append xpath="/rwgmixer/prefab_rule[@name=wildernessGroup]" Which is probably a contributing factor, but I can't see what's wrong with my XML that gives this error Link to comment Share on other sites More sharing options...
bdubyah Posted June 24, 2019 Share Posted June 24, 2019 Is your file actually called rgwmixer as the log states? Should be rwgmixer. If you haven't sorted it by the time I get a chance to look, I'll see what my code for mine was. Link to comment Share on other sites More sharing options...
Muriel Posted June 24, 2019 Author Share Posted June 24, 2019 Yeh, my file is named "rwgmixer.xml". Typo on my part Link to comment Share on other sites More sharing options...
bdubyah Posted June 24, 2019 Share Posted June 24, 2019 Hmm. It looks good to me. <append xpath="/rwgmixer/prefab_rules/prefab_rule[@name=wildernessGroup]"> <prefab name="Nuka_Factory_Vanilla" min_count="0" max_count="1" prob=".04" min_repeat_distance="5000"/> </append> That's what I used for mine. Obviously it's supposed to be rare. Maybe try, in the editor, add it back to all the biomes and stuff. And then in the mixer just add it to wilderness. Do away with just limiting it to the pine forest or whatever. Also, what map size were you using to test? Link to comment Share on other sites More sharing options...
Muriel Posted June 24, 2019 Author Share Posted June 24, 2019 Thanks to your XML I could find the error in mine. I'm missing the "prefab_rules" in the middle. When I added that and generated a new world my base was in it (in the pine forest) Thanks for the input! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.