wrye-bash / wrye-bash

A swiss army knife for modding Bethesda games.
https://wrye-bash.github.io
GNU General Public License v3.0
455 stars 79 forks source link

FOMOD Error - Mod Author believes there is nothing wrong with the FOMOD script #674

Closed m0lz closed 5 months ago

m0lz commented 5 months ago

Fallout 4

Wrye Flash nightly build in use.

Try this Mod = https://www.nexusmods.com/fallout4/mods/61884

Download the main file, and try to install it using FOMOD

You will see scripting error issues.

The author however is happy that the script works fine in MO2 and Vortex, so he believes Wrye Bash is broken, and is stubbornly resisting trying to help with the issue (even to the point of burying the posts I made about it).

m0lz commented 5 months ago

Sorry should have posted this earlier, the error received is as follows ..

"The ModuleConfig.xml file used to specify the FOMOD installer for this package does not conform to the FOMOD specification. This should be reported to and fixed by the mod author. Please share the error log shown below with them as well. You can use the "Copy Log" button to easily copy it.

This warning can also be turned off globally via "Settings > Validate FOMODs", but be aware that by doing so, Wrye Bash may fail to install or incorrectly install invalid packages.

Line 63, column 0: Element 'typeDescriptor': This element is not expected. Expected is one of ( files, conditionFlags ). XML Path: /config/installSteps/installStep[2]/optionalFileGroups/group[1]/plugins/plugin[1]/typeDescriptor

Line 83, column 0: Element 'typeDescriptor': This element is not expected. Expected is one of ( files, conditionFlags ). XML Path: /config/installSteps/installStep[2]/optionalFileGroups/group[2]/plugins/plugin[1]/typeDescriptor"

Which led me to believe the author had not written the fomod script as per fomod specification. However the author is adament that Wrye Bash is wrong.

Utumno commented 5 months ago

Well we might be erring but this needs to wait for 313 dev - thanks for the report!

m0lz commented 5 months ago

In case the author decides to stealth update the files with a change or two and the issue is lost due to not being able to reproduce it, here is the ModuleConfig.xml in a zip

ModuleConfig.zip

The original mod file has been constructed as a Wrye Bash compatibe Complex BAIN structure

Screenshot 2023-12-20 213022

Infernio commented 5 months ago

We are definitely not erring, if WB says the file does not conform to the FOMOD schema, then it doesn't conform to the schema. Doesn't matter if it works anyway (and it will probably work anyway, that typeDescriptor thing is quite common and is caused by some FOMOD generator not conforming to the schema IIRC), all WB is reporting is that that XML file fails to validate against the official FOMOD XML schema.

All this validation was added specifically because the Vortex guys requested it btw, so Vortex should definitely be complaining as well.

You can read more about all this here: https://modding.wiki/en/vortex/developer/mod-installer-repair

Infernio commented 5 months ago

To elaborate, the exact problem is that the schema defines a plugin as having the following children:

  1. Required: A description element of type string.
  2. Optional: An image element of type image.
  3. Required: A files element of type fileList.
  4. Optional: A conditionFlags element of type conditionFlagList (this may also occur before the files element).
  5. Required: A typeDescriptor element of type pluginTypeDescriptor.

Source: https://github.com/GandaG/fomod-schema/blob/dd86bbe2ada6f126378dea13d3ec29364da05c3f/ModuleConfig.xsd#L267

In the ModuleConfig you provided, the first three and last two plugins are correct:

<plugin name="Core Files"> 
    <description>Far Object LOD Improvement Project (FOLIP) adds missing LOD models for objects that don't currently have them. This improves visuals and eliminates pop-in of objects at very little performance cost.</description> 
    <image path="images\banner.jpg" /> 
    <files> 
        <folder source="000 Core Files" destination="" priority="0" /> 
    </files> 
    <typeDescriptor> 
        <type name="Required"/> 
    </typeDescriptor> 
</plugin> 

Note that the children match what I described above.

However, the fourth and fifth plugins are incorrect:

<plugin name="I will use TexGen"> 
    <description>Select this option if you will use TexGen to generate the correct textures.</description> 
    <image path="images\TexGen.png" /> 
    <typeDescriptor> 
        <type name="Optional"/> 
    </typeDescriptor> 
</plugin> 

Note the required files element being missing. That is why the validation fails and the warning is shown. Simply adding an empty files element should be enough to fix it:

<plugin name="I will use TexGen"> 
    <description>Select this option if you will use TexGen to generate the correct textures.</description> 
    <image path="images\TexGen.png" />  
    <files/> 
    <typeDescriptor> 
        <type name="Optional"/> 
    </typeDescriptor> 
</plugin> 
m0lz commented 4 months ago

Thank you @Infernio Will give the author a link to your fix advice.