Jump to content


Photo
Skyrim

FOMOD Validator (by Ganda)

fomod validator

  • Please log in to reply
21 replies to this topic

#1 Ganda

Ganda

    Thane

  • Mod Authors
  • PipPipPipPipPipPip
  • 375 posts

Posted 20 April 2016 - 09:33 PM

FOMOD Validator

Validate your FOMOD installers.

Overview

This little app allows you validate and check for common errors in your FOMOD installers. Simply place the path to your package (the source files) and press Ok and, according to your selections, it will provide with your results. Simple, easy and effective.

Download

Get either the latest stable release or, for the more daring, the bleeding edge release.

Installation

  • Extract the folder within to a location of your choice;
  • Run the "FOMOD Validator" executable.

Changelog

 

You can find the latest changelog here.

 

More Info

 

You can find more info at Github´╗┐ (source code) or Nexus´╗┐.


Edited by Ganda, 08 June 2016 - 09:55 AM.

  • 1

#2 TechAngel85

TechAngel85

    Akatosh

  • Administrators
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 11,279 posts

Posted 20 April 2016 - 09:53 PM

Is this basically just an XML validator or is it designed specifically with FOMODs in mind?



#3 Ganda

Ganda

    Thane

  • Mod Authors
  • PipPipPipPipPipPip
  • 375 posts

Posted 20 April 2016 - 09:55 PM

Specifically FOMODs. I made (updated) the old xml schema so it should validate properly. It also gives you a few warning about missing source files/folders and repeating some tags.


  • 0

#4 TechAngel85

TechAngel85

    Akatosh

  • Administrators
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 11,279 posts

Posted 20 April 2016 - 10:11 PM

Next question. Which mod manager was in mind when this was designed? I ask because MO's FOMOD management is far better than that of NMM's. MO will often skip right over errors and keep on doing it's thing while NMM will halt the installation completely on just about any error. MO may have some more features coming to it in the future, as well, that will not be in NMM (unless they adopt them). One such feature is a workaround for the issue of running FOMODs which check for specific plugins after a user has ran Mator Smash and those plugins aren't there anymore because they've been merged.

 

Also be aware that MO was a bug in it right now that affects the condition flags: https://github.com/T...izer/issues/299 The issue has been fixed. Tannin just needs to wrap it up into an update and push it out, but he's solely focused on MO2 right now. So even if users have the right code, they could still run into issues with MO when it comes to conditional flags.


Edit: Fixed the link.



#5 Ganda

Ganda

    Thane

  • Mod Authors
  • PipPipPipPipPipPip
  • 375 posts

Posted 20 April 2016 - 10:14 PM

The validation is based on NMM's/MO-External validation - it takes order and some other little things into account that MO-Internal simply ignores. The warnings part covers the duplicate parts. But still, if you're producing a mod, you should take care that it works in all installers. (If you really want MO-Internal only checks, uncheck the "validate" box)

 

However, if there is need for a MO-Internal only validation, I can work on it, it shouldn't take long.


  • 0

#6 TechAngel85

TechAngel85

    Akatosh

  • Administrators
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 11,279 posts

Posted 20 April 2016 - 10:25 PM

No need for it on my end. I write a lot of FOMODs and make sure when I design them they work in both NMM and MO. I don't design specifically to MO. The only one that is MO specific, atm, is the installer for the STEP Patches. That's simply because STEP only supports MO as a mod manager. I've never even tested that installer in NMM nor do I care it if works or not with NMM. NMM can not be used for a STEP installation so I don't even bother with it for that manager. All others I write (for various users upon request) and upkeep (The Ruffled Feather and Weapon & Armor Fixes) will work with all mod managers.

 

In short, I see no need for MO specific anything. I was just curious. The feature I spoke of above may not ever come to pass since Tannin is solely focused on MO2.


I'll test this out on a couple of my FOMODs that I know are good and then on one that I know needs a few updates to see how it works.



#7 TechAngel85

TechAngel85

    Akatosh

  • Administrators
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 11,279 posts

Posted 20 April 2016 - 11:02 PM

I've tested this a bit and it seems to be pretty good. It said a known good FOMOD is good...which is good. :^_^:

 

I also caught a few issues with the source file paths in another one that I was unaware of, but in my defense that FOMOD is 8110 lines long. My largest ever and hopefully...never again. :wacko:

 

I was curiously that it didn't pick up on one error that MO likes to spit out which is:

"PluginName"  is the only plugin specified in group  "GroupName"  which requires selection of exactly one plugin

 

In such cases, authors have used "SelectExactlyOne" for the group type and only specified a single option for that group. I usually fix this by changing the type to "SelectAny" so that MO will not complain. Is skipping this error intentional or are you not checking for such things?

 

I would also suggest to have the app save the last browsed folder location and have it open it back up by default instead of defaulting to the same location every time the app runs. Would make it a less of a hassle to navigate to test every time you make a fix to test.



#8 TechAngel85

TechAngel85

    Akatosh

  • Administrators
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 11,279 posts

Posted 20 April 2016 - 11:10 PM

Wooohooo! I broke it for you! You're welcome! ::D:
 

Error information:
Version: 1.0.0.5
<class 'lxml.etree.XMLSyntaxError'>: Opening and ending tag mismatch: folder line 16 and requiredInstallFiles, line 17, column 25
  File "fomod\mainframe.py", line 55, in accepted
  File "fomod\validator\validate.py", line 29, in validate
  File "src\lxml\lxml.etree.pyx", line 3427, in lxml.etree.parse (src\lxml\lxml.etree.c:80041)
  File "src\lxml\parser.pxi", line 1782, in lxml.etree._parseDocument (src\lxml\lxml.etree.c:116235)
  File "src\lxml\parser.pxi", line 1808, in lxml.etree._parseDocumentFromURL (src\lxml\lxml.etree.c:116585)
  File "src\lxml\parser.pxi", line 1712, in lxml.etree._parseDocFromFile (src\lxml\lxml.etree.c:115473)
  File "src\lxml\parser.pxi", line 1115, in lxml.etree._BaseParser._parseDocFromFile (src\lxml\lxml.etree.c:110170)
  File "src\lxml\parser.pxi", line 573, in lxml.etree._ParserContext._handleParseResultDoc (src\lxml\lxml.etree.c:103644)
  File "src\lxml\parser.pxi", line 683, in lxml.etree._handleParseResult (src\lxml\lxml.etree.c:105298)
  File "src\lxml\parser.pxi", line 613, in lxml.etree._raiseParseError (src\lxml\lxml.etree.c:104207)

To produce this error is was testing to see if it would recognize missing characters in the code. I changed

<folder source="000 Core" destination=""/>

to

<folder source="000 Core" destination="">

 
 
Took out the slash. It broke. :^_^:
 
EDIT:
Really it says what it's missing but it's not saying that in a pretty little message box. Just the error. I could use the error to figure out what is wrong, but new users would not be able to determine from that error what is missing.
 
EDIT2:
Love the "Nobody panic!" title. :thumbsup:
 
EDIT3:
Same thing if you forget to close a quote ("...") and just leave it ("...).

Error information:
Version: 1.0.0.5
<class 'lxml.etree.XMLSyntaxError'>: Unescaped '<' not allowed in attributes values, line 48, column 8
  File "fomod\mainframe.py", line 55, in accepted
  File "fomod\validator\validate.py", line 29, in validate
  File "src\lxml\lxml.etree.pyx", line 3427, in lxml.etree.parse (src\lxml\lxml.etree.c:80041)
  File "src\lxml\parser.pxi", line 1782, in lxml.etree._parseDocument (src\lxml\lxml.etree.c:116235)
  File "src\lxml\parser.pxi", line 1808, in lxml.etree._parseDocumentFromURL (src\lxml\lxml.etree.c:116585)
  File "src\lxml\parser.pxi", line 1712, in lxml.etree._parseDocFromFile (src\lxml\lxml.etree.c:115473)
  File "src\lxml\parser.pxi", line 1115, in lxml.etree._BaseParser._parseDocFromFile (src\lxml\lxml.etree.c:110170)
  File "src\lxml\parser.pxi", line 573, in lxml.etree._ParserContext._handleParseResultDoc (src\lxml\lxml.etree.c:103644)
  File "src\lxml\parser.pxi", line 683, in lxml.etree._handleParseResult (src\lxml\lxml.etree.c:105298)
  File "src\lxml\parser.pxi", line 613, in lxml.etree._raiseParseError (src\lxml\lxml.etree.c:104207)

EDIT4:
And this is from missing an equal sign ( = ):

Error information:

Version: 1.0.0.5
<class 'lxml.etree.XMLSyntaxError'>: Specification mandate value for attribute path, line 47, column 19

File "fomod\mainframe.py", line 55, in accepted
File "fomod\validator\validate.py", line 29, in validate
File "src\lxml\lxml.etree.pyx", line 3427, in lxml.etree.parse (src\lxml\lxml.etree.c:80041)
File "src\lxml\parser.pxi", line 1782, in lxml.etree._parseDocument (src\lxml\lxml.etree.c:116235)
File "src\lxml\parser.pxi", line 1808, in lxml.etree._parseDocumentFromURL (src\lxml\lxml.etree.c:116585)
File "src\lxml\parser.pxi", line 1712, in lxml.etree._parseDocFromFile (src\lxml\lxml.etree.c:115473)
File "src\lxml\parser.pxi", line 1115, in lxml.etree._BaseParser._parseDocFromFile (src\lxml\lxml.etree.c:110170)
File "src\lxml\parser.pxi", line 573, in lxml.etree._ParserContext._handleParseResultDoc (src\lxml\lxml.etree.c:103644)
File "src\lxml\parser.pxi", line 683, in lxml.etree._handleParseResult (src\lxml\lxml.etree.c:105298)
File "src\lxml\parser.pxi", line 613, in lxml.etree._raiseParseError (src\lxml\lxml.etree.c:104207)

Okay...I'll stop now.



#9 TechAngel85

TechAngel85

    Akatosh

  • Administrators
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 11,279 posts

Posted 20 April 2016 - 11:26 PM

Okay, I think I broke it enough for one day. Actually, that's some good error handling. You can at least find where the issue is (around) from the messages. In Notepad++, the line count is off. In the last one I posted above, it's actually on line 46 according to Notepad++. Actually, all the errors are on the previous line than what it's saying (again, according to Notepad++).



#10 Ganda

Ganda

    Thane

  • Mod Authors
  • PipPipPipPipPipPip
  • 375 posts

Posted 21 April 2016 - 04:08 PM

I was curiously that it didn't pick up on one error that MO likes to spit out which is:
In such cases, authors have used "SelectExactlyOne" for the group type and only specified a single option for that group. I usually fix this by changing the type to "SelectAny" so that MO will not complain. Is skipping this error intentional or are you not checking for such things?
 
I would also suggest to have the app save the last browsed folder location and have it open it back up by default instead of defaulting to the same location every time the app runs. Would make it a less of a hassle to navigate to test every time you make a fix to test.


I've tested as many combinations as I could think of and the only thing I got was a warning in MO's log :/ Could you send me a file that gives that error?
 

I would also suggest to have the app save the last browsed folder location and have it open it back up by default instead of defaulting to the same location every time the app runs. Would make it a less of a hassle to navigate to test every time you make a fix to test.


Sure, if you send me the file above today I'll get it done right after.
 

Took out the slash. It broke. :^_^:

 
Took care of that already. You're having waayyy too much fun breaking this! :p
 

Okay, I think I broke it enough for one day. Actually, that's some good error handling. You can at least find where the issue is (around) from the messages. In Notepad++, the line count is off. In the last one I posted above, it's actually on line 46 according to Notepad++. Actually, all the errors are on the previous line than what it's saying (again, according to Notepad++).


It complains wherever it can't read anymore, which depends on the error. I redirect people to W3Schools for xml syntax, couldn't think of a better place.

So everything except the MO error and the start path location for the button is done, here.


  • 0

#11 TechAngel85

TechAngel85

    Akatosh

  • Administrators
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 11,279 posts

Posted 21 April 2016 - 05:00 PM

I'll be home soon and will send you what you need. Actually the MO error can be seen with the Soul Gems Differ mod. It's one installer I've been needing to update.

#12 TechAngel85

TechAngel85

    Akatosh

  • Administrators
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 11,279 posts

Posted 21 April 2016 - 08:27 PM

Soul Gems Differ. Using MO's own FOMOD installer (not the external one), you will see the errors. This has been helpful to me in the past. Though MO does skip past things that NMM won't so I have to test in both.



#13 Ganda

Ganda

    Thane

  • Mod Authors
  • PipPipPipPipPipPip
  • 375 posts

Posted 21 April 2016 - 08:43 PM

MO does throw a few errors but nothing that stops you from installing. I'm guessing most users are like me and won't even see the log. I honestly don't see the problem, it just seems MO being picky :/

 

4TM7wMg.png


  • 0

#14 TechAngel85

TechAngel85

    Akatosh

  • Administrators
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 11,279 posts

Posted 21 April 2016 - 09:05 PM

You right. I ran it through a XML validator and it doesn't seem to mind either. I have no idea way those error messages were added in.

 

I do know that users will notice them. We get newer users asking about it from time to time. I wouldn't take the time to add those errors in. They're not causing any functional issues.



#15 Ganda

Ganda

    Thane

  • Mod Authors
  • PipPipPipPipPipPip
  • 375 posts

Posted 21 April 2016 - 09:27 PM

Isn't the MO log hidden by default?

 

Well, everything else has been added then, 1.1.0 is building right now:

 

1.1.0 (2016-04-22)
  • Syntax errors are now properly handled.
  • All dialogs now have icons.
  • Added icon to windows executable.
  • Last used package path is now saved for next usage.

Edited by Ganda, 21 April 2016 - 09:32 PM.

  • 0



Also tagged with one or more of these keywords: skyrim, fomod, validator

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users