GandaG / pyfomod

A high-level fomod library written in Python.
https://pyfomod.rtfd.io/
Apache License 2.0
7 stars 6 forks source link

Expose requiredInstallFiles #14

Open voidshard opened 1 year ago

voidshard commented 1 year ago

Reading in CBBE the info.xml clearly indicates a requiredInstallFiles folder

But the final files() call to installer doesn't return "00 Required (Slim)" as one of the to-be-installed folders.

Interestingly it is in installer.files() before any options are chosen -- is this how one knows it is in "requiredInstallFiles"? Perhaps the root object / installer should expose required_files too?

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://qconsulting.ca/fo3/ModConfig5.0.xsd">
        <moduleName>Caliente&apos;s Beautiful Bodies Enhancer -CBBE-</moduleName>
        <moduleImage path="FOMod\CBBE.png"/>
        <requiredInstallFiles>
                <folder source="00 Required (Slim)" destination="" />
        </requiredInstallFiles>
        <installSteps order="Explicit">
                <installStep name="Base Options">
                        <optionalFileGroups order="Explicit">
                                <group name="Body Shape" type="SelectExactlyOne">
                                        <plugins order="Explicit">
                                                <plugin name="Slim">
                                                        <description>
                                                                <![CDATA[Choose this option if you want to use the slim body shape. Affects the other options as well.]]>
                                                        </description>
                                                        <image path="FOMod\Slim.jpg"/>
                                                        <conditionFlags>
                                                                <flag name="bSlim">On</flag>
                                                        </conditionFlags>
                                                        <files>
                                                                <folder source="== Installer ==" destination="" priority="0"/>
                                                        </files>
                                                        <typeDescriptor>
                                                                <type name="Optional"/>
                                                        </typeDescriptor>
                                                </plugin>
                                                <plugin name="Curvy">
                                                        <description>
                                                                <![CDATA[Choose this option if you want to use the curvy default shape. Affects the other options as well.]]>
                                                        </description>
                                                        <image path="FOMod\Curvy.jpg"/>
                                                        <conditionFlags>
                                                                <flag name="bCurvy">On</flag>
                                                        </conditionFlags>
                                                        <files>
                                                                <folder source="01 Curvy" destination="" priority="0"/>
                                                        </files>
                                                        <typeDescriptor>
                                                                <type name="Optional"/>
                                                        </typeDescriptor>
                                                </plugin>
                                                <plugin name="Vanilla Shape">
                                                        <description>
                                                                <![CDATA[The CBBE body, shaped to conform closely to the proportions of the vanilla female body - with a few adjustments. Affects the other options as well.]]>
                                                        </description>
                                                        <image path="FOMod\Vanilla.jpg"/>
                                                        <conditionFlags>
                                                                <flag name="bVanilla">On</flag>
                                                        </conditionFlags>
                                                        <files>
                                                                <folder source="02 Vanilla" destination="" priority="0"/>
                                                        </files>
                                                        <typeDescriptor>
                                                                <type name="Optional"/>
                                                        </typeDescriptor>
                                                </plugin>
                                        </plugins>
                                </group>
[...]

Source www.nexusmods.com/skyrim/mods/2666?tab=files&file_id=1000170527

GandaG commented 1 year ago

Sorry but I'm not understanding what is wrong. requiredInstallFiles belongs in ModuleConfig.xml and not Info.xml. Info does not have an associated "official" schema as far as I know but ModConfig definitely does, so whatever people put in Info is up to the mod managers to decide to use or not.

Is the problem that the installer does not check for these files? That the writer ignores this node?

voidshard commented 1 year ago

I guess I expect the Installer object to return all files one needs to install the mod, but requiredInstallFiles are omitted -- so even after I run through the installer & choose all valid options I still have to add required files

GandaG commented 1 year ago

Are the requiredInstallFiles being overwritten somewhere in the config? The installer will only show you the highest priority files to install, so you don't have to sort that out yourself. Can you show me the output after running through the above installer? Both the unit tests and my local tests show no issues...