bsp-decompiler icon indicating copy to clipboard operation
bsp-decompiler copied to clipboard

Failing opening Apex Legends BSP files

Open Devostated opened this issue 3 years ago • 5 comments

Hello, I used this tool a little over 2 years ago and were able to open BSP files of the game Apex Legends. I didn't get much data back then, but enough for what I want to do right now.

I tried it today with the exact same BSP file as back then, but now I'm getting following error:

Exception caught in Job 3: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: startIndex
   at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
   at System.BitConverter.ToInt32(Byte[] value, Int32 startIndex)
   at LibBSP.GameLump..ctor(Byte[] data, BSP bsp, LumpInfo lumpInfo) in C:\Users\Devo\Desktop\bsp-decompiler-master\external\LibBSP\LibBSP\Source\Structs\BSP\Lumps\GameLump.cs:line 116
   at LibBSP.GameLump.LumpFactory(Byte[] data, BSP bsp, LumpInfo lumpInfo) in C:\Users\Devo\Desktop\bsp-decompiler-master\external\LibBSP\LibBSP\Source\Structs\BSP\Lumps\GameLump.cs:line 147
   at LibBSP.BSP.get_GameLump() in C:\Users\Devo\Desktop\bsp-decompiler-master\external\LibBSP\LibBSP\Source\Structs\BSP\BSP.cs:line 1516
   at LibBSP.BSP.get_StaticProps() in C:\Users\Devo\Desktop\bsp-decompiler-master\external\LibBSP\LibBSP\Source\Structs\BSP\BSP.cs:line 1547
   at Decompiler.BSPDecompiler..ctor(BSP bsp, Job master) in C:\Users\Devo\Desktop\bsp-decompiler-master\Decompiler\Source\Util\BSPDecompiler.cs:line 31
   at Decompiler.Job.Run() in C:\Users\Devo\Desktop\bsp-decompiler-master\Decompiler\Source\Util\Job.cs:line 172

I gladly provide different BSPs, new ones or old ones that used to work back then, if you would like to take a look at it.

Devostated avatar Jun 29 '22 00:06 Devostated

Hm, I've never tested with Apex Legends. I'm surprised this ever worked with that game at all. I'll see if I can take a look.

wfowler1 avatar Sep 02 '22 06:09 wfowler1

It just had some light infos Here is an old screenshot. That was made in feburary 2020. image

Devostated avatar Sep 02 '22 12:09 Devostated

Huh, that's really strange. One quick question, what tool are you using to open the Apex Legends VPK files?

wfowler1 avatar Sep 13 '22 16:09 wfowler1

My current BSPs are extracted with Titanfall VPKTool, but I'm not 100% about the old ones. I can e-mail you the old BSP files that I used back then if you like.

Devostated avatar Sep 14 '22 10:09 Devostated

Hey! I'm currently working on a compiler for respawn bsps and stumbled upon this issue by chance.

While we don't know much about collisions in apex as of now the current theory is that respawn uses purely triangle collision which makes decompiling the bsps way harder.

I suggest you to have a glance at bsp_tool/apex legends where most of our knowledge is.

As a side note unrelated to the issue decompiling Titanfall maps is way easier because the game uses brushes for collision. It also uses patches(tricoll) which we don't know the full structure of rn.

F1F7Y avatar Jan 05 '23 12:01 F1F7Y