FANDOM


This is based on giftfish's original tutorial on the old site.   I have updated it for a for a few developments (such as Autotoc etc).

What you need

Download and install NSIS (Nullsoft Scriptable Install System)

Download and install the HM NSIS Editor This is a graphical front end editor for the script language.

Download sircxyrtyx's standalone AutoTOC.exe

Download WarrantyVoider's/Heff's bink32.dlls.

Process

(1) Create a directory (for example "installer").  In this put:

(A) A copy of your final mod directory (e.g. DLC_MOD_BEARDS)

(B) A bitmap (.bmp) dimensions 314x164 pixels. (e.g. Beards.bmp)  This will go on the installer at the side.

(C) A license.txt file.   This contains a disclaimer.

(D) A directory called Binaries.  In this put the AutoTOC.exe and the bink32.dlls.

(2) Open HM NS Editor.  Create a new empty script.  Copy and paste the sample script below in there.

(3) Go through the script editing anything you need to.   The grey instructions will be ignored by the compiler. I have flagged common places to change with EDIT in the comments. Make sure to double check all files you want are included.

Note the editor will make the instructions colorful to make it obvious what to edit, it will look something like this:

(4) Save the new script in the "installer" folder you just made.

[font color="#19e6e6"](4) Save the script[/font] [u]in the "installer" directory[/u] you just made.

(5) Compile the EXE (green button) and test.  Note if you install it will overwrite your existing files, so remove the master folder from your ME3\DLC directory before testing.

[img style="max-width:100%;" src="http://i.imgur.com/UfnFFAa.png"]

Sample NSIS Script

[spoiler][code];Sample exe installer for ME3 DLC mod


;This line sets the compression to LZMA (7z) better than .zip

SetCompressor /SOLID lzma


;This function means that the user can only install to the correct directory where ME3 is installed.

;(you would be surprised how many users screw this up)

Function .onVerifyInstDir

    IfFileExists "$INSTDIR\Binaries\win32\Masseffect3.exe" PathGood

      Abort

    PathGood:

FunctionEnd


; EDIT - This text defines the name, version and user shown on the start page

!define PRODUCT_NAME "The Shaggy Beard Mod"

!define PRODUCT_VERSION "1.00"

!define PRODUCT_PUBLISHER "MrShaggy"


; NSIS MUI Settings

!include "MUI.nsh"

!define MUI_ABORTWARNING


; EDIT - This defines the icon used for the end package.  Set to default, custom icons can be used.

!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\modern-install-colorful.ico"


; EDIT -This defines the bmp used on the left side of the installer.  Change it to one of your own.

!define MUI_WELCOMEFINISHPAGE_BITMAP "beards.bmp"

!define MUI_UNWELCOMEFINISHPAGE_BITMAP "beards.bmp"


!define MUI_DIRECTORYPAGE_TEXT_TOP "Install Directory"

!define MUI_DIRECTORYPAGE_TEXT_DESTINATION "Confirm your Mass Effect 3 directory"


; Follows is a list of pages that will show

; Welcome page

!insertmacro MUI_PAGE_WELCOME

; License page - link this to your disclaimer/license

!insertmacro MUI_PAGE_LICENSE "License.txt"

; Directory page - user selects the main ME3 directory

!insertmacro MUI_PAGE_DIRECTORY

; Instfiles page - shows the installation progress

!insertmacro MUI_PAGE_INSTFILES

; Finish page

!insertmacro MUI_PAGE_FINISH


; Language files

!insertmacro MUI_LANGUAGE "English"


; MUI Settings end ------


; This next portion defines the the output:

Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"

; EDIT - This is the name of the file.  Note if uploading to Nexus, the nexus server will automatically add the version number.

OutFile "Shaggy_Beard_Mod.exe"

; Setting the fallback default directory as a fallback and then replaces it with the registered directory.

InstallDir "$PROGRAMFILES\Origin Games\Mass Effect 3\"

InstallDirRegKey HKLM "Software\BioWare\Mass Effect 3" "Install Dir"

ShowInstDetails show


;From here on out are the main files to install


Section "MainSection" SEC01


;If a user reinstalls this will overwrite all their old files.

  SetOverwrite on


; EDIT - This is the main DLC directory

  SetOutPath "$INSTDIR\BIOGame\DLC\DLC_MOD_BEARDS\"

  File "DLC_MOD_BEARDS\PCConsoleTOC.bin"


; EDIT - This is the main DLC Cooked directory

  SetOutPath "$INSTDIR\BIOGame\DLC\DLC_MOD_BEARDS\CookedPCConsole"


; EDIT - Core files that should be in every DLC Mod

  File "DLC_MOD_BEARDS\CookedPCConsole\Default.sfar"

  File "DLC_MOD_BEARDS\CookedPCConsole\Default_DLC_MOD_BEARDS.bin"

  File "DLC_MOD_BEARDS\CookedPCConsole\DLC_MOD_BEARDS_INT.tlk"

  File "DLC_MOD_BEARDS\CookedPCConsole\Mount.dlc"


; EDIT - Now list all the files in your mod directory

  File "DLC_MOD_BEARDS\CookedPCConsole\BioD_Beards.pcc"

  File "DLC_MOD_BEARDS\CookedPCConsole\BioD_Beards_100Shaggy.pcc"

  File "DLC_MOD_BEARDS\CookedPCConsole\Soundfile.afc"

  File "DLC_MOD_BEARDS\CookedPCConsole\Textures_DLC_MOD_BEARDS.tfc"

; continue until all your files are listed


;Bink32dlls - this automatically installs the DLC checkers, if they are not already installed.

  SetOutPath "$INSTDIR\Binaries\Win32"

  SetOverwrite try

  File "Binaries\binkw23.dll"

  File "Binaries\binkw32.dll"


;Execute AutoTOCs - Finally this temporarily installs the autotoc, bringing up a message to warn the user, and updating all the TOCs.

  SetDetailsPrint none

  SetOutPath "$INSTDIR\Binaries"

  SetOverwrite On

  File "Binaries\AutoTOC.exe"

  MessageBox MB_OKCANCEL|MB_ICONINFORMATION "Updating TOC.bins" IDOK 0 IDCANCEL End_Install

  DetailPrint "Updating TOCs please wait."

  SetDetailsPrint none

  ExecWait '"$INSTDIR\Binaries\AutoTOC.exe" "$INSTDIR"'

  SetDetailsPrint both

  DetailPrint "TOCs done."

;Deletes the autotoc file when finished

  Delete "$INSTDIR\Binaries\AutoTOC.exe"


End_Install:

SectionEnd


Section -Post

SectionEnd[/code][/spoiler]


Sample Picture - beards.bmp

[spoiler][img style="max-width:100%;" src="http://i.imgur.com/5hjRDxL.png"][/spoiler]


Sample License.txt

[spoiler]Beards Mod  v1.0


[Put any other instructions here]


Compatible with MEHEM v0.5, Thanemod v3, CEM v1.4, JAM, Extended Anderson Conversations, Bonus Power Packs,  Thanemod v2 and Backoff.



TERMS OF USE


You use the Beards Mod ("the Mod") at your own risk. We cannot guarantee the Mod will work in all cases. If you experience any negative consequences, they are your complete responsibility, not ours.


We ask that you don't use any of the the Mod's files or intellectual content in your own works without our prior permission. You may not make money off of the Mod, as we also make no money from it.


Using the Mod implies you accept these terms even if you haven't read them. If you disagree with these terms, you should not use the Mod.  These terms are in conjunction with and do not supercede any terms of Nexus


Mass Effect is the copyright of Bioware EA.[/spoiler]

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.