Difference between revisions of "HPL2/AMFP/Introduction"

From Frictional Wiki
< HPL2‎ | AMFP
Jump to navigation Jump to search
(→‎Modding MFP: rewrite)
(Some rewrites for better readability)
Line 1: Line 1:
[https://en.wikipedia.org/wiki/Amnesia:_A_Machine_for_Pigs Amnesia: A Machine for Pigs] was developed by [https://en.wikipedia.org/wiki/The_Chinese_Room The Chinese Room], and as such has no official documentation. However, since it works like a Full Conversion mod for TDD (but redistributed with an altered .exe and shaders), it has been reverse-engineered by the community. Being technically almost identical to TDD, MFP only requires documenting the changes between it and its predecessor. This page lists the documentation of all found changes. Due to these reasons, most of the documents written for TDD still apply.
+
[https://en.wikipedia.org/wiki/Amnesia:_A_Machine_for_Pigs Amnesia: A Machine for Pigs], developed by [https://en.wikipedia.org/wiki/The_Chinese_Room The Chinese Room], has no official documentation.
 +
 
 +
Being technically almost identical to TDD, MFP only requires documenting the changes between it and its predecessor. This page lists all found differences.
 +
 
 +
{{note|Due to the above reasons, majority of the documentation written for TDD also applies to MFP.}}
 +
 
  
 
===Contributing===
 
===Contributing===
  
''Almost all the information about MFP was reverse engineered by examining the existing map files (via text editors) and existing scripts files. If you wish to contribute, you can look for undocumented things in the same vein.''
+
Almost all of the information about MFP was reverse engineered by examining the existing map, entity and script files in text editors. If you wish to contribute, you can look for undocumented things in the same vein.
  
 
==Tools==
 
==Tools==
Line 12: Line 17:
 
The original TDD tools are available [[HPL2/Tools|here]]. Install them in the same way, but in the MFP directory.
 
The original TDD tools are available [[HPL2/Tools|here]]. Install them in the same way, but in the MFP directory.
  
'''If you install the community version, no further steps are required. This is the recommended method.'''
+
It is recommended to download the community version tools because these include the fixes described in the "Patching the original editors" section.
 +
 
 +
{{warning| MFP is missing the SDL.dll file which the editors use. If you have TDD, just copy it from there to the main MFP folder. Otherwise, download the 32 bit version from [https://www.libsdl.org/download-1.2.php the official website].}}
 +
 
 +
===Patching the original editors===
  
 
If you decide to use the original editors:
 
If you decide to use the original editors:
The TDD editors can't load certain MFP assets. To make the TDD tools load MFP files properly, you will need to mod them with [https://www.frictionalgames.com/forum/thread-56724.html custom config files]. These files fill in the missing new features, and allow for all files to be loaded without errors. Simply drag the new files into your MFP folder and replace all files when prompted.
 
  
'''Note:''' the custom config files include hints made by the community. These are not official and lack parts which couldn't be deducted from the files.
+
The TDD editors can't load certain MFP assets. To make the TDD tools load MFP files properly, you will need to mod them with [https://www.frictionalgames.com/forum/thread-56724.html custom config files]. Simply drag the new files into your MFP folder and replace all files when prompted.
  
{{warning| MFP is missing the SDL.dll file which the editors use. If you have TDD, just copy it from there to the main MFP folder. Otherwise, download the 32 bit version from [https://www.libsdl.org/download-1.2.php the official website].}}
+
'''Note:''' the custom config files include hints made by the community. These are not official and lack information which couldn't be deducted from the files.
  
 
===Known issues / solutions===
 
===Known issues / solutions===
  
'''Issue:''' LevelEditor crashing when the /enemies entity folder is picked.
+
'''Issue:''' LevelEditor crashing when the <code>/enemies</code> entity folder is picked.
  
*'''Solution:''' Find the folder and delete all .msh files. These files are cache, and as such, don't hold anything important. They will be regenerated by the game.
+
*'''Solution:''' Find the folder and delete all <code>.msh</code> files. These files are cache, and as such, don't hold anything important. They will be regenerated by the game.
  
'''Issue:''' LevelEditor displays lights in a weird way.
+
'''Issue:''' Level Editor displays lights in a weird way.
  
*'''Solution:''' None. Unfortunately, the LevelEditor seems to have a portion of the TDD shaders hardcoded into it. This means that they cannot be fixed.
+
*'''Solution:''' None. Unfortunately, the Level Editor seems to have a portion of the TDD shaders hardcoded into it. This still needs to be fixed in the community tools.
  
 
==Modding MFP==
 
==Modding MFP==
Line 35: Line 43:
 
===Custom Stories===
 
===Custom Stories===
  
You can use [http://www.mediafire.com/file/d3bp2k67fqbrf2l/mfp-with-custom-stories.zip/file the CS version of MFP]. As per the license of the source code it was compiled from, you need to copy the license file if you redistribute the .exe file. Alternatively, you can link that download for your players to download separately.
+
You can use [http://www.mediafire.com/file/d3bp2k67fqbrf2l/mfp-with-custom-stories.zip/file the version of MFP which enables Custom Stories]. As per the license of the source code it was compiled from, you need to copy the license file if you redistribute the <code>.exe</code> file. Alternatively, you can just link that file for your players to download on their own.
  
If you use it, Custom Stories in MFP work exactly the same as in TDD. Same restrictions apply, however remember that MFP is missing some features when compared to TDD (e.g. allowing the player to access the inventory).
+
If you use this method, Custom Stories in MFP work exactly the same as in TDD. The same limitations still apply (e.g. no custom lantern). Additionally, remember that MFP is missing some features when compared to TDD (e.g. allowing the player to access the inventory).
  
 
{{note|This is the recommended way of modding MFP at the moment.}}
 
{{note|This is the recommended way of modding MFP at the moment.}}

Revision as of 13:29, 14 October 2021

Amnesia: A Machine for Pigs, developed by The Chinese Room, has no official documentation.

Being technically almost identical to TDD, MFP only requires documenting the changes between it and its predecessor. This page lists all found differences.

Note icon.png Due to the above reasons, majority of the documentation written for TDD also applies to MFP.


Contributing

Almost all of the information about MFP was reverse engineered by examining the existing map, entity and script files in text editors. If you wish to contribute, you can look for undocumented things in the same vein.

Tools

There are no officially available tools for MFP. However, MFP files can be viewed and edited using modded TDD tools.

Installation

The original TDD tools are available here. Install them in the same way, but in the MFP directory.

It is recommended to download the community version tools because these include the fixes described in the "Patching the original editors" section.

Alert icon.png Warning: MFP is missing the SDL.dll file which the editors use. If you have TDD, just copy it from there to the main MFP folder. Otherwise, download the 32 bit version from the official website.

Patching the original editors

If you decide to use the original editors:

The TDD editors can't load certain MFP assets. To make the TDD tools load MFP files properly, you will need to mod them with custom config files. Simply drag the new files into your MFP folder and replace all files when prompted.

Note: the custom config files include hints made by the community. These are not official and lack information which couldn't be deducted from the files.

Known issues / solutions

Issue: LevelEditor crashing when the /enemies entity folder is picked.

  • Solution: Find the folder and delete all .msh files. These files are cache, and as such, don't hold anything important. They will be regenerated by the game.

Issue: Level Editor displays lights in a weird way.

  • Solution: None. Unfortunately, the Level Editor seems to have a portion of the TDD shaders hardcoded into it. This still needs to be fixed in the community tools.

Modding MFP

Custom Stories

You can use the version of MFP which enables Custom Stories. As per the license of the source code it was compiled from, you need to copy the license file if you redistribute the .exe file. Alternatively, you can just link that file for your players to download on their own.

If you use this method, Custom Stories in MFP work exactly the same as in TDD. The same limitations still apply (e.g. no custom lantern). Additionally, remember that MFP is missing some features when compared to TDD (e.g. allowing the player to access the inventory).

Note icon.png This is the recommended way of modding MFP at the moment.

Full Conversion

MFP doesn't support passing a custom config file as an argument to the executable file, so until someone ports that feature, you can use this little hack to create FC mods.

You can download the FC mod template here. It is crucial to have experience with TDD full conversions before trying it with MFP.

The download only features a Windows start script, but it can be remade for other operating systems. The rest of the template stays the same for all systems.

Since MFP doesn't support passing a custom config file as an argument to the executable file, the script does something else. When the mod is ran, the script renames the original folder into "config_original" and the specified folder (e.g. "config_YourMod") to "config". When the game gets closed, these changes are reverted.

Alert icon.png Warning: Do not alter the main config files when the game is running! This will cause issues.

If the game crashes, you might need to rename the folders manually. Including this information with your user manual for the mod might be a good idea.

Almost all information about TDD Full Conversions applies to MFP FCs. It is recommended to use the same asset folder names as the base game (e.g. "sounds"), as some assets might not work otherwise. Keep in mind that adding new assets while the game is running might not take effect until rebooting it.