Jump to content

Making a mod package: Difference between revisions

general touch-up; btw, "PC" is not an OS, "MacOS" is not an OS ;-)
m (→‎Mod_Info.cfg: tweaks)
(general touch-up; btw, "PC" is not an OS, "MacOS" is not an OS ;-))
Line 1: Line 1:
__TOC__
__TOC__


== Package format 2.0 ==
The Anniversary Edition comes with a set of mods in the "package" format. This new framework also allows modders to make third-party mods that will install easily into the Edition. You can start your package by copying an existing AE package and modifying it to save time.


=== Mods ===
==Package format 2.0==
The [[AEI]] 2 prefers the new 2.0 package format, but will also read 1.1 packages.


To create a new mod package from scratch, follow these [[seven]] easy steps:
1. Open up your AE/install/packages/ folder.
----
2. Create a new folder with a name corresponding to your mod. No spaces, please. The five digit number in front corresponds to where in the load order you want your mod to be. Please, leave some space between your mod and other AE mods. See [[Anniversary Edition/Framework#Package numbering|HERE]] to know how to number your mod.
----
3. Create (or copy) a config file named "Mod_Info.cfg" inside your new folder (see section "Mod_Info.cfg" below).
----
4. If you have .oni files, make a folder named "oni" inside your package folder. If you have .bsl files, make a folder named "bsl" inside the package folder. If you have XML patches (.oni-patch files), make a folder named "patches" inside the package folder.
----
5. Make a folder called "common" inside the oni/, bsl/, or patches/ folders if your mod will work on both Windows and Mac OS X. Make a folder called "win_only" or "mac_only" if you have files intended for only one platform or if certain files need to be in one format for Windows and one for OS X.
----
6. If your mod modifies the global data in level0_Final, make a "level0_Final" folder inside "oni" or "patches". For every level that your mod uses, make a "levelX_Final" folder inside "oni" (level1_Final, level2_Final, etc...). However, a BSL mod uses the names of the IGMD subfolders the script(s) will go into, e.g. a script that is meant for Chapter 1 goes in "bsl/EnvWarehouse/".
----
7. Put the appropriate types of files inside their respective levelX_Final/ directories. Check the section "Folder structure" below to make sure you did it right!
'''Special note''': Be very careful when replacing (not adding) M3GM, TRAC and OBAN. With TRAC, you must include all of the children of the TRAC you are adding. With M3GM, you must also include the file that references the M3GM. With OBANs, you need to include the AKEV that links to them.
===Mods===
==== Mod_Info.cfg ====
==== Mod_Info.cfg ====
  AEInstallVersion -> 2.0
  AEInstallVersion -> 2.0
Line 15: Line 34:
  Readme -> Improves the appearance and mechanics of existing Oni weapons. \n \n Currently contains...
  Readme -> Improves the appearance and mechanics of existing Oni weapons. \n \n Currently contains...


=====Explanation of fields=====
;Explanation of fields
Entries marked with an asterisk ('''*''') are only used if the mod is not yet listed on the {{OMD}}. Otherwise, the [[AEI]] will display the versions of those fields that are found on the Depot's node for that mod.
Entries marked with an asterisk ('''*''') are only used if the mod is not yet listed on the {{OMD}}. Otherwise, the AEI will display the versions of those fields that are found on the Depot's node for that mod.


; '''AEInstallVersion'''
; '''AEInstallVersion'''
Line 46: Line 65:


==== Folder structure ====
==== Folder structure ====
Compared to the folder structure of AEI1.1-packages AEI2 packages have one additional level of folders within the /oni and /bsl folder to allow for one mod-package to support both platforms. So if a mod contains sounds for PC and MacOS you just put the OS-dependent files within the appropriate folder in either win_only or mac_only.
Compared to the folder structure of AEI 1.1 packages, AEI 2.0 packages have one additional level of folders within the oni/ and bsl/ folders to allow one mod package to support both platforms. So if a mod contains sounds for Windows and Mac OS X, you put the OS-specific files within the appropriate folder, win_only/ or mac_only/. Furthermore, we now have the ability to add XML patches. Those have to go to the appropriate folder within patches/.
Furthermore we now have the ability to add XML patches. Those have to go to the apropriate folder within /patches.


  12345ExampleMod(.zip)
  12345ExampleMod(.zip)
     / Mod_Info.cfg
     Mod_Info.cfg
     / oni
     oni/
         / common
         common/
             / level''#''_Final
             level''#''_Final/
                 / ...
                 *.oni
         / win_only
         win_only/
             / level''#''_Final
             level''#''_Final/
                 / ...
                 *.oni
         / mac_only
         mac_only/
             / level''#''_Final
             level''#''_Final/
                 / ...
                 *.oni
     / patches
     patches/
         / common
         common/
             / level''#''_Final
             level''#''_Final/
                 / ...
                 *.oni-patch
         / win_only
         win_only/
             / level''#''_Final
             level''#''_Final/
                 / ...
                 *.oni-patch
         / mac_only
         mac_only/
             / level''#''_Final
             level''#''_Final/
                 / ...
                 *.oni-patch
     / bsl
     bsl/
         / common
         common/
             / tctf_ii
             tctf_ii/
                 / ...
                 *.bsl
         / win_only
         win_only/
             / tctf_ii
             tctf_ii/
                 / ...
                 *.bsl
         / mac_only
         mac_only/
             / tctf_ii
             tctf_ii/
                 / ...
                 *.bsl


Folders without content can be left out, so a basic mod with only level0-.oni-files for MacOS only will look like this:
Folders without content can be left out, so a basic mod with only level 0 .oni files for Mac OS X only will look like this:
  / 12345ExampleMod
  12345ExampleMod
     / Mod_Info.cfg
     Mod_Info.cfg
     / oni
     oni/
         / mac_only
         mac_only/
             / level0_Final
             level0_Final/
                 / myFile.oni
                 myFile.oni


=== Tools ===
=== Tools ===
==== Mod_Info.cfg ====
==== Mod_Info.cfg ====
  AEInstallVersion -> 2.0
  AEInstallVersion -> 2.0
Line 103: Line 120:
  IconName -> Tools/MyIcon.png
  IconName -> Tools/MyIcon.png


=====Explanation of fields=====
;Explanation of fields
Entries marked with an asterisk ('''*''') are only used if the mod is not yet listed on the {{OMD}}, otherwise the AEI will display the version of those fields that is found on the mod's Depot node.
Entries marked with an asterisk ('''*''') are only used if the mod is not yet listed on the {{OMD}}, otherwise the AEI will display the version of those fields that is found on the mod's Depot node.


Line 132: Line 149:
; '''WorkingDir'''
; '''WorkingDir'''
: Specify the working directory for the executable specified by ''ExeName''. Can be either one of:
: Specify the working directory for the executable specified by ''ExeName''. Can be either one of:
:: ''Base'' - Working directory is the Edition folder (assumed by default)
:: ''Base'' - Working directory is the AE/ folder (assumed by default)
:: ''Exe'' - Working directory is the folder where the executable is located
:: ''Exe'' - Working directory is the folder where the executable is located
:: ''GDF'' - Working directory is the GameDataFolder
:: ''GDF'' - Working directory is GameDataFolder/


; '''IconName'''
; '''IconName'''
: Path to an icon for the tools menu. Must be in PNG format and between 16x16 and 32x32 in size. If not specified, no icon will be used.
: Path to an icon for the AEI Tools menu. Must be in PNG format and between 16x16 and 32x32 in size. If not specified, no icon will be used.


==== Folder structure ====
==== Folder structure ====


  00000OniSplit(.zip)
  00000OniSplit(.zip)
     / Mod_Info.cfg
     Mod_Info.cfg
     / plain
     plain/
         / common
         common/
             / Tools
             Tools/
                 / Onisplit.exe
                 OniSplit.exe
         / win_only
         win_only/
         / mac_only
         mac_only/
 
The folder ''/plain'' is for files not related to mods. Files/folders within "plain/$platform/" are relative to the base folder of the Edition, so the example would put the file in "$VanillaOni/Edition/Tools/Onisplit.exe" on both platforms.


== Package format 1.1 ==
The folder ''plain/'' is for files not related to mods. Files/folders within "plain/[platform]/" are relative to the base folder of the AE, so the example would put the file in "$VanillaOni/AE/Tools/OniSplit.exe" on both platforms.


The Anniversary Edition comes with a set of mods in the "package" format. This new [[Anniversary Edition/Framework|framework]] also allows modders to make third-party mods that will install easily into the Edition. You can start your package by copying an existing AE package and modifying it to save time, but in any case you'll need to learn how a package is made:
==Package format 1.1==
 
===Mod_Info.cfg===
 
  AEInstallVersion -> 1.1
1. Open up your Edition/install/packages folder.
----
2. Create a new folder with a name corresponding to your mod. No spaces, please. The five digit number in front corresponds to where in the load order you want your mod to be. Please, leave some space between your mod and other AE mods. See [[Anniversary Edition/Framework#Package numbering|HERE]] to know how to number your mod.
----
3. Create (or copy) a config file named "Mod_Info.cfg" inside your new folder.
 
Sample:
 
  AEInstallVersion -> 1.1
  NameOfMod -> Improved Weapons
  NameOfMod -> Improved Weapons
  ModVersion -> 1.1
  ModVersion -> 1.1
Line 174: Line 180:


:;'''AEInstallVersion'''
:;'''AEInstallVersion'''
:What version of the Installer is needed to read this package. There are two significant releases of the Anniversary Edition Installer (AEI): 1.0 and 1.1. If you make a new package at this point, you should just set its AEInstallVersion to 1.1 to be safe. Following, for the sake of thorough documentation, are the functional package-handling differences between the versions:
:What version of the Installer is needed to read this package (choices are 1.0 and 1.1). 1.0 is [[wikipedia:deprecated|deprecated]], but for the sake of thorough documentation, here are the functional package-handling differences between the versions:
::1.0 (Edition 2009-07): Initial release.
::1.0 (Edition 2009-07): Initial release.
::1.1 (Edition 2010-05):
::1.1 (Edition 2010-05):
:::*Now supports BSL mods. This means that the HasBSL flag now works. See step 7.
:::*Now supports BSL mods. This means that the HasBSL flag now works. See step 7.
:::*No more division of level0_Final into level0_Character, level0_Textures, etc., and no more need for a double-path like level1_Final/level1_Final. See step 5. The 1.0 package hierarchy still works, however.
:::*No more division of level0_Final into level0_Character, level0_Textures, etc., and no more need for a double-path like level1_Final/level1_Final. See step 5.
:::*ModString is now deprecated in place of ModVersion.
:::*ModString is now deprecated in place of ModVersion.
:::*Supports floating-point version numbers, like "ModVersion -> 1.1".
:::*Supports floating-point version numbers, like "ModVersion -> 1.1".
Line 205: Line 211:


Flags not documented here are currently ignored by the Installer.
Flags not documented here are currently ignored by the Installer.
----
4. If you have .oni files, make a folder named "oni" inside your package folder. If you have .bsl files, make a folder named "bsl" inside the package folder.
----
5. If your mod modifies the global data in level0_Final, make a "level0_Final" folder inside "oni". For every level that your mod uses, make a "levelX_Final" folder inside "oni". (level1_Final, level2_Final, etc...) New levels are currently not detected.
----
6. A BSL mod uses the names of the IGMD subfolders the script(s) will go into, e.g. a script that is meant for Chapter 1 goes in bsl/EnvWarehouse/.
----
7. Put levelX (anything but level0) .oni files inside their respective levelX_Final/ directories.


You are done!  Sample mod directory:
You are done!  Sample mod directory:
Line 226: Line 224:
::level18_Final
::level18_Final
:::BINACJBOCharacter.oni
:::BINACJBOCharacter.oni
----
'''Special Notes'''
*Be very careful when replacing (not adding) M3GM and TRAC, they can be a bit touchy. With TRAC, you must include all of the children of the TRAC you are adding. With M3GM, you must also include the file that references the M3GM. Whenever possible, copy the files from packages\Globalize instead of the default Oni files.
*New ONCCs should have this inside the ONCP:
            <ONCPParticle>
                <Name>glass_break</Name>
                <Type>glass_break</Type>
                <BodyPart>-1</BodyPart>
            </ONCPParticle>
:If they do not, they will not be able to break glass when a user installs the glass-breaking AE mod.