World of Banished

MODS Garage => Tips and Help => Topic started by: Discrepancy on February 05, 2019, 12:18:32 AM

Title: building radius off-centre/out of alignment
Post by: Discrepancy on February 05, 2019, 12:18:32 AM
Has anyone come across this before?

(https://i.imgur.com/nEvXuDC.jpg)
For some reason the detraction happiness is off-centre on only this building.
It uses the same decal material as at least half a dozen other buildings of similar radius size (larger, smaller and the same size) which all show correct.
I've triple checked all the code, recompiled the .fbx, re-written the _placeBitmap & _pathBitmap codes to no avail.

The building is sitting correctly within it's 4x4 footprint, yet the radius is appearing off-centre to it. changing the rotation simply rotates the model, still within the same place.

Haha, very unusual. I'm not overly fussed by it as it makes it kind of interesting. I just have no idea why it is like this. I've rebuilt the mod at least a hundred times and it is always the same, has been for days! lol
Title: Re: building radius off-centre/out of alignment
Post by: Tom Sawyer on February 05, 2019, 02:39:52 AM
That's due to the grid and size of an object. The game calculates around the tile in the middle and even-numbered sizes don't have it. In such cases, it takes the next tile to the top right or so. I had this issue, when adding a small circle around the charcoal pile and solved it by reducing its size from 4x4 to 3x3. But this is not always an option. My tannery I could not change in size when adding a circle, so it got some smelling barrels at the right side to make this offset more reasonable. Fortunately, it becomes somehow obsolet with bigger circles of 20 or 30 tiles.
Title: Re: building radius off-centre/out of alignment
Post by: Discrepancy on February 05, 2019, 02:42:25 AM
ahh thankyou :) that explains it.

I now see it is indeed doing it to some of my other buildings with larger radius.