File information

Last updated

Original upload

Created by

orax

Uploaded by

0R4X

Virus scan

Safe to use

About this mod

Allows you to align objects to a grid.

Requirements
Permissions and credits
Mirrors
Changelogs
Donations
Installation
UE4SS v3 (requirement)
Download UE4SS: UE4SS_v3.0.1-*-*.zip
- Steam: unzip the UE4SS archive into (GameInstallDir)\Astro\Binaries\Win64\
More information: https://docs.ue4ss.com/dev/installation-guide.html (Official Installation Guide)

Once UE4SS is extracted, edit mods.txt file. The file is in the Astro\Binaries\Win64\ue4ss\Mods\ directory.
Replace the line:
Keybinds : 1
by
Keybinds : 0

You can have conflicts between Keybinds mod and my mod. This modification in mods.txt will disable Keybinds mod. This mod can be useful for modders, but you don't need it.

Mod
- Steam: unzip the mod archive into (GameInstallDir)\Astro\Binaries\Win64\ue4ss\Mods\
How to find the game install directory in Steam? Right click on the game > Manage > Browse local files.
You can copy options.example.lua to options.lua otherwise it will be automatically copied on first run.



Example of an installation on the Steam version of the game. The file list is not exhaustive.
Spoiler:  
Show
(GameInstallDir)\
├── Astro.exe
└── Astro\
  └── Binaries\
    └── Win64\
      ├── Astro-Win64-Shipping.exe
      ├── dwmapi.dll
      └── ue4ss\
        ├── UE4SS.log
        ├── UE4SS-settings.ini
        └── Mods\
          ├── mods.txt
          └── SnapToGridMod\
            ├── .luarc.json
            ├── enabled.txt
            ├── options.example.lua
            ├── options.lua
            ├── params.example.lua
            ├── params.lua
            └── Scripts\
              └── main.lua

This mod is experimental. Make a backup of your game save before using the mod.


Usage and configuration
You MUST create a flat terrain with one of these mods:
- Terrain Tool
- Tangent mod (this version is outdated!). Download the latest version on the Astroeneer Modding Discord server. Join the server: https://discord.com/servers/astroneer-modding-774729322674126858 and download the Tangent_Mod-*.CT file in this channel.


Shortcuts
Snap and rotate the object to the grid.                     F4

Select an object to use as a reference for the location.    F5
This object will be in the center of the grid. It is a "reference object".

Rotate the player to the black lines (arc circles).         SHIFT+F4
See the GeoGebra simulation.

Rotate the player to the orange lines (arc circles).        SHIFT+F5
See the GeoGebra simulation.

Select an object.                                           NUM_FIVE (key 5 on the numeric pad) 


NOTE: The shortcuts below only work for the selected object (with NUM_FIVE).

Reset the local offset and rotation of the object.          NUM_ZERO

Forward, backward, left and right movements. 🠉 🠋 🠈 🠊
🠉 NUM_EIGHT
🠋 NUM_TWO
🠈 NUM_FOUR
🠊 NUM_SIX

Up and down movements. 🞁 🞃
🞁 NUM_ADD
🞃 NUM_SUBTRACT

Clockwise and counterclockwise rotations. ⟳ ⟲
NUM_MULTIPLY
NUM_DIVIDE

Modifiers for BIG and VERY BIG movements and rotations.
BIG         CONTROL
VERY BIG    ALT


Tutorial 1/3

Tutorial 2/3
IMPORTANT: There are some mistakes in this video:
- 0:44 and 0:49 The keyboard shortcut to select an object is 5 (on the numeric pad) instead of F5.
- 0:54, 1:00 and 1:04 The keyboard shortcut to copy the current changes to another object is CTRL+5 (on the numeric pad) instead of CTRL+F5.

Tutorial 3/3
In update 0.3.0 you can align objects in a "circular" way.

Files
There are two configuration Lua files: options.lua and params.lua. These files will be automatically created on first run.
Commands
Example: https://imgsh.net/i/0f6ca34ae8
List: angle, rloc, loc, arc, offset, rot, go, info, set_new_location, set_new_rotation.

Mod simulation
Simulation: https://www.geogebra.org/classic/qw4km5wr
Astroneer coordinate axes https://www.geogebra.org/classic/z6rxucsq

Requirements
You must create a flat terrain with one of these mods:
- Terrain Tool
- Tangent mod (this version is outdated!). Download the latest version on the Astroeneer Modding Discord server. Join the server: https://discord.com/servers/astroneer-modding-774729322674126858 and download the Tangent_Mod-*.CT file in this channel.



Troubleshooting
Known issues
- The game can crash at launch. This is probably an issue with UE4SS, I can't fix it.
- The game can freeze/crash/hang when you use the mod. Please make a backup before using it.
- When you press F4 multiple time to snap an object, the object must stay on the same point on the grid. But sometime it move on another point. This is a bug.

Logging
You can see the logs in UE4SS.log or in the UE4SS GUI Console.
You can enable the UE4SS GUI Console in UE4SS-settings.ini in the [Debug] section.



Miscellaneous
If you want to see an example, you can download my save in FILES > Miscellaneous files.
Note that in this save I use the Junction Box mod. I use the black and red junction box to store one resource.



Mod license: MIT.
Mod image created by AI (ChatGPT).