Guide:FOMOD/InfoXML

From Step Mods | Change The Game
< Guide:FOMOD
Revision as of 04:10, December 16, 2022 by TechAngel85 (talk | contribs)
Delta c.png

FOMOD Guide

Info.xml Reference

by: Step Modifications and community  | Forum Topic

Info.xml File

Navigate to this file, which was created earlier in the Guide, and open it with a text editor. The first thing to do is change the programming language and encoding for the file for proper syntax highlighting, if not already set.

Set the Language to XML and the Encoding to UTF-16. FOMOD scripts should always be written and saved with UTF-16 encoding or issues may arise. This is due to the XML declaration specifying UTF-16.

Now the document itself needs to be declared as a XML document and the root only element is placed. The root element for the info.xml script is: <fomod>
It is always easier to open and close tags at the same time to ensure the closing tag is not forgotten; causing the script to fail. The script for the declaration and root element look as such:

<?xml version="1.0" encoding="UTF-16"?>
<fomod>

</fomod>

Finish the script by adding the fomod element's children. These children elements hold information mod managers use to display to users. The information is placed between the opening and closing tags of each child element. There is no formatting available, therefore, the text will usually display is inputted. The elements are defined as such:

  • Name : this is the name of the mod and will be the initial name used by the mod manager for installation
  • Author : this is the name of the author(s) for the mod
  • ID : this is the ID of the mod, which may only be used by Vortex (unknown)
  • Version : this is used to display the version of the mod. Be sure the MachineVersion attribute matches that of text for the version
    This element requires updating every time the mod increments version numbers!
  • Website : this element holds the website link to the mod. Mod managers will typically display this as a clickable link.
  • Groups : the Groups element is a parent element to the element element.
    • element : within these children elements is where the categories are defined that the mod fits into. Nexus Mods categories are most commonly used.
  • Description : this element holds the description of the mod. This can be anything the mod author wishes, but is best to add a meaningful description of the mod.

Add each element listed above to the info.xml' script. Remember that capitalization matters if the tag format is changed! The text placed between the opening and closing tags is what will be displayed to users.

<?xml version="1.0" encoding="UTF-16"?>
<fomod>
   <Name>My Mod Name</Name>
   <Author>Author01, Author02, Author03</Author>
   <Id>xxxx</Id>
   <Version MachineVersion="1.0">1.0</Version>
   <Website>https://www.LinkToModPage.com/</Website>
   <Groups>
      <element>Models and Textures</element>
      <element>Patches</element>
      <element>My Category</element>
   </Groups>
   <Description>
<![CDATA[
My mod's beautiful, short description.

Changes this release:
- Fixed some issues with the Patches
- Updated FOMOD installer

Thanks for downloading and remember to endorse, if you enjoy it!]]>
   </Description>
</fomod>

Once complete, this concludes the info.xml script. Be sure to save before exiting!