aldelaro5 / LiveSplit.BugFables

Autosplitter component for Bug Fables: The Everlasting Sapling for use in LiveSplit
MIT License
0 stars 2 forks source link

End split issues #2

Open aldelaro5 opened 3 years ago

aldelaro5 commented 3 years ago

The end split uses a method that doesn't respect the SRL timing rules in an inconsistent way. It can trigger earlier than it should be.

Unfortunately, this is complicated to deal with because the method the end split is using was the only one that was found at the time to reasonably work and it was to detect the fading in and out of the level up song which SEEMED to match the timing of the fade. This is mostly true, but isn't precise enough for the end split.

The only other way would be a way to get the color of the fader's GO which is not an easy task. After some prior reversing of the unity code, this is what was found:

"my goal is to get to an object's components because last time I checked, this is how I would know the fader's color. I already know that to get to a GO, you need to have the instance address and go to offset 0x10 to get the GO's pointer. However, I learned thanks to ghidra yesterday that when you are in that GO, 0x34 is the number of componentsPair and 0x30 is the array pointer to the ComponentsPair and each pair you can get the component pointer by accessing 0x8"

but there's 2 issues:

  1. I don't know how to determine which component is one of a specific type. It seems to care about 0x30 and 0x34 of the type info which....seems to be RTTI crap? it's complicated and I don't get it
  2. ONCE I HAVE THE COMPONENT, I still don't know how to access its stuff

More investigation and reverse engineering needs to be performed to determine what to do here.