How can I fix the lack of pillars at index 31?

Ask for help about creating mods and scripts for Grimrock 2 or share your tips, scripts, tools and assets with other modders here. Warning: forum contains spoilers!
Post Reply
MrChoke
Posts: 324
Joined: Sat Oct 25, 2014 7:20 pm

How can I fix the lack of pillars at index 31?

Post by MrChoke »

I am sure some of you have seen this. If you want to put a floor down at position 31 of either X or Y (far right or far bottom row) of the map, you will see it doesn't place pillars. And you cannot manually try to place them yourself. You do and you crash the editor.

Without pillars any wall texture I have tried has black void in between the walls where a pillar should go. It looks awful.

Is anyone aware of a wall texture I can use that doesn't require a pillar?
Or maybe I call setWorldPosition() on some pillars to put them in position (Ugh, I don't want to have to do that).

Thoughts?
minmay
Posts: 2790
Joined: Mon Sep 23, 2013 2:24 am

Re: How can I fix the lack of pillars at index 31?

Post by minmay »

The standard pillars are aligned to the top left corner of their square. A grid with 32x32 squares will have 33x33 corners on those squares; that's basic 2D geometry. So to put one of the standard pillars on one of the bottom or rightmost corners, you'd have to put it at x position 32 or y position 32 - i.e. in a square that doesn't exist.

What should work fine is changing the position of the model in 3D space. Define your own pillar object and align it to the bottom right corner of the square instead of the top left.
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
User avatar
Isaac
Posts: 3188
Joined: Fri Mar 02, 2012 10:02 pm

Re: How can I fix the lack of pillars at index 31?

Post by Isaac »

minmay wrote:The standard pillars are aligned to the top left corner of their square. A grid with 32x32 squares will have 33x33 corners on those squares; that's basic 2D geometry. So to put one of the standard pillars on one of the bottom or rightmost corners, you'd have to put it at x position 32 or y position 32 - i.e. in a square that doesn't exist.

What should work fine is changing the position of the model in 3D space. Define your own pillar object and align it to the bottom right corner of the square instead of the top left.
This is the answer; we did this a lot in ORRR2.
MrChoke
Posts: 324
Joined: Sat Oct 25, 2014 7:20 pm

Re: How can I fix the lack of pillars at index 31?

Post by MrChoke »

Isaac wrote:
minmay wrote:The standard pillars are aligned to the top left corner of their square. A grid with 32x32 squares will have 33x33 corners on those squares; that's basic 2D geometry. So to put one of the standard pillars on one of the bottom or rightmost corners, you'd have to put it at x position 32 or y position 32 - i.e. in a square that doesn't exist.

What should work fine is changing the position of the model in 3D space. Define your own pillar object and align it to the bottom right corner of the square instead of the top left.
This is the answer; we did this a lot in ORRR2.
I am hoping I can use an offset command to move the model then. I don't know how to do it in a tool yet. I'll try that. Thanks.
Post Reply