Closed Miningflo closed 1 year ago
It is because first, the full list of block clips and their relative positions need to be resolved before it's accurate to get all the free block positions and rotations. This cannot be done with ManiaScript due to two types of clips called TopClip and BottomClip that aren't abstracted by ManiaScript.
This is not far from completion as the CGameCtnBlockInfo
for TM2020 needs just a few more chunks to figure out.
Currently, you can overcome this limitation by using a macroblock. Macroblocks don't include clip positions for whatever reason.
Currently I can only read flags for macroblocks. No positions sadly. Am I looking in the wrong location?
It's not part of MacroblockInstances
but rather a different Gbx file Macroblock.Gbx
. You need to pack your map (or part of a map) into the macroblock first which for sure isn't ideal.
The file needed to determine free blocks correctly has just been generated, so there should be something functional on the dev branch in a few days.
https://gist.github.com/BigBang1112/6988f0fe5f407920dad6ec540daff674
EDIT: Updated the gist to address a bug.
It took me 2 years to realize the binary, but better late than never. Fixed in https://github.com/BigBang1112/gbx-net/commit/954a1d6fa3c9c498c01261fcc7eb5d500dab2d67
There is no field for the position of a free block. This includes the slope of any block (since sloped blocks are automatically free). All free blocks are positioned outside the grid at <-1,-1,-1> but there is no way to retrieve their actual position given from the fields provided.