AgentBannerEditor.OpenForGearset incorrectly takes the gearset id, which is actually the index in a filtered RaptureGearsetModule.Entries list that only contains existing gearsets.
I've renamed fields and arguments accordingly and added a new functions to resolve the index.
Detailed Explanation
For better illustration, I made a new gearset and moved it to number 51.
Internally, because of zero-based arrays, the Index in the array, as well as the Id field inside the entry, are 50.
![Screenshot1](https://github.com/user-attachments/assets/ad7b4771-d457-4938-aa25-21f79508b92b)
The problem though is how the portrait editor handles gearsets.
It doesn't take the index in the list of gearsets (which would be 50).
Instead, it takes the list of gearsets and filters out all disabled entries (whether they haven't been created at all, or were deleted).
As seen in the screenshot above, I have 44 gearsets. If you zero-base this list, the last entry will be at index 43.
And that 43 is what is sent over to the portrait editor, not 50.
What I found is that the gearset module is tracking this in a small array near the end.
This way it's possible to resolve the index of the filtered list, to get the index in the original entries array.
![Screenshot2](https://github.com/user-attachments/assets/fcd48c1f-5fb5-47af-875d-607267c39438)
AgentBannerEditor.OpenForGearset
incorrectly takes the gearset id, which is actually the index in a filteredRaptureGearsetModule.Entries
list that only contains existing gearsets.I've renamed fields and arguments accordingly and added a new functions to resolve the index.
Detailed Explanation
For better illustration, I made a new gearset and moved it to number 51. Internally, because of zero-based arrays, the Index in the array, as well as the Id field inside the entry, are 50. ![Screenshot1](https://github.com/user-attachments/assets/ad7b4771-d457-4938-aa25-21f79508b92b) The problem though is how the portrait editor handles gearsets. It doesn't take the index in the list of gearsets (which would be 50). Instead, it takes the list of gearsets and filters out all disabled entries (whether they haven't been created at all, or were deleted). As seen in the screenshot above, I have 44 gearsets. If you zero-base this list, the last entry will be at index 43. And that 43 is what is sent over to the portrait editor, not 50. What I found is that the gearset module is tracking this in a small array near the end. This way it's possible to resolve the index of the filtered list, to get the index in the original entries array. ![Screenshot2](https://github.com/user-attachments/assets/fcd48c1f-5fb5-47af-875d-607267c39438)