Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ? pretty obviously means I'm not confident. This is just eyeballing models using the 3DSMax script by codeman found here: http://residentevilmodding.boards.net/thread/3146/hdremaster-rev2-tool-script-3dsmax
- Hair is held in nativePC\rom\eq\hair with some exceptions
- Hairstyles 61 and 62 are held in nativePC\rom\dl1\eq\hair (hair0060 and hair0061 respectively)
- For character creation, the game uses nativePC\rom\etc\charaEditRoomPack.arc - a gigantic .arc file, within it is the same structure as if you unpacked all the hair .arcs into the same folder, so charaEditRoomPack\model\pl\hair for the hair .mod and .mrl files, \model\pl\textures for their textures.
- So if you distribute hair arc files, they need to identify which hair they're changing, since it won't show in character creation.
- ARC ID Hairstyle
- hair0000 00 00 Hair 01
- hair0001 01 00 Hair 03
- hair0002 02 00 Hair 16
- hair0003 03 00 Hair 31
- hair0004 04 00 Unused?
- hair0005 05 00 Hair 02
- hair0006 06 00 Hair 04
- hair0007 07 00 Hair 14
- hair0008 08 00 Hair 34
- hair0009 09 00 Hair 25
- hair0010 0A 00 Hair 05
- hair0011 0B 00 Hair 13
- hair0012 0C 00 Hair 07
- hair0013 0D 00 Hair 06
- hair0014 0E 00 Hair 17
- hair0015 0F 00 Hair 21
- hair0016 10 00 Hair 19
- hair0017 11 00 Hair 47
- hair0018 12 00 Hair 37
- hair0019 13 00 Hair 15
- hair0020 14 00 Hair 29
- hair0021 15 00 Hair 09
- hair0022 16 00 Hair 10
- hair0023 17 00 Hair 35
- hair0024 18 00 Hair 36
- hair0025 19 00 Hair 23
- hair0026 1A 00 Hair 30
- hair0027 1B 00 Hair 43
- hair0028 1C 00 Hair 26
- hair0029 1D 00 Hair 39
- hair0030 1E 00 Hair 38
- hair0031 1F 00 Hair 20
- hair0032 20 00 Hair 11
- hair0033 21 00 Hair 22
- hair0034 22 00 Hair 46
- hair0035 23 00 Hair 41
- hair0036 24 00 Hair 44
- hair0037 25 00 Hair 08
- hair0038 26 00 Hair 33
- hair0039 27 00 Hair 48
- hair0040 28 00 Hair 42
- hair0041 29 00 Hair 12
- hair0042 2A 00 Hair 27
- hair0043 2B 00 Hair 24
- hair0044 2C 00 Hair 28
- hair0045 2D 00 Hair 32
- hair0046 2E 00 Hair 18
- hair0047 2F 00 Hair 45
- hair0048 30 00 Hair 52
- hair0049 31 00 Hair 51
- hair0050 32 00 Hair 49
- hair0051 33 00 Hair 55
- hair0052 34 00
- hair0053 35 00
- hair0054 36 00
- hair0055 37 00
- hair0056 38 00
- hair0057 39 00
- hair0058 3A 00
- hair0059 3B 00
- hair0060 3C 00 Hair 61
- hair0061 3D 00 Hair 62
- -----------------
- this is going to be diving into some hex, and I hope it serves as a jumping off point for the hex contained in bbs_rpg. This is also going to be significantly less hand holding than prior ones have been, so if you feel you're missing something, try the model swapping pastebin or the texture editing pastebin.
- Example: http://i.imgur.com/SVOuqRN.jpg Hair 46 + Hair 02 This was originally meant to be 46 + 18 but I misidentified Hair 18 from the models. The hair arc files are NOT in order so you will have to dig to find the ones you want, see above for an extremely incomplete list.
- So, a rough overview of steps we're gonna take and files we're gonna hit first up:
- source hair arc
- target hair arc (result will be target + source, but you've gotta overwrite one of them so we'll call that the target) bbs_rpg\model\pl\parts - h_parts.amr and h_parts.atr
- For our sample we're just gonna retread my steps and merge Hair 46 and Hair 2, so hair0005.arc (2) and hair0034.arc (46)
- First we're going to just grab our internals from our source hair file and mash them into the target file, so this will generally be a .mod, a .mrl, probably a .dwm, and a _BM.tex (_CMM and _NM are generic names between all hair files), so you can basically just copy and paste the model file from your Source .arc into your target .arc and merge as necessary. Then you want to head into your model\pl\hair folder and rename the source folder to something different than it was before, but preferably with the same amount of characters for ease of hex editing later - I renamed hair005 (hairstyle 02) to hair03a. Rename the folder and all the files inside to this new identifier. Hit up your source file's .mrl to update to the new folder name.
- Now head to your .txt file generated for your target .arc, and copy in the lines for the new files from your source .arc, make sure to retype the appropriate ones to match your new folder/file names. For reference, my hair0034.arc.txt looks like so:
- model\pl\textures\hair_NM.tex
- model\pl\textures\hair034_BM.tex
- model\pl\textures\hair005_BM.tex
- model\textures\fs003_BM.tex
- model\pl\textures\hair_CMM.tex
- model\pl\hair\hair034\hair034.mrl
- model\pl\hair\hair034\hair034.mod
- model\pl\hair\hair034\hair034.dwm
- model\pl\hair\hair03a\hair03a.mrl
- model\pl\hair\hair03a\hair03a.mod
- model\pl\hair\hair03a\hair03a.dwm
- Big note here being to make sure you maintain the general order these packers follow, your files are unpacked and loaded into memory and utilized in the same order they're packed - if you pack an .mrl file that references a texture in before the texture, your game will oftentimes crash due to that texture not 'existing' yet. So to keep it short: textures before mrls.
- So repack this file and we've got our new edited .arc file, it's a bit bigger than our old one (583kb vs 286kb) since it's got two hairs worth of data in there, however, it still functions perfectly normally, if you throw it in the game it'll still load Hair 46 just fine. This is where we get into dicey crashy territory.
- ===
- First stop is h_parts.amr over in bbs_rpg\model\pl\parts, this is a file that identifies files and assigns IDs of sorts to them. Open it up in a hex editor and search for the .mod or texture name of your target hair, hair034 (no extension) in our case. Once you find this, you'll find two 4 byte sections preceding it, the first is the hair's ID, in our case it is 22 00 00 00, the second is something I don't particularly understand yet, but it's always either 00 00 00 00 or 01 00 00 00; leave it alone. So once we've found our nice entry, we're going to copy that part (including the preceding 8 bytes and the ending null character, for a total of 0x26 characters (38 in decimal) and paste it again. This will add to the file size, which is generally a no-no in hex editing.
- Once we've got our copy section made, we need to both write a new ID, and change the text to match that alternate name we thought up earlier: in our case as simple as changing the 4 characters to a characters. In my example I changed the ID to 40 00 00 00 - the last hair ID used for player hairs was 3F, so I just added 1. The only imperative here is to make sure it's not an ID used elsewhere in the file.
- ===
- And here's where we depart from stuff that makes a lot of sense! Open up h_parts.atr in your hex editor, and behold that there is no longer any characters for you to really make sense of. But don't worry, we don't have a whole lot we need to do here. We're going to search for the source ID, plus an identifier, so in our case 22 00, and the identifier is 00 0F. So we find 22 00 00 0F, and take a look at the data up to the next value, so what this should look like is:
- 22 00 00 0F 00 00 00 00 00 00 00 00 01 00 00 00 22 00 00 00
- Splitting this into 4 byte ranges, first is the ID + identifier, two null ranges, a quantity marker, and then the ID of the file to override and actually load. This is an odd duck, despite the game assigning the ID to the hair via the name of the file, this actually overrides that earlier determination and can load an entirely different file, so if you change that 22 00 00 00 to 40 00 00 00, it'll load your source hair instead of the target. But we want both of them, so we need to hit that quantity marker. You want to change that marker to 02 00 00 00 and then ADD four bytes to this segment, and write in your new ID you just made in the .amr file there. So our new line should look like:
- 22 00 00 0F 00 00 00 00 00 00 00 00 02 00 00 00 22 00 00 00 40 00 00 00
- And that's it, we're done with that file. There is another identifier down below (22 00 00 10), but it does not seem necessary to change or harass.
- Now simply back up your original hair.arc, your bbs_rpg.arc, and slide in your newly repacked replacement. In game your hairstyle should be changed. Note that you should also probably make the changes in your hair files in rom\etc\charaEditRoomPack.arc since that's what is often used for character creation files instead of the in game ones. It's hard to redistribute with that change made since that file is 107mb, but considering the game will be looking for files that don't exist via that .arc file, it's probably important.
Advertisement
Add Comment
Please, Sign In to add comment