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

Code for biomes.xml modlet correct?

Cernwn

Refugee
Code:
<theMist>
<!-- Strip existing code -->
<remove xpath="/worldgeneration/biomes/biome/weather/Fog">

       <!-- Add 100% chance of 50m fog to valid biomes, in order to help performance via occlusion -->
<insertAfter="/worldgeneration/biomes/biome[@name='snow' or 'pine_forest' or 'desert' or 'radiated' or 'wasteland' or 'burnt_forest' or 'city' or 'city_wasteland' or 'wasteland_hub']/weather/Temperature">
	<append xpath="/worldgeneration/biomes/biome/weather">
		<Fog min="0" max="0" prob="0"/>
		<Fog min="50" max="50" prob="1"/>
	</append>
</insertAfter>
</theMist>
 
Close, but some minor syntax issues here.

Your <remove> tag is missing an end tag: it should be closed with />. You can't use an <append> inside of an <insertAfter>, just use the <insertAfter>. Also incorrect is your logic for the or condition, which should be referencing each variable for each part of the condition. Finally, <insertAfter> requires an xpath, it's a syntax error to assign the opening tag to what you want the xpath to be.

I believe this is what you're trying to do:

/Config/biomes.xml

Code:
<theMist>
<!-- Strip existing code -->
<remove xpath="/worldgeneration/biomes/biome/weather/Fog"/>

<!-- Add 100% chance of 50m fog to valid biomes, in order to help performance via occlusion -->
<insertAfter xpath="/worldgeneration/biomes/biome[@name='snow' or @name='pine_forest' or @name='desert' or @name='radiated' or @name='wasteland' or @name='burnt_forest' or @name='city' or @name='city_wasteland' or @name='wasteland_hub']/weather/Temperature">
	<Fog min="0" max="0" prob="0"/>
	<Fog min="50" max="50" prob="1"/>
</insertAfter>
</theMist>
This code removes all of the overall rules for creating Fog and inserts a 50%-strength Fog (probability 100%) to the following biomes: snow, pine_forest, desert, radiated, wasteland, burnt_forest, city, city_wasteland, and wasteland_hub.

 
Last edited by a moderator:
@psouza4/MeanCloud:

Fog values must be hardcoded or something, since changing these values directly in the XML(not via modlet) did absolutely nothing. AFAIK admins can still change weather via console commands, but that is only temporary. Regardless, thank you VERY much for this attempt.

 
Last edited by a moderator:
Back
Top