mjrice Posted December 27, 2018 Share Posted December 27, 2018 Hello, I have created a mod to the RWG system using xpath, and am trying to figure out if it is possible to make some mod variables (specifically biome distribution) based on a combobox value from the UI. I can add the selection I want by mod'ing windows.xml using the snippet below: <append xpath="/windows/window[@name='newContinueGame']/rect[@pos='0,-50']/rect[@name='newContent']/rect[@visible='{isgenerateworld}']/grid"> <rect> <label depth="4" width="250" height="30" text="Biome Style" font_size="28" color="[white]" justify="right" pivot="topleft" /> <combobox depth="108" pos="255,0" width="300" height="32" name="BiomeStyle" type="ComboBoxList<System.String>" values="Balanced,More Snowy,More Desert,More Forested,More Prairie" value_wrap="false" /> </rect> </append> But how can I use the selected value of "BiomeStyle" elsewhere (in rwgmixer.xml) to change a value such as the (0,.2) range in this snippet: <set xpath="/rwgmixer/biome_generators/biome_generator[@name='vanillaSmall']/module[@name='biomeOutput'][@type='BiomeIDMapper']/property[@name='biomemap0.Range']/@value">0.00,0.2</set> <!-- forest --> What I am hoping for is a way to say (in xml), if(BiomeStyle = 'More Forested') then biomemap0.Range/@value=0,.5" Link to comment Share on other sites More sharing options...
mjrice Posted December 29, 2018 Author Share Posted December 29, 2018 Bump and follow-up, Another example of the situation I'm trying to overcome is making adjustments for the chosen world size. For my biome generation to work the way intended, for instance, I need to translate the input coordinates by half the world size in the X and Z directions. Here is a code snippet of the two cases: <append xpath="/rwgmixer"> <biome_generators> <biome_generator name="vanillaSmall"> <!-- for maps 4096x4096 --> <module name="fn1a" type="TranslateInput" > <property name="sourceModule" value="fn0"/> <property name="x" value="-2048"/> <property name="y" value="0.0"/> <property name="z" value="-2048"/> </module> <!-- for maps 8192x8192 --> <module name="fn1b" type="TranslateInput" > <property name="sourceModule" value="fn0"/> <property name="x" value="-4096"/> <property name="y" value="0.0"/> <property name="z" value="-4096"/> </module> </append> Is there any way to make the selection of "fn1a" vs "fn1b" at runtime based on world_size? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.