|
Post by SaiyanHeretic on Apr 6, 2020 7:59:56 GMT 10
MaVeRicK was kind enough to get me started with mod tools, but after reading everything I can find and staring at HxD for a week, my eyes are glazing over.
Let's start with something simple, right? So I'm looking at MaVeRicK's "2nd Run 9mm" mod and trying to learn what he did. Narrowing it down to one zone: crocodiliaarea, since it is exclusive to Leon. In this whole sequence between entering Kendo's Gun Shop and the end of the chase sequence, there are two spawn points for .45 ammo that his mod changes to 9mm. So I've got \crocodiliaarea\leon_common.scn.19 from his mod open in one window and the original \crocodiliaarea\leon_common.scn.19 from the unpacked game files in another.
According to JTeghius Kittius's thread for Item & Character IDs, .45 ammo is 1A and 9mm ammo is 0F. Searching for 1A in the original file returns five hits, but only four hits in the modded file. Between them, three offsets are identical: 86, 37E, and 990 -- so these I disregard. Offset 81C is 1A in the original file and 0F in the modded file. Likewise for offset A9C in the original file and AD0 in the modded file. Near as I can tell, these are the values that were changed to swap the original .45 item spawns to 9mm, because what they have in common is a value change in the 0C column, whereas the identical offsets have the 1A value in different columns -- 06, 0E, and 00 respectively.
Now I've crossreferenced this with something else I know for a fact: there is one spawn point for ink ribbons in this zone. The ID for ink ribbon is 20 and both files return one hit: offset BDC, column 0C. This is what I expected to find, which suggests I'm thinking along the right track.
Does this mean 0C denotes the interactable item spawn? And the other columns are different aspects of the game not relating to inventory? This makes sense for offset 81C, but why the disparity between A9C and AD0? Why aren't they the same offset, like 81C is in both files? Is it a difference between what spawns here on Normal difficulty versus Hardcore? Or have I completely misinterpreted what these values represent?
|
|
|
Post by SaiyanHeretic on Apr 7, 2020 8:13:54 GMT 10
I lieu of anybody offering advice, I'll keep this thread updated with my progress, in case that it is helpful to anybody else just getting started at modding. Today I experimented with simple item replacement. Mod used for supplementary reference: qiuyuewu1987's Weapon and Ammo Overhaul, which was my initial inspiration for wanting to mod RE2R. Experiment #1: Replace the Storage Room Key (ID:0000004D) in the Gas Station with the Sewers Key (ID:000000C2). File Edited: natives\x64\objectroot\scene\scenario\scenariono\gasstation2\item\common.scn.19 Process: This is the only item pickup in the Gas Station and if I did it right, I would be stuck in the Storage Room with the first zombie of the game. Searching common.scn.19 for hex value 4D returned 10 hits, only one of which gave a result in the 0C column. (5AC in the results window, 000005A0 in the main window -- not sure why it works that way.) Based on what I learned yesterday, column 0C is what denotes item pickups. Changed this value to C2 and installed via Fluffy ModManager.
Result: Success! The Sewers Key hung in mid-air roughly at the same position as the Storage Room Key, but it was interactable and revealed its proper name when examined in the Inventory, as it should. Better mods than anything I could hope to create have also left swapped items in this sort of default x/y/z-axis position, so I'm not going to stress about getting it just right. Experiment #2: Replace Wooden Boards (ID:00000021) in RPD with Acid Rounds (ID:00000016).
File Edited: natives\x64\objectroot\scene\scenario\scenariono\rpd\item\common.scn.19 Process: Per the RE Fandom Wiki, there are only eight wood spawns, one board per spawn. Searching for hex value 21 returned 158 hits! I scrolled through the results window and picked out 17 results with the desired value in the 0C column. This is still 9 more than I expected to find, so I had to find a way to identify which were the Wooden Boards. Remembering Experiment #1, the Storage Room Key appeared in this full hex string: 00 00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 4D 00 00 00 FF FF FF FF 00 00 00 00 01 00 00 00. You'll noticed there are A LOT of zeroes. And wouldn't you know it, 8 of my 17 results of searching for 21 appeared in this sort of string. I picked those out, changed the desired values to 16, and installed. Result: Success! Starting from a 2nd Run game, there are three spawns of Wooden Boards that you can find very quickly. (Unlocked infinite ammo weapons makes this much easier to run around checking.) Just like with the Sewers Key, the Acid Round spawns appeared to hang in mid-air when replacing wood that is leaning against a wall. However, for the wood laying flat in that small hall closet near the East Office, the the rounds looked perfectly normal. Experiment #3: Increase the ammo count of my new Acid Round spawns. File Edited: (same as Experiment #2) Process: So, that whole 64-digit hex string is a little intimidating. Three of the values are 01, so I figured one of these had to be the ammo count, right? I randomly picked the third 01 (after the FFs) and changed them to 03 for all eight spawns, because the item model looks like a carrying case of three rounds. Result: Success! I got lucky by picking the correct value to change on the first attempt. It was around this time that I started to get a headache, so I figured that was sufficient progress for today.
|
|
|
Post by SaiyanHeretic on Apr 12, 2020 8:09:10 GMT 10
Current project: Making a spreadsheet to identify every item spawn.
File edited: natives\x64\objectroot\scene\scenario\scenariono\rpd\item\common.scn.19
Experiment #4: Identifying all the Wooden Boards spawns was the natural place to start. There are only eight spawns, all are in RPD, and seven can be found before leaving the first time. Since wood is stackable, I just increased the item count sequentially, then compared my expectation with where they appeared in-game, then adjusted the arrangement in my spreadsheet.
Result: Success! Now to expand this methodology to every other item in the game.
Experiment #5: Do the same as before, but for ink ribbons.
Files edited: natives\x64\objectroot\scene\scenario\scenariono\rpd\item\common.scn.19 objectroot\scene\scenario\scenariono\orphanasylum\item\claire_common.scn.19 objectroot\scene\scenario\scenariono\crocodiliaarea\item\leon_common.scn.19 objectroot\scene\scenario\scenariono\wastewater\item\common.scn.19 objectroot\scene\scenario\scenariono\laboratory\item\common.scn.19 objectroot\scene\scenario\scenariono\laboratoryundermost\item\common.scn.19
Progress: I knew ink ribbons would be an important step, since they only spawn on Hardcore mode, and several replace existing item spawns.
Results: Mixed. Out of 22 spawns throughout the game, I successfully identified 20.
The two I'm stuck on are in the Darkroom (stack x3, replaces Handgun Ammo) and Operators Room (stack x1, replaces Hip Pouch). Searching for "inkribbon" in the decoded text of rpd\item\common.scn.19 returns ten results, and eight of those exactly match the eight that I identified in the RPD. The problem is the remaining two results, because they don't have hex values which correspond to item spawns, like, AT ALL. They're missing whole lines of code compared to the other search results.
I just know this issue is going to pop up again when dealing with other items, so it's a hurdle I have to clear now. Any help would be appreciated!
|
|
|
Post by MaVeRicK on Apr 18, 2020 7:28:27 GMT 10
Hey there, I went through the files & the game trying to identify all ink ribbons and I think I know why you're missing 2. I had a similar problem when I was doing my mod for replacing ammo and archerpz helped me out a lot. 1) First of all, this will help you out a lot into the future: not all items are labeled in the game files, some are labeled and even says their location but not all. (I'll give examples) 2) Not all items are found in the files inside "item" folder, some are inside "fsm" folder 3) This is important: the hex for the item itself isn't the label (I'll try to give examples as well) 4) The hex for pickable items look different than items inside lockers.
Let's take the first Ink Ribbon in the main hall as example: objectroot\scene\scenario\scenariono\rpd\item\common.scnYou will find the line: InkRibbon_Hall ... Item ........ Pick
This is a common thing to see, now pay attention, the part where it says InkRibbon_Hall is just a label and isn't the code for the item itself, the code for the item itself comes a little after "Item" and looks like this in Hex: 20 00 00 00 FF FF FF FF 00 00 00 00 02 00 00 00 20 is the hex value for the Ink Ribbon, Item IDs can be found here thanks to JTeghius Kittius & Crazy Potato. So it will always look like this 20 00 00 00Wooden Boards is 21 so will look like this 21 00 00 0002 is the hex value for quantity, remember this is quantity in hex so use a Dec to Hex converter if you want values higher than 9 and don't know them. For example if I want to change it to 10 it will be 0A 00 00 00 and 20 will be 14 00 00 00So to replace the 2 Ink Ribbons in the Main Hall with 20 wooden boards I replace the line with: 21 00 00 00 FF FF FF FF 00 00 00 00 14 00 00 00
This is usually how it looks for 'pickable' items, however items inside lockers for look differently, like the 3 Ribbon in the Dark Room's locker. You'll find the line: Locker_sm70_100_HandgunB_HardInkribbonand a good ways after you'll find the hex which looks like this: 20 00 00 00 00 00 00 00 03 00 00 00
same as before: 20 00 00 00 is the value for Ink Ribbon. 03 00 00 00 is the value for how many. To replace those 3 Ink Ribbons with 20 wooden boards I replace the line with: 21 00 00 00 00 00 00 00 14 00 00 00
The first example was for a pickable Ribbon, the second was for a ribbon inside a locker. The values that come after the item ID and the amount are for XYZ location & rotation. Weapons hex look different of course because in includes values for the weapon, the parts on it, the ammo type and the ammo amount. I hope this helps a bit.
|
|
|
Post by SaiyanHeretic on Apr 18, 2020 11:27:59 GMT 10
Yeah, that is helpful, thanks!
Are safes and drawers considered "lockers" too, or do they each have their own hex formats?
Also, I thought I found some items in fsm and tried editing them, but never gotten a change to result in-game.
|
|
|
Post by MaVeRicK on Apr 19, 2020 1:45:47 GMT 10
Safes and drawers are like lockers yes.
Remember you'll have to start a new game whenever you want to test new changes, even if these changes are in the sewers or nest.
|
|
|
Post by SaiyanHeretic on Apr 20, 2020 0:47:59 GMT 10
I've been restarting, probably just editing the wrong lines, since I didn't know about the format differences. 2nd Run really helps with that. Speaking of which, how does the game handle key items in different places? Is that what the s02 files are?
Just out of curiousity, has anybody figured out how to change what items can be found inside containers, like the Tin Storage Box, Wooden Box, and Portable Safe?
|
|
|
Post by MaVeRicK on Apr 20, 2020 2:45:53 GMT 10
I've been restarting, probably just editing the wrong lines, since I didn't know about the format differences. 2nd Run really helps with that. Speaking of which, how does the game handle key items in different places? Is that what the s02 files are? Just out of curiousity, has anybody figured out how to change what items can be found inside containers, like the Tin Storage Box, Wooden Box, and Portable Safe? What do you mean key iems in different places. I don't know if you can change the contents inside a box, but u can swap the whole box with something else anyway. The boxes in STARS office for example for MQ11 & LH upgrades have their very own hex values.
|
|
|
Post by SaiyanHeretic on Apr 20, 2020 12:40:58 GMT 10
I've been restarting, probably just editing the wrong lines, since I didn't know about the format differences. 2nd Run really helps with that. Speaking of which, how does the game handle key items in different places? Is that what the s02 files are? Just out of curiousity, has anybody figured out how to change what items can be found inside containers, like the Tin Storage Box, Wooden Box, and Portable Safe? What do you mean key iems in different places. I don't know if you can change the contents inside a box, but u can swap the whole box with something else anyway. The boxes in STARS office for example for MQ11 & LH upgrades have their very own hex values. Oh, I mean how the items like Bolt Cutter and Signal Modulator are in different places depending on whether you're playing 1st Run or 2nd Run.
|
|
|
Post by MaVeRicK on Apr 20, 2020 13:13:22 GMT 10
Each has a separate hex, if there's a label before it'll usually say _2nd or something, if not, you have to trial and error to know which is which.
|
|
|
Post by inquiringmind on Jun 3, 2020 16:58:36 GMT 10
I apologize if this was already shared somewhere. I looked around and couldn't find anyone that mentioned it so I thought I'd post what I did in my game. Between this thread, some other threads, and my own screwing around I figured out how to restore the 3 hip pouches in Hardcore in their original positions. I also made it so that the 8th wooden board from Assisted shows up in Standard/Hardcore. So thank you for the help RE Modding community. Starting with the wooden board - Look in natives\x64\objectroot\scene\scenario\scenariono\rpd\item\common.scn.19. Search for Hex values 21 00 00 00 FF FF FF FF. The second board entry mentions mokuzai Beginner. A little bit down are two lines: A4 13 3E E9 61 96 77 40 B9 94 65 03 64 8B 48 AF 01 00 00 00 FF FF FF FF 01 00 00 01 DC 00 00 00 The 01 determines what difficulty the item can spawn in. I noticed that all of the other boards had 07 in that spot so I changed it and that made it work. Now the 8th board that shows up in the Reception area on Assisted will show up on Standard and Hardcore too. I also noticed ink ribbons are always set to 04. I can't say for certain what the values are, but I believe 01 = Assisted only, 03 = Assisted and Standard, 04 = Hardcore only, and 07 = Assisted, Standard, and Hardcore. Using that info, I applied it to the hip pouches (side packs). To restore the first pouch we stay in natives\x64\objectroot\scene\scenario\scenariono\rpd\item\common.scn.19 and we search for 06 01 00 00 FF FF FF FF for the first S.i.d.e.p.a.c.k. Again, look down slightly and find: A5 0A 40 F7 41 C3 09 15 91 DC AD FF 39 B2 C4 03 00 00 00 FF FF FF FF 01 00 00 01 09 01 00 00 Change 03 to 07. That will make it so the hip pouch will appear on Hardcore (and continue showing up in Assisted/Standard) on the table near the Maiden statue in the West Storage Room on 1st/A runs only. Then we search again for 06 01 00 00 FF FF FF FF for S.i.d.e.p.a.c.k._.2.n.d: 60 D4 02 60 6A 03 EA 4C BB 6B BC 58 9E AF C3 D5 03 00 00 00 FF FF FF FF 01 00 00 01 70 00 00 00 Change 03 to 07. That will make it so the hip pouch will show up again on Hardcore on the desk in the Main Hall on 2nd/B runs only. To restore the second pouch we want to look in natives\x64\objectroot\scene\scenario\scenariono\wastewater\itemcommon.scn.19 and again search for 06 01 00 00 FF FF FF FF for the S.i.d.e.p.a.c.k. Look down slightly and find: B2 E3 EB 5B EC D8 2A 05 11 EB BB 80 DF 18 72 36 03 00 00 00 FF FF FF FF 01 00 00 01 3C 01 00 00 Again we change 03 to 07. That will make it so the hip pouch will show up again in Hardcore on the table in the Workroom of the Sewers. Finally to restore the third pouch we want to look in natives\x64\objectroot\scene\scenario\scenariono\rpd_b1\item for claire_common.scn.19 AND leon_common.scn.19. Search for 20 00 00 00 00 00 00 00 01 in both files. Change it to 06 01 00 00 00 00 00 00 01 to replace the ink ribbon with the hip pouch in the locker in the Operators Room after the first boss fight in Hardcore. Hope this helps someone else that also hates having limited inventory slots.
|
|