Jump to content

NMM Installation script help


lumps

Recommended Posts

Howdy,

 

I'm planning on implementing a NMM installation script to streamline the installation of the optionals for a mod I've been working on, but I've run into a wall with regards to how to make the actual script. Through looking at other mods which use scripts, I've seen a common structure with a "fomod folder" and some .xml files, and after a few google searches I found how to make an installer script with the Fallout Mod Manager. Unfortunately, since I don't own fallout, I can't seem to use that program.

 

So here I am, throwing myself of the mercies of the Nexus modders, seeking aid in my quest to end the "you mod makes my game crash" comments I get when people don't read my description page for installation instructions...

 

Any and all help is greatly appreciated!

 

-lumps

Link to comment
Share on other sites

  • 8 months later...

All you need for a basic scripted install is a ModuleConfig.xml located at \root~\fomod\ in your archive. These all start with the following lines:

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://qconsulting.ca/fo3/ModConfig5.0.xsd">
<moduleName>Mod Name Goes Here</moduleName>
<installSteps order="Explicit">

 

The website related data shown there may not be necessary so long as you start with a <config> tag; I haven't personally tested. The basic syntax of these xml documents is <open parameters>stuff</close> and all tags must be closed. Some tags can be closed in the opening tag by adding a backslash at the end of the tag like so: <tag parameters/>

 

Next you must define each install step. An install step is basically each visible page during the installation process. The last one will have a "Finish" button and each page leading up to it will instead have a "Next>" button.

<installStep name="Merged or Modular">

 

Then define a group. Each group is a number of selections appearing in the left hand column. The name parameter places a bolded name over the group of options. The type paramater defines how many options may be selected within that group. "SelectExactlyOne", "SelectUpToOne", and "SelectAny" are the three viable parameters that I'm aware of but there may be more.

<optionalFileGroups>
	<group name="Merged or Modular" type="SelectExactlyOne">

 

Finally define plugins (each individual option).

<plugins order="Explicit">
	<plugin name="Novice">

 

Each plugin must contain one of two sub-tags, either a file or a flag. I believe they also must contain the typeDescriptor though the only type I've come across is "Optional". They may also contain additional sub-tags such as an image or description. Here's an example plugin that installs no files itself, it only uses a flag to determine which set of installation options users see from that install step onwards:

<plugin name="Merged">
	<description>
		<![CDATA[installs Balanced Magic as a single plugin.]]>
	</description>
	<conditionFlags>
		<flag name="Merged">On</flag>
	</conditionFlags>
	<typeDescriptor>
		<type name="Optional"/>
	</typeDescriptor>
</plugin>

 

Here's another example of a plugin that installs files:

<plugin name="Adept">
	<description>
		<![CDATA[60% combat magicka regen 2.6x dual cast damage 2.4x dual cast cost -51% spell cost at skill level 100]]>
	</description>
	<files>
		<folder source="00 Merged\Adept" destination="" priority="0"/>
	</files>
	<typeDescriptor>
		<type name="Optional"/>
	</typeDescriptor>
</plugin>

 

I haven't found a way to specify one specific file within a directory so keep in mind that NMM will copy over everything contained inside of the directory you point it to.

 

For reference purposes here's a whole ModuleConfig.xml that first determines whether you want to install a mod I've been working on in modular or merged format, then asks which difficulty of the merged version or exactly which of 3 difficulty plugins and any combination of the 5 supplemental plugins you'd like to install if you choose modular format.

 

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://qconsulting.ca/fo3/ModConfig5.0.xsd">
<moduleName>Balanced Magic v1.32</moduleName>
<installSteps order="Explicit">
	<installStep name="Merged or Modular">
		<optionalFileGroups>
			<group name="Merged or Modular" type="SelectExactlyOne">
				<plugins order="Explicit">
					<plugin name="Merged">
						<description>
							<![CDATA[installs Balanced Magic as a single plugin.]]>
						</description>
						<conditionFlags>
							<flag name="Merged">On</flag>
						</conditionFlags>
						<typeDescriptor>
							<type name="Optional"/>
						</typeDescriptor>
					</plugin>
					<plugin name="Modular">
						<description>
							<![CDATA[installs Balanced Magic in a modular format allowing you to pick and choose what features you want.]]>
						</description>
						<conditionFlags>
							<flag name="Modular">On</flag>
						</conditionFlags>
						<typeDescriptor>
							<type name="Optional"/>
						</typeDescriptor>
					</plugin>
				</plugins>
			</group>
		</optionalFileGroups>
	</installStep>
	<installStep name="Merged">
		<visible>
			<flagDependency flag="Merged" value="On"/>
		</visible>
		<optionalFileGroups order="Explicit">
			<group name="Novice, Adept or Master" type="SelectExactlyOne">
				<plugins order="Explicit">
					<plugin name="Novice">
						<description>
							75% combat magicka regen U+000A 2.8x dual cast damage U+000D 2.2x dual cast cost -55% spell cost at skill level 100
						</description>
						<files>
							<folder source="00 Merged\Novice" destination="" priority="0"/>
						</files>
						<typeDescriptor>
							<type name="Optional"/>
						</typeDescriptor>
					</plugin>
					<plugin name="Adept">
						<description>
							<![CDATA[60% combat magicka regen 2.6x dual cast damage 2.4x dual cast cost -51% spell cost at skill level 100]]>
						</description>
						<files>
							<folder source="00 Merged\Adept" destination="" priority="0"/>
						</files>
						<typeDescriptor>
							<type name="Optional"/>
						</typeDescriptor>
					</plugin>
					<plugin name="Master">
						<description>
							<![CDATA[45% combat magicka regen
2.2x dual cast damage
2.6x dual cast cost
-46% spell cost at skill level 100]]>
						</description>
						<files>
							<folder source="00 Merged\Master" destination="" priority="0"/>
						</files>
						<typeDescriptor>
							<type name="Optional"/>
						</typeDescriptor>
					</plugin>
				</plugins>
			</group>
		</optionalFileGroups>
	</installStep>
	<installStep name="Modular">
		<visible>
			<flagDependency flag="Modular" value="On"/>
		</visible>
		<optionalFileGroups order="Explicit">
			<group name="Novice, Adept or Master" type="SelectExactlyOne">
				<plugins order="Explicit">
					<plugin name="Novice">
						<description>
							<![CDATA[75% combat magicka regen
2.8x dual cast damage
2.2x dual cast cost
-55% spell cost at skill level 100]]>
						</description>
						<files>
							<folder source="01 Modular\Novice" destination="" priority="0"/>
						</files>
						<typeDescriptor>
							<type name="Optional"/>
						</typeDescriptor>
					</plugin>
					<plugin name="Adept">
						<description>
							<![CDATA[60% combat magicka regen
2.6x dual cast damage
2.4x dual cast cost
-51% spell cost at skill level 100]]>
						</description>
						<files>
							<folder source="01 Modular\Adept" destination="" priority="0"/>
						</files>
						<typeDescriptor>
							<type name="Optional"/>
						</typeDescriptor>
					</plugin>
					<plugin name="Master">
						<description>
							<![CDATA[45% combat magicka regen
2.2x dual cast damage
2.6x dual cast cost
-46% spell cost at skill level 100]]>
						</description>
						<files>
							<folder source="01 Modular\Master" destination="" priority="0"/>
						</files>
						<typeDescriptor>
							<type name="Optional"/>
						</typeDescriptor>
					</plugin>
					<plugin name="None">
						<description>
							<![CDATA[Do not install a Magicka settings plugin.]]>
						</description>
						<conditionFlags>
							<flag name="null">On</flag>
						</conditionFlags>
						<typeDescriptor>
							<type name="Optional"/>
						</typeDescriptor>
					</plugin>
				</plugins>
			</group>
			<group name="Branches of Magic" type="SelectAny">
				<plugins order="Explicit">
					<plugin name="Destruction">
						<description>
							<![CDATA[Rebalances Destruction Magic from the ground up.]]>
						</description>
						<files>
							<folder source="01 Modular\Destruction" destination="" priority="0"/>
						</files>
						<typeDescriptor>
							<type name="Optional"/>
						</typeDescriptor>
					</plugin>
					<plugin name="Alteration">
						<description>
							<![CDATA[Tweaks and such related to Alteration Magic.]]>
						</description>
						<files>
							<folder source="01 Modular\Alteration" destination="" priority="0"/>
						</files>
						<typeDescriptor>
							<type name="Optional"/>
						</typeDescriptor>
					</plugin>
					<plugin name="Restoration">
						<description>
							<![CDATA[Applys armor penalties to Restoration Magic.]]>
						</description>
						<files>
							<folder source="01 Modular\Restoration" destination="" priority="0"/>
						</files>
						<typeDescriptor>
							<type name="Optional"/>
						</typeDescriptor>
					</plugin>
					<plugin name="Conjuration">
						<description>
							<![CDATA[Applys armor penalties to Conjuration Magic.]]>
						</description>
						<files>
							<folder source="01 Modular\Conjuration" destination="" priority="0"/>
						</files>
						<typeDescriptor>
							<type name="Optional"/>
						</typeDescriptor>
					</plugin>
					<plugin name="Illusion">
						<description>
							<![CDATA[Applys armor penalties to Illusion Magic.]]>
						</description>
						<files>
							<folder source="01 Modular\Illusion" destination="" priority="0"/>
						</files>
						<typeDescriptor>
							<type name="Optional"/>
						</typeDescriptor>
					</plugin>
				</plugins>
			</group>
		</optionalFileGroups>
	</installStep>
</installSteps>
</config>

 

 

Note that the descriptions aren't finalized and I was messing around with getting NMM to display line breaks in the description field (unsuccessfully). Also note the visible and flagdependancy tags (and how the correlate to the first two options). These are used to hide a set of choices or provide two different branches during the guided install.

Edited by MShoap13
Link to comment
Share on other sites

  • 2 months later...

Apparently it is possible to point to an individual file. Here's the line from a mod that keeps all it's esp's together in a single folder:

 

<file source="esp\Remodeled Armor.esp" destination="Remodeled Armor.esp"/>

 

I've also discovered an additional itemdescriptor type: Required. Plugins of this type are selected by default and cannot be deselected.

Link to comment
Share on other sites

  • 2 months later...

I have this group in my installer:

 

I have the group type set to SelectAny, now is there any way I can make those plugins selected by default?

 

 

 

<group name="ESPs" type="SelectAny">
        <plugins>
                <plugin name="Atronach Flame Armor">
                        <description>
                                Description needs to be added, I'm not sure what this does!
                        </description>
                        <image path=""/>
                        <files>
                                <folder source="06 esp\FlameAtronachArmor.esp" destination=""/>
                        </files>
                        <typeDescriptor>
                                 <type name="Optional"/>
                        </typeDescriptor>
		</plugin>
		<plugin name="Full Boot for KKSA">
			<description>
				Description needs to be added, I'm not sure what this does!
			</description>
			<image path=""/>
			<files>
				<folder source="06 esp\FullBootForKKSA.esp" destination=""/>
			</files>
			<typeDescriptor>
				<type name="Optional"/>
			</typeDescriptor>
		</plugin>
		<plugin name="Heavy Falmer Weight Fix">
			<description>
				Description needs to be added, I'm not sure what this does!
			</description>
			<image path=""/>
			<files>
				<folder source="06 esp\NordicSkaalHeavyFalmerWeightFix.esp" destination=""/>
			</files>
			<typeDescriptor>
				<type name="Optional"/>
			</typeDescriptor>
		</plugin>
	</plugins>
</group>

 

 

Edited by EbrithilUmaroth
Link to comment
Share on other sites

Maybe try "Default" instead of "Optional" in the TypeDescriptor.

 

If that doesn't work, and you can find a scripted install that does what you want it to do (SMIM may) take a look at it's install script and see if you can't figure it out from there. :thumbsup:

Link to comment
Share on other sites

  • 1 year later...

@MShoap13

If you mean that you want line breaks in the description I think you can simply use <![CDATA["DESCRIPTION"]]> and then add the HTML line break(<br/>) and it should work.

I didn't test it but i hope this helps you ;)

Link to comment
Share on other sites

  • 9 months later...

hey guys ive recently started a mod on fallout 4 and i was wondering if you guys could help me out. i did computer science for half a year but i we didn'nt learn much other than simple html code and python but its been more than a year and ive totally forgot everything.

 

Ps im totally new to modding but i wish to get better please help me :D

Link to comment
Share on other sites

  • Recently Browsing   0 members

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