- Romulator (11 Oct 2015)
Importing models from HPL2 to HPL3 is not a complex process but will involve needing to “convert” textures to a format that HPL3 understands. There are some problems which you may face, and this tutorial is here to try and tackle some of the errors and give you a basic idea of importing models from Amnesia: The Dark Descent and Amnesia: A Machine For Pigs.
Please refrain from importing these models and releasing the entirety of them. By following this tutorial, it is assumed you have a legally purchased copy of Amnesia: The Dark Descent and/or Amnesia: A Machine For Pigs. While I cannot stop you from performing these steps, please consider some respect for the modellers and their works by purchasing the games.
Converting HPL2 Textures to HPL3
Not too long ago, Frictional released the Amnesia: The Dark Descent Asset Pack, giving us the wealth of A:TDD assets to use in HPL3, which is great news if you are an Amnesia modder looking to venture into the (albeit, semi-scary) world of HPL3 scripting. However, if you are planning on making a mod that doesn’t involve underwater stations and bloodthirsty anglerfish, then you’ll probably be pulling assets from Penumbra and Machine for Pigs as well.
When loading a Machine for Pigs asset (for example) into the HPL3 Model Viewer, you’ll likely be confronted with this:
Static Objects are arguably, very easy to import. It is more or less just a copy and paste of the static_objects you require in question into SOMA's static_objects folder. For the sake of examples, I will use mansionbase, since mansionbase is probably the most common.
Create a new folder in your SOMA's static_objects directory and call it amnesia. If you are using Steam on a Windows system, this is the directory you should be making:
C:\Program Files (x86)\Steam\steamapps\common\SOMA\static_objects\amnesia
Paste any Amnesia static_object folder(s) into there. In my particular case, I have only added mansionbase, thus I have this layout right now.
That should be it! However, some static_objects may not work correctly; for example, their texture may not appear in the editor or in game. Check out the troubleshooting heading below for how to fix those kinds of problems!
Entities are imported by a similar method to static_objects, however there is an additional step. For this example, I will use the furniture > bath model from Amnesia: A Machine For Pigs.
Create a new folder in your SOMA's entities directory and call it amnesia. If you are using Steam on a Windows system, this is the directory you should be making:
C:\Program Files (x86)\Steam\steamapps\common\SOMA\entities\amnesia
Paste any Amnesia entity folder(s) into there. In my particular case, I have enemies and the furniture, thus I have this layout right now. Within furniture, I have the bath entity. Just like the static objects however, you may have problems with textures loading incorrectly, check the troubleshooting below.
Now because you are dealing with entities, you can specify the behaviour it has. You can define if you can grab the entity, push it, make it an item or even into an enemy (with no animations).
To get started, open it up with the Model Editor. You can do this by running the Model Editor from the SOMA folder and using File > Open to open the .ent file of the imported model(s). For this particular example, I opened the bath model.
In the top left corner, click Entity settings > Class. It will load up a window similar to the one in the next image.
To show off what you can do to any entity in the game, I decided to make the bath a prop_grab. Which means, I can hold the bath like if it were a chair in SOMA. I also added the bloody bath model to show that I cannot grab it (because it is a StaticProp object, which, most entities will be by default when imported).
Then I created a terrible map to test it with. Notice how I have both Amnesia: The Dark Descent mansionbase static objects and Amnesia: A Machine For Pigs entities?
Then I tested the map and I have a bath which I can lift with one hand, and one I cannot lift at all.
And that's how you import Entities into the game! Have fun!
Import the enemies just like in the entity tutorial above until you get to the Model Editor step. Load up the enemy. You may get a prompt when loading up the enemy. Just press OK and you should be good to go. In the case of Amnesia's notorious Servant Brute, we will load it up and be greeted by this.
Load up the Class prompt by clicking Entity Settings > Class. For now, change the Class to Agent_Infected_Robot as it is the closest class to the Brute's (and the grunt for that matter) behaviour. If you are importing one of the suitors from Justine, to keep them blind, use the Agent_Puppet class.
In the bottom, click on the gears, then in the bottom left corner, click Edit Animations. We will get a window like this:
SOMA does not use all of these animations. It uses only a few of them. What we have to do is show SOMA where these animations can be found. Using the Entity > Class window, scroll down to CharMover and expand the tab. Fill it with the animation entries as they appear on the right side - case sensitive. And if you want, and understand how head turning works, you can try editting the options below.
Just make sure to include them in your mod in some way. The filename of the model has to match the “mesh filename” which you can see in the Level Editor, which should be okay if you don't suddenly change the file names. Make sure the folder you put the assets in is referenced in the resources.cfg file.
This will generically be caused by one of two things:
This is a problem caused by the meshes of some Amnesia: A Machine For Pigs models. I do not know if these problems will persist in HPL3, but if it does, the simplest way is to delete the .msh and the .anm files if there are any included with that particular model. That will generate a new .msh file which HPL3 can recognise.
If you have any questions or face other problems, please, feel free to start a thread in SOMA's Development support forum, or drop a Personal Message to Romulator on the forum. I may not be able to solve all problems, but if I cannot, I'll just ask you create a thread.