Section 2: Editing an encounter: Replacing
Most people who want to make level mods, myself included, first got to the "let's open the .entities file" part of the process, saw the unorganized chaos it presented, and backed out.
With our pre-requisite knowledge, perhaps now it won't seem as overwhelming.
We're going to begin editing our first encounter by replacing one single enemy within.
Extract the .entities file of the level of your choice and get all your things in order - having a backup file, knowing where the file to extract them from is alongside which version of the file is the correct one, etc.
Do the music change text to make sure you have everything setup, and refer back to section 1 if you have any difficulties.
Load in the level itself and head to the encounter you wish to edit. This is where meathook will begin to shine as an important level modding tool. First, enable 'notarget' in the console to make life easier, then type in 'mh_active_encounter' to grab the name of the encounter itself. CTRL+F the name of said encounter in your .entities file.
If you know how the specific encounter you've chosen works, it should be easy to line up what you see in game with what the listed steps are in the file.
Now, you might think it's as easy as simply replacing, say, ENCOUNTER_SPAWN_ZOMBIE_TIER_1 with ENCOUNTER_SPAWN_IMP, and it is. Mostly.
But don't forget. The eventdef that spawns a demon not only has the type of demon to spawn, but also which spawn point to use. Refer to the previous section. If you use a spawn point that doesn't support the idAI2 you want it to spawn, the game will crash.
Luckily, this problem is easily solvable, simply add the idAI2 of your desired demon type into the spawn point. The name of an existing idAI2 can be simply found elsewhere in the file, or one can be made by you.
For more documentation on types of eventdefs, please refer to the Event Calls section of this wiki.