Closed PMCDC closed 1 year ago
Just wondering one thing. With Rebecca, having the inventory full, won't it break the game? You need to create the J-VOLT and for that you need to grab chemical containers, right? And since you can't open Chest when you are playing with her, won't it make me stuck? Or maybe not? I'm not too sure how it is handled in this randomiser and its been years since I played this classic, so my memory on this is a bit fuzzy...
But anyway, her inventory looks like this:
I dived in the code to see how the inventory is made for this rando, but I do not understand the init.xml
vs the Re1ItemIds
. Nothing match what Rebecca have.
<Init>
<Player>
<Entry id="1" count="1" />
<Entry id="73" count="1" />
<Entry id="0" count="0" />
<Entry id="0" count="0" />
<Entry id="0" count="0" />
<Entry id="0" count="0" />
<Entry id="0" count="0" />
<Entry id="0" count="0" />
</Player>
<Player>
<Entry id="2" count="15" />
<Entry id="11" count="66" />
<Entry id="1" count="1" />
<Entry id="73" count="1" />
<Entry id="70" count="1" />
<Entry id="71" count="1" />
<Entry id="2" count="15" />
<Entry id="70" count="1" />
</Player>
</Init>
Like, the second Player entity does match what Chris starts with, but thats about it. Where does the inventory of Rebecca is being set? ^^'
Okay, after more reading, I'm even more confused of what is happening. XD
If I read this correctly in the Re1ItemHelper class that is implementing the IItemHelper interface, Rebecca's inventory space is already handled for the j-volt bottles:
public int[] GetInventorySize(RandoConfig config)
{
if (config.Player == 0)
return new int[] { 6, 2 }; // Rebecca needs at 4 spare slots for serum / v-jolt bottles
else
return new int[] { 8 };
}
I decided to look at the generated Chris logs instead of the generated init.xml and it seems Rebecca should only have a Handgun and MixedHerb:
Randomizing Inventory 0:
Adding BERETTA x15
Adding CLIP x66
Adding COMBAT KNIFE x1
Adding MIXED ALL x1
Adding MIXED RED+GREEN x1
Adding MIXED 2 GREEN x1
Randomizing Inventory 1:
Adding BERETTA x15
Adding MIXED RED+GREEN x1
I think I'll need more coffee to figure out what is happening with this seed lol.
Though I could give a screenshot just for reference. Also, sorry for the spamming messages. ^^'
Alright, so I decided to generate the seed again, but this time with the actual official build. For context: I was messing around with the source code in Visual Studio (mostly just adding an extra button on the UI to boot RE directly from Biorand), but when I generated the seed, I didn't have the "data" folder of biorand in the bin, so I was thinking maybe I screwed something up.
The generation is the same (init.xml and inventory generation is identical, same logs), but now Rebecca have 3 items.
Maybe there is something wrong with the version of my game? For this test, I did skipped everything with the help of the debug menu just so I could go to the problematic part very fast, but still no luck.
All biorand will be doing is editing init.xml
. So you can edit that file manually in mod_biorand to understand what is going on. You must restart the game for it to load init.xml
again. If you find the game is doing something different each time you load it without changing anything, then it isn't being patched right.
I might try to patch the inventory myself rather than using rebirth's mechanism, just like I do with RE 2, and RE 3. This also means you do not have to restart the game.
Hi dude! Thanks for the clarification, this sure does help. :)
So after messing around a bit, I think I finally understand the XML structure:
I did a few test and noticed something in particular for Rebecca. If I remove the item from the second slot, I do not have the extra Minimi item.
<Player>
<Entry id="2" count="15" />
<Entry id="11" count="66" />
<Entry id="1" count="1" />
<Entry id="73" count="1" />
<Entry id="70" count="1" />
<Entry id="71" count="1" />
<Entry id="2" count="15" />
<Entry id="0" count="0" />
</Player>
And If I try to replace set the second item with anything else (does not matter if its an herb or a weapon), I will have the Minimi
And if I remove everything, well my inventory will be empty as expected:
<Player>
<Entry id="2" count="15" />
<Entry id="11" count="66" />
<Entry id="1" count="1" />
<Entry id="73" count="1" />
<Entry id="70" count="1" />
<Entry id="71" count="1" />
<Entry id="0" count="0" />
<Entry id="0" count="0" />
</Player>
A bit of a weird behavior. ^^'
What happens if you add 4 empty elements after the two items for Rebecca?
Oh, looks like you have found the solution! ;)
Adding those extra empty elements allow me to have the 2 items that was set initially (without the unwanted extra items).
<Player>
<Entry id="2" count="15" />
<Entry id="11" count="66" />
<Entry id="1" count="1" />
<Entry id="73" count="1" />
<Entry id="70" count="1" />
<Entry id="71" count="1" />
<Entry id="2" count="15" />
<Entry id="70" count="1" />
<Entry id="0" count="0" />
<Entry id="0" count="0" />
<Entry id="0" count="0" />
<Entry id="0" count="0" />
</Player>
I expect it was an initialisation problem. Without those empty slots, the memory was never getting cleared so you would get random items appearing.
Version
3.0.1 (98fb96d)
Seed
R710-T1Z4-X5MC60QZ9Y000N82TLP4ZZZZZZZZZZZZA1Z
Scenario
RE 1 (Chris)
What happened?
Hi there!
The game crash when you start controlling Rebecca Chambers (when you need to save Chris from the big Plant). If I open the inventory, the game will crash. I noticed that there is an infinite weapon without any graphic asset (black rectangle), which makes me believe there is an invalid item in the inventory of Rebecca.
I tried to use the debug menu to remove this, but if I try to edit the inventory via the debug menu, the game will also crash.
Note: I am also using the TeamX HD mod to play the game.