This is a tutorial for duplicating enemies on a map. This is specifically for story mode. I'll be using s107 as example (which is the second level in chapter 2-2, called "The Mines"). First of all some basics of the most important files we'll be dealing with... The files which defines all the enemies, items and scripting for a stage is in the soft/ directory. You can ignore everything else. There's 3 sets of files we'll mostly be looking at: -s107_em##.15302ef4 - These contains all of the important info about each enemy on a stage: where they spawn, their health, enemy type, goto coordinates, what weapon they have and a bunch of stuff. Having this file alone in a stage won't actually make enemies appear though, they need some kind of script spawning them (although it technically is possible to force enemies to spawn by toggling the value after the health value, but we don't want many enemies to spawn literally right when the stage starts). -Various files in FSM/ - I have no idea what FSM stands for, but you'll find all the scripts for stages here, including the scripts which is responsible for spawning enemies. Unfortunately, the naming varies greatly. But if you see any files with "em" in the filename, then chances are it deals with enemy spawning. Some scripts (usually in a directory called fix, or with fix in the filename) are loaded and functions by themselves, but many scripts requires a trigger zone. Which leads us to the third type of file... -s107_fsm.65b275e5 - This contains a list of trigger zones and links them to various scripts. It works in a very simple way, once the player is in that zone, the game activates that script. So just remember that hierarchy. Trigger zone links to scripts, and scripts links to em## files. It is possible to skip 2 of the links in rare examples as I mentioned above, but for the most part you'll have to deal with all 3. Em files are the most important, and here's a brief quick look at one... (by the way, I'm using HxD as hex editor, you can download it here: http://mh-nexus.de/en/hxd/) [image1] What's hightlighted is one full enemy definition. It always starts just before the 2 strings called "cSetInfoEm10" and "uEm10". Speaking of which, those 2 quite simpy define the enemy type. cSetInfoEm10 means some kind of majini, and uEm10 defines the subset (uEm10 is town majini, uEm11 is female towm majini, uEm12 is village majini and etc). You can find more info about these types in this text file: http://www.tzarsectus.com/RE5/txt/enemy-types.txt [image2] That's the spawn position of the enemy. It's always 12 bytes long (which makes it very easy to spot since there's very few values that long inside em files). It consists of 4 bytes which give you the X, Z and Y coordinates. Although you don't have to bother with that. If you're using wilsonso's trainer, you can replace the spawn coordinate of specific enemies very easily. Keep his trainer running and click the "Copy XZY in HEX" button and then paste that info over the spawn position, then that enemy's new spawn position is where you had Chris standing while you pressed the "copy xzy" button. If you see a second value for an enemy, that's most probably the "goto" value. That controls where the enemy will move after spawning. [image3] This is the health value for an enemy. It's also easy to spot because it's always directly below the scale value which looks like "00 00 80 3F 00 00 80 3F 00 00 80 3F". If you want to convert this to decimal, start the Windows calculator, switch to hex mode, and input the number in *reverse* order (this is important) and then switch back to decimal mode. In this case, "E8 03" = 3E8 = 1000. [image4] This is the weapon the enemy is carrying. It's always defined by the first byte, so ignore the "01 07" part of the value. In this case, the enemy is not carrying any weapon so it shows as "00". If you want to switch it around, you can give him "50" for adze, or "52" for bowgun, or other weapons. You can see a full list of weapons which majini can use here: http://www.tzarsectus.com/RE5/txt/enemy-compatible-weapons.txt [image5] This value defines what model variation the enemy should have. In most cases where you mod stages, you won't have to bother with this one. But when duplicating enemies, it's a bad thing if they end up looking identical. I don't have a list of all of the model variations, but one important thing to remember is if you replace this with "FF FF FF FF" then the enemy will get a random model variation. By the way, by default nearly every enemy in mercenaries have random model variations. But most enemies in story mode have specific appearances. That's all of the specific parts of enemy info I'll highlight. For even more information, you can read through all of the reference info I've written down here: http://www.tzarsectus.com/RE5/txt/enemy-types.txt - I'm not sure how much of it is easy to read, but once you've got the basics down it should hopefully be possible to go through. Now then, let's get back to actually duplicating enemies. One tricky part is figuring out where each em is actually used on the map. One way of figuring it out, is moving away most em files from a stage and then playing through it, and noting where enemies spawn and do not spawn. This is a time consuming process, but it is helpful mapping out where the enemies are. [image6] [image7] After a quick test, I notice the 2 enemies in em00 spawn very early in the level there, so I'm gonna try to duplicate those (I'll duplicate them 2 times, so we get 6 enemies in total). Finding the spawn scripts for these is pretty easy, since it's simply called "emset00". I'll just explain the process step by step: -Duplicate em00 twice (copy and paste it in the same directory), and rename the new files to something new. I'm choosing em10 and em11 since those are the first unused em## by the stage. -Duplicate emset00 2 times. I'm naming them simply emset00b and emset00c. Now then, the duplicated files still link to em00 so we have change that. Open emset00b and look at the end of the file. If you look closely, you should see a pattern where "1E 00 00 00 01" is repeated several times with various values. The value we're looking has 12 bytes between it and 1E. Here's an example: [image8] The byte just after the one I've highlighted is the one we're after, it's simply "00" since it's linking to 00. We want this to link to em10 instead. Since we're dealing with hex, that means "0A". Just do this process for every "1E" you see in this list. It's for every enemy in the em file (which is only 2). Once you're done, it should look like this: [image9] Do the same for emset00c, but change those values to 0B instead, so it links to em11. And there's one more thing we have to do in the emset scripts, to make sure the new triggers will link to these new scripts. Select search->replace and replace the text string "em00" with "em00b" inside emset00b. This will change the name of this script to em00b. Click yes when the editor complains about changing the filesize (by the way, as a general rule of thumb, when editing values NEVER change the size of the file, otherwise the game will crash. But it's always safe to change the size of text strings). Do the same in emset00c but change "em00" with "em00c" instead of "em00b" -Now onto the trigger zone file (s107_fsm), duplicate this file 2 times and rename the 2 variants anything (I'm going with s107_fsm_b and s107_fsm_c). Now we have to edit the files so they link to the new scripts. We'll do this with the same replace process we just did with the emset00 files. Replace "em00" with "em00b" in the first fsm file, and replace "em00" with "em00c" in the second fsm file. And that's it! Now start the game to confirm those 2 enemies have been duplicated. It should look like this: [image10] [image11] As you can see it worked, but the duplicated enemies looks... well, duplicated. To make them more unique, just go change the new em files using the information about em files in the first part of this tutorial as reference. The process I've explained should be possible to use for nearly every enemy in the entire game. It is unfortunately time consuming, but on the bright side it does work. There's one more trick I'll explain as the end for this tutorial. You can use the template here for a different way of adding enemies: [template] That file has 30 enemies which will always spawn instantly on the map without any spawn scripts. So you can use as a method for adding a few enemies to the start of the map. If you want less than 30 enemies, you'll have to delete parts of the file (remember that enemy definitions end with the 2 bytes "B4 42"). And you'll have to change one byte which defines how many enemies there in the file. At the start of the first enemy definition, you'll see the bytes "03 00 01 00 B2". Just before that is a byte with the value "1E", that's the value you have to change. 1E means 30, so you just change this to whatever amount the template got after changing it. By the way, the limit for amount of em files in a stage is 32 (em00->em31), so keep that in mind. That's it! Hopefully this will be helpful to some people. I'm working on a project myself to change all story mode stages into a no mercy themed variant, but it's a very very big project for one person to do so if anyone wants to help, let me know.