Aviose Posted December 8, 2018 Share Posted December 8, 2018 I am trying to edit the biomes.xml to reduce the amount of shrubs/grass that spawns on world generation, and I wanted to know how editing the subbiomes works... Some biomes have multiple subbiomes. Each of these have their own probabilities for decorations, but the subbiomes don't seem to have any labels. Does this mean that a single entry affects ALL subbiomes of the core biome, it affects them in order and must be differentiated by ordered list, or it searches for the term within every subbiome and only alters those that differ? An example of what I'm trying to use is as follows: <set xpath="/worldgeneration/biomes/biome[@name=snow]/subbiome/decorations/decoration[type=block' and @blockname='treeSnowyGrassDiagonal]/@prob">0.2</set>] The snow biome has four separate subbiomes (only differentiated by comments) The first two are... <!-- Snow Sub Biome grass and Blueberries --> and <!-- Snow Sub Biome rocks and snowberries --> The first subbiome has grass, the second doesn't. If a third also had grass, would the set xpath entry alter only the first, the first and third, or all three? Link to comment Share on other sites More sharing options...
n2n1 Posted December 8, 2018 Share Posted December 8, 2018 I don't quite understand what you want to ask, but, a edit in the subbiome affects to ALL subbiomes in core biome (in world) - there's no other way. But in one biome(.xml) there are many subbiomes(.xml) - each of them can be configured separately (.xml) hmmm.....don't know how this will work with the Xpatch. I think the Xpatch is good where it is needed. Link to comment Share on other sites More sharing options...
Aviose Posted December 9, 2018 Author Share Posted December 9, 2018 I don't quite understand what you want to ask, but, a edit in the subbiome affects to ALL subbiomes in core biome (in world) - there's no other way. But in one biome(.xml) there are many subbiomes(.xml) - each of them can be configured separately (.xml) hmmm.....don't know how this will work with the Xpatch. I think the Xpatch is good where it is needed. You sort of answered my question... I think. I understand that in one biome there are many subbiomes, but the subbiomes don't have a field that you can identify by any label, so you can't use XPath to alter a single subbiome. The question is about how subbiome edits in XPath alter the subbiomes. Do they impact all subbiomes with the single line of code (thus even adding grass to areas it may not be added, in this case)? It looks like this is the case based on your statements and my observations. Ideally, I want grass to be about 1/4th as frequent in all biomes and subbiomes based on current a17 (b208) branch. There's way too much of it for the resources they provide, and I am trying to get some extra performance, since it loads thousands of them at a time in a single area by default. Link to comment Share on other sites More sharing options...
Darkxenoth Posted December 9, 2018 Share Posted December 9, 2018 @Aviose The line of code you provided seems fairly specific to me... It won't affect any biome other than the 'snow' biome, and looks for the fairly specific 'treeSnowyGrassDiagonal' decoration block. As long as you don't do a very generic xpath like: <set xpath="/worldgeneration/biomes/biome/subbiome/decorations/decoration[@type='block' and contains(@blockname,'GrassDiagonal')]/@prob">0.2</set> Even if you did something like that, it still wouldn't ADD grass to a subbiome... assuming the subbiomes that don't have grass simply don't have a line for grass at all; if they do have a line of code for grass, but have the prob set to 0, then you would have to account for that somehow. Maybe something like: <set xpath="/worldgeneration/biomes/biome/subbiome/decorations/decoration[@type='block'][contains(@blockname,'GrassDiagonal')][not (@prob='0')]/@prob">0.2</set> Link to comment Share on other sites More sharing options...
Aviose Posted December 9, 2018 Author Share Posted December 9, 2018 @Aviose The line of code you provided seems fairly specific to me... It won't affect any biome other than the 'snow' biome, and looks for the fairly specific 'treeSnowyGrassDiagonal' decoration block. As long as you don't do a very generic xpath like: <set xpath="/worldgeneration/biomes/biome/subbiome/decorations/decoration[@type='block' and contains(@blockname,'GrassDiagonal')]/@prob">0.2</set> Even if you did something like that, it still wouldn't ADD grass to a subbiome... assuming the subbiomes that don't have grass simply don't have a line for grass at all; if they do have a line of code for grass, but have the prob set to 0, then you would have to account for that somehow. Maybe something like: <set xpath="/worldgeneration/biomes/biome/subbiome/decorations/decoration[@type='block'][contains(@blockname,'GrassDiagonal')][not (@prob='0')]/@prob">0.2</set> That's the way I understood it, but I wasn't sure how it worked in practice. I still don't have it working, and I'm not completely sure why... I will try cranking the numbers down even lower, I suppose. Thank you. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.