Jump to content

Need Help with FOMOD Installer XML


Worsin

Recommended Posts

I made a FOMOD installer for my mod but there is 1 glitch with it i just cant seem to figure out how to solve. Perhaps someone can assist me with this that knows FOMOD and XML better than me.

 

Basically i have a section where im checking for ESP files to be present and enabling the correct options based on which esp files are active. Essentially there are 2 patches and i have a single install option for each patch and a combination option if they have both esp files. To make it easy though i want to enable and disable the options based on which esp files are active.

 

So in this example below ive got 2 mods im checking for, Jetpacks Unlimited and More Power Armor Mods.

 

What i want to happen in this snippet is if Jetpacks Unlimited esp file is active and More Power Mods is NOT active then enable the option and if Jetpacks Unlimited esp file is active but More Power Mods is also active then disable it (so they are forced in another section to install a combo patch)

<plugin name="Jetpacks Unlimited Patch">
	<description>
		Adds the Jetpacks Unimited Category to the Power Armor station.  PLACE THIS AT THE BOTTOM OF YOUR LOAD ORDER. REQUIRES: Jetpacks Unlimited Master.esp
	</description>
	<image path="fomod\img\options\jet.jpg"/>
	<files>
		<file destination="WIPAG - Jetpacks Unlimited Compatibility Patch.esp" source="Shared\WIPAG - Jetpacks Unlimited Compatibility Patch.esp"/>
	</files>
	<conditionFlags>
		<flag name="Workbench">On</flag>
	</conditionFlags>
	<typeDescriptor> 
		<dependencyType> 
			<defaultType name="CouldBeUsable"/> 
			<patterns> 
				<pattern> 
					<dependencies operator="Or"> 
						<fileDependency file="Jetpacks Unlimited Master.esp" state="Active"/> 
					</dependencies> 
					<type name="Optional"/> 
				</pattern>
				<pattern> 
					<dependencies operator="Or"> 
						<fileDependency file="More Power Armour Mods.esp" state="Active"/> 
					</dependencies> 
					<type name="NotUsable"/> 
				</pattern>
				<pattern> 
					<dependencies operator="Or"> 
						<fileDependency file="Jetpacks Unlimited Master.esp" state="Missing"/>
						<fileDependency file="Jetpacks Unlimited Master.esp" state="Inactive"/> 
					</dependencies> 
					<type name="NotUsable"/> 
				</pattern>
			</patterns> 
		</dependencyType> 
	</typeDescriptor> 
</plugin>

Currently this code enables the option no matter which ones are active and this allows the user to select the incorrect choice (which i want to avoid)

 

Any help on this is appreciated.

 

Here is the entire xml file for reference.

https://pastebin.com/xtZWU6gL

 

The section to look at starts at line 638

Link to comment
Share on other sites

  • 4 weeks later...

<patterns>
<pattern>
<dependencies operator="And">
<fileDependency file="Jetpacks Unlimited Master.esp" state="Active"/>
<fileDependency file="More Power Armour Mods.esp" state="Missing"/>
</dependencies>
<type name="Recommended"/>
</pattern>
<pattern>
<dependencies operator="And">
<fileDependency file="Jetpacks Unlimited Master.esp" state="Active"/>
<fileDependency file="More Power Armour Mods.esp" state="Active"/>
</dependencies>
<type name="NotUsable"/>
</pattern>
<pattern>
<dependencies operator="Or">
<fileDependency file="Jetpacks Unlimited Master.esp" state="Missing"/>
<fileDependency file="Jetpacks Unlimited Master.esp" state="Inactive"/>
</dependencies>
<type name="NotUsable"/>
</pattern>
</patterns>
Link to comment
Share on other sites

  • 1 month later...
        <patterns>
                <pattern>
                    <dependencies operator="And">
                        <fileDependency file="Jetpacks Unlimited Master.esp" state="Active"/>
                        <fileDependency file="More Power Armour Mods.esp" state="Missing"/>
                    </dependencies>
                    <type name="Recommended"/>
                </pattern>
                <pattern>
                    <dependencies operator="And">
                        <fileDependency file="Jetpacks Unlimited Master.esp" state="Active"/>
                        <fileDependency file="More Power Armour Mods.esp" state="Active"/>
                    </dependencies>
                    <type name="NotUsable"/>
                </pattern>
                <pattern>
                    <dependencies operator="Or">
                        <fileDependency file="Jetpacks Unlimited Master.esp" state="Missing"/>
                        <fileDependency file="Jetpacks Unlimited Master.esp" state="Inactive"/>
                    </dependencies>
                    <type name="NotUsable"/>
                </pattern>
          </patterns>

Oh finally someone responded!

 

Thanks so much!!

 

I will try this out as soon as i can.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...