What is the version of xEdit you are using?
(all versions up to Fo4Edit 4.1.5a EXPERIMENTAL x64)
Describe the bug
xEdit does not calculate Cell coords correctly for References with an X or Y position that is negative and an exact multiple of 4096.
It assumes Cell coordinate is (position/4096)-1 for negative positions. This is incorrect.
wbIsInGridCell(GetPosition(ref),GetGridCell(LinksTo(ElementByIndex(ref, 0)))) also fails for such references.
To reproduce
- Pick a REFR that matches above - say 000DFAF5 in fallout4.esm
- create an override of it into a new esp
- look at the override - it is in a different cell.
Expected behavior
It should be in the same cell as the master reference. The creationKit places such references in the correct Cell.


Additional context
The correct calculation should be CellCoord = (position-0.001/4096)-1 for negative positions. The CK seems to ignore positional differences less than .001.
What is the version of xEdit you are using?
(all versions up to Fo4Edit 4.1.5a EXPERIMENTAL x64)
Describe the bug
xEdit does not calculate Cell coords correctly for References with an X or Y position that is negative and an exact multiple of 4096.
It assumes Cell coordinate is (position/4096)-1 for negative positions. This is incorrect.
wbIsInGridCell(GetPosition(ref),GetGridCell(LinksTo(ElementByIndex(ref, 0)))) also fails for such references.
To reproduce
Expected behavior

It should be in the same cell as the master reference. The creationKit places such references in the correct Cell.
Additional context
The correct calculation should be CellCoord = (position-0.001/4096)-1 for negative positions. The CK seems to ignore positional differences less than .001.