Tunicus Grid Placement Module v3.1.2 (open source)

Note: If you have previously seen this module and saw that it had bugs, you can now be assured that most of those bugs have been solved. Although, if you find bugs with this module, I’d greatly appreciate for you to let me know and provide as much information to me about it as you can.

Hello. I have created a major modification to the Tunicus placement module v2. Anyone is allowed to use this and make modifications to it themselves if needed. I saw how outdated and limited the original module was and got sick of having to modify it every time I wanted to use it.

Here are the modifications I have made to the module:

  • Objects with customisable adjustable heights (hydraulics)
  • Objects that can be placed on top of (platforms)
  • You can place on top of multiple of these platforms at once
  • Hydraulic items can have legs that automatically size themselves to stand on the ground
  • The grid texture now has an option to fade in/out and has a custom colour
  • There are customisable SelectionBoxes that will go on any item you’re currently placing and obstacles while you’re placing
  • A setting to hold the place button down to continue placing
  • An option to stop items from wobbling around when moving the mouse while placing
  • An option to hide CoreGui while placing
  • Easily customisable keybinds that also support Xbox controls

Settings:
// PLACEMENT SETTINGS

bool INTERPOLATION -- whether placement smoothing is enabled
bool WOBBLE_ITEMS -- whether items wobble when moving (does nothing if interpolation is false)
float INTERPOLATION_DAMP -- how fast smoothing is, make it a value [0, 1]
float ROTATION_SPEED -- rotation tween speed in seconds
float PLACEMENT_COOLDOWN -- how quickly the user can place (minimum time in seconds between placing items)
bool HOLD_TO_PLACE -- if the user can hold the place key to place

// PLACEMENT COLORS, TRANSPARENCY, FADING

Color3 COLLISION_COLOR3 -- color of the hitbox when object collides
float COLLISION_TRANSPARENCY -- transparency of the hitbox when object collides
Color3 NORMAL_COLOR3 -- color of the hitbox
float NORMAL_TRANSPARENCY -- transparency of the hitbox
Color3 LOAD_COLOR3 -- color of the hitbox when loading
float LOAD_TRANSPARENCY -- transparency of the hitbox when loading
float HIT_BOX_FADE_TIME -- primarypart/selection box fade time in seconds. set to 0 to instantly change/appear

// SELECTION BOXES

float SELECTION_BOX_TRANSPARENCY -- selection box transparency. set to 1 for no selection boxes
Color3 SELECTION_BOX_COLOR3 -- selection box color. set to nil for a custom color system (you have to code that yourself)
float SELECTION_BOX_PLACING_THICKNESS -- selection box thickness on objects the user is placing
float SELECTION_BOX_OBSTACLE_THICKNESS -- selection box thickness on obstacles

// GRID SETTINGS

string GRID_TEXTURE -- texture of the grid space, set to nil if you don't want a visible grid
Color3 GRID_COLOR3 -- color of the grid texture
float GRID_TRANSPARENCY -- the transparency of the grid while placing
float GRID_FADE_TIME -- the amount of seconds that the grid takes to fade. set to 0 to instantly appear
bool TEXTURE_ON_PLATFORMS = true -- if the grid texture is also put on platforms

// CONTROLS

bool OVERRIDE_CONTROLS -- whether the keybinds below work or not
int INPUT_PRIORITY -- input priority of default controls
list PLACE_KEYBINDS -- placement keybinds (pc, xbox)
list ROTATE_KEYBINDS -- rotate keybinds (pc, xbox)
list HYDRAULIC_UP_KEYBINDS -- hydraulic up keybinds (pc, xbox)
list HYDRAULIC_DOWN_KEYBINDS -- hydraulic down keybinds (pc, xbox)
list CANCEL_KEYBINDS -- cancel placement keybinds (pc, xbox)

// CORE GUI

list CORE_GUI_DISABLE -- core gui to disable when placing

License:
This module is under the MIT license which means you are allowed to freely use this for commericial and private use, modify it, and distribute it as you please.

Credits/attributions:
You don’t have to credit I or Tunicus, but credit would be greatly appreciated. We both put many many hours into this just to give it away to the community for free.

Possibilities for the future:

  • Multiple hitboxes per object when placing
  • Wall/ceiling placement
  • Withdrawal/moving system
  • Inventory system
  • Shop system
  • Tutorial post on the forums going in depth on how to use the module
  • Video tutorial on how to use the module

You can add the module to your inventory here:
Roblox module (doesn’t have server-sided placement protection)

You may use this test place to see how the module works:
Github page (rbxl place file with server-sided placement protection)

I have also made a module that allows you to calculate numbers past the limits of Roblox numbers. If you are interested, see this post on the Dev Forum here: Numbers past 1.79e+308 | Extended number module (open source)

17 Likes

This is great, thank you for sharing.

Do you have plans to add more features in the future?
Like for example being able to place objects on other surfaces like walls and ceilings and being able to select and move/delete already placed objects?

I’m mostly wondering because this seems to be a good module to start with and if you have those features planned already then it would be superfluous for me to also try and implement then.
Thanks!

1 Like

I have considered this, but I primarily made this modifcation for sandbox tycoons and tried to stay within the scope set by Tunicus when he originally made the module. I may add more features to the module over time, however I do have to revise for exams at the moment so new features may not come out for a while.

A feature I have been thinking about is allowing items to have multiple hitboxes, although it would be quite difficult to do, since I’d have to rewrite a lot of the platform code on the client and on the server (the server code is on github).

I do want to add features that the community wants as long as they won’t take me too long. I primarily made this because there aren’t many alternatives out there, and as far as I know, this is the only open source placement system that allows the user to place on multiple platforms.

I’ve always wanted a more recent version of this module but I noticed nobody had seemed to make anything public so I thought I may as well do it myself.

I also have a module for an extended number system that I’ve been thinking of making open source. I would like to know if people are interested in that one.

Moving and deleting an already placed object is very easy and that’s more on the sandbox tycoon stuff rather than the placement module itself. They are both really simple to accomplish: deleting/withdrawing is just destroying the object and possibly adding it to an inventory, moving is just deleting/withdrawing and then initiating placement.

Thanks for the feedback. I’ll be sure to consider it in the future.

1 Like

The issues documented in this post should now be resolved! If you do experience any bugs, please let me know by replying to this post, messaging me on the Developer Forum, or messaging me on Discord. Just be aware that I’m not as active here as I used to be.

̶I̶f̶ ̶y̶o̶u̶ ̶s̶t̶u̶m̶b̶l̶e̶ ̶u̶p̶o̶n̶ ̶t̶h̶i̶s̶ ̶m̶o̶d̶u̶l̶e̶,̶ ̶p̶l̶e̶a̶s̶e̶ ̶D̶O̶ ̶N̶O̶T̶ ̶u̶s̶e̶ ̶i̶t̶ ̶a̶s̶ ̶i̶f̶ ̶y̶o̶u̶ ̶s̶t̶a̶r̶t̶ ̶p̶l̶a̶c̶i̶n̶g̶ ̶a̶n̶ ̶i̶t̶e̶m̶ ̶o̶n̶ ̶t̶o̶p̶ ̶o̶f̶ ̶a̶ ̶p̶l̶a̶t̶f̶o̶r̶m̶ ̶w̶h̶i̶l̶e̶ ̶a̶l̶s̶o̶ ̶p̶l̶a̶c̶i̶n̶g̶ ̶t̶h̶e̶ ̶p̶l̶a̶t̶f̶o̶r̶m̶ ̶i̶t̶ ̶w̶i̶l̶l̶ ̶b̶r̶e̶a̶k̶.̶ ̶A̶l̶s̶o̶ ̶a̶t̶ ̶t̶h̶e̶ ̶m̶o̶m̶e̶n̶t̶ ̶i̶f̶ ̶y̶o̶u̶r̶ ̶g̶r̶i̶d̶ ̶s̶i̶z̶e̶ ̶i̶s̶n̶’̶t̶ ̶3̶ ̶i̶t̶ ̶w̶i̶l̶l̶ ̶a̶s̶s̶u̶m̶e̶ ̶i̶t̶ ̶i̶s̶ ̶a̶n̶d̶ ̶m̶a̶k̶e̶ ̶i̶n̶c̶o̶r̶r̶e̶c̶t̶ ̶c̶a̶l̶c̶u̶l̶a̶t̶i̶o̶n̶s̶.̶ ̶T̶h̶i̶s̶ ̶i̶s̶ ̶a̶n̶ ̶e̶a̶s̶i̶l̶y̶ ̶f̶i̶x̶a̶b̶l̶e̶ ̶m̶i̶s̶t̶a̶k̶e̶ ̶b̶y̶ ̶s̶e̶a̶r̶c̶h̶i̶n̶g̶ ̶f̶o̶r̶ ̶’̶ ̶̶ ̶3̶’̶ ̶a̶n̶d̶ ̶c̶o̶r̶r̶e̶c̶t̶i̶n̶g̶ ̶t̶h̶e̶m̶ ̶t̶o̶ ̶’̶ ̶̶ ̶c̶u̶r̶r̶e̶n̶t̶P̶l̶a̶n̶e̶.̶g̶r̶i̶d̶’̶.̶ ̶I̶ ̶a̶p̶o̶l̶o̶g̶i̶s̶e̶ ̶f̶o̶r̶ ̶r̶e̶l̶e̶a̶s̶i̶n̶g̶ ̶t̶h̶i̶s̶ ̶m̶o̶d̶u̶l̶e̶ ̶w̶i̶t̶h̶o̶u̶t̶ ̶c̶h̶e̶c̶k̶i̶n̶g̶ ̶f̶o̶r̶ ̶t̶h̶e̶s̶e̶ ̶s̶i̶m̶p̶l̶e̶ ̶t̶h̶i̶n̶g̶s̶.̶
̶
̶O̶n̶c̶e̶ ̶I̶ ̶u̶p̶d̶a̶t̶e̶ ̶t̶h̶e̶ ̶m̶o̶d̶u̶l̶e̶ ̶b̶o̶t̶h̶ ̶o̶f̶ ̶t̶h̶e̶s̶e̶ ̶t̶h̶i̶n̶g̶s̶ ̶w̶i̶l̶l̶ ̶b̶e̶ ̶f̶i̶x̶e̶d̶.̶ ̶I̶f̶ ̶I̶ ̶d̶o̶n̶’̶t̶ ̶r̶e̶m̶e̶m̶b̶e̶r̶ ̶t̶o̶ ̶u̶p̶d̶a̶t̶e̶ ̶i̶t̶ ̶o̶n̶ ̶t̶h̶e̶ ̶g̶i̶t̶h̶u̶b̶ ̶.̶r̶b̶x̶l̶ ̶f̶i̶l̶e̶ ̶p̶l̶e̶a̶s̶e̶ ̶l̶e̶t̶ ̶m̶e̶ ̶k̶n̶o̶w̶ ̶a̶n̶d̶ ̶I̶ ̶w̶i̶l̶l̶ ̶d̶o̶ ̶s̶o̶.̶
̶
̶P̶l̶e̶a̶s̶e̶ ̶b̶e̶ ̶a̶w̶a̶r̶e̶ ̶I̶ ̶h̶a̶v̶e̶ ̶e̶x̶a̶m̶s̶ ̶i̶n̶ ̶t̶h̶e̶ ̶n̶e̶x̶t̶ ̶t̶w̶o̶ ̶w̶e̶e̶k̶s̶ ̶s̶o̶ ̶I̶ ̶m̶a̶y̶ ̶b̶e̶ ̶b̶u̶s̶y̶ ̶a̶n̶d̶ ̶n̶o̶t̶ ̶l̶o̶g̶ ̶o̶n̶ ̶m̶u̶c̶h̶.̶
̶̶̶U̶P̶D̶A̶T̶E̶:̶̶̶ ̶I̶ ̶t̶o̶o̶k̶ ̶a̶ ̶b̶r̶e̶a̶k̶ ̶a̶s̶ ̶I̶ ̶h̶a̶v̶e̶n̶’̶t̶ ̶h̶a̶d̶ ̶a̶n̶y̶ ̶c̶l̶e̶a̶r̶ ̶m̶o̶t̶i̶v̶a̶t̶i̶o̶n̶ ̶t̶o̶ ̶w̶o̶r̶k̶ ̶o̶n̶ ̶a̶n̶y̶t̶h̶i̶n̶g̶ ̶p̶r̶o̶g̶r̶a̶m̶m̶i̶n̶g̶ ̶r̶e̶l̶a̶t̶e̶d̶.̶ ̶I̶ ̶w̶a̶n̶t̶ ̶t̶o̶ ̶c̶o̶m̶e̶ ̶b̶a̶c̶k̶ ̶t̶o̶ ̶t̶h̶i̶s̶ ̶m̶o̶d̶u̶l̶e̶ ̶a̶n̶d̶ ̶f̶i̶x̶ ̶i̶t̶ ̶b̶e̶f̶o̶r̶e̶ ̶t̶h̶e̶ ̶e̶n̶d̶ ̶o̶f̶ ̶t̶h̶e̶ ̶y̶e̶a̶r̶.̶ ̶I̶ ̶h̶a̶v̶e̶ ̶r̶e̶c̶e̶n̶t̶l̶y̶ ̶b̶e̶e̶n̶ ̶w̶o̶r̶k̶i̶n̶g̶ ̶o̶n̶ ̶a̶ ̶s̶o̶l̶u̶t̶i̶o̶n̶ ̶t̶o̶ ̶t̶h̶e̶ ̶i̶s̶s̶u̶e̶,̶ ̶a̶n̶d̶ ̶I̶ ̶f̶e̶e̶l̶ ̶I̶’̶m̶ ̶g̶e̶t̶t̶i̶n̶g̶ ̶c̶l̶o̶s̶e̶r̶ ̶t̶o̶ ̶a̶ ̶f̶u̶l̶l̶ ̶s̶o̶l̶u̶t̶i̶o̶n̶ ̶t̶h̶a̶t̶ ̶d̶o̶e̶s̶n̶’̶t̶ ̶s̶a̶c̶r̶i̶f̶i̶c̶e̶ ̶t̶h̶e̶ ̶q̶u̶a̶l̶i̶t̶y̶ ̶o̶f̶ ̶t̶h̶e̶ ̶m̶o̶d̶u̶l̶e̶,̶ ̶b̶u̶t̶ ̶I̶’̶m̶ ̶n̶o̶t̶ ̶q̶u̶i̶t̶e̶ ̶t̶h̶e̶r̶e̶ ̶a̶n̶d̶ ̶w̶i̶l̶l̶ ̶r̶e̶q̶u̶i̶r̶e̶ ̶t̶i̶m̶e̶ ̶t̶o̶ ̶r̶e̶s̶o̶l̶v̶e̶ ̶t̶h̶e̶ ̶i̶s̶s̶u̶e̶.̶ ̶I̶’̶m̶ ̶s̶o̶r̶r̶y̶ ̶i̶f̶ ̶p̶e̶o̶p̶l̶e̶ ̶h̶a̶v̶e̶ ̶b̶e̶e̶n̶ ̶w̶a̶i̶t̶i̶n̶g̶ ̶f̶o̶r̶ ̶a̶ ̶f̶i̶x̶.̶ ̶T̶h̶e̶ ̶m̶o̶d̶u̶l̶e̶ ̶i̶s̶ ̶s̶t̶i̶l̶l̶ ̶u̶s̶a̶b̶l̶e̶,̶ ̶j̶u̶s̶t̶ ̶b̶e̶ ̶a̶w̶a̶r̶e̶ ̶t̶h̶a̶t̶ ̶I̶ ̶h̶a̶v̶e̶n̶’̶t̶ ̶u̶p̶d̶a̶t̶e̶d̶ ̶i̶t̶ ̶y̶e̶t̶ ̶a̶n̶d̶ ̶m̶o̶v̶i̶n̶g̶ ̶a̶l̶r̶e̶a̶d̶y̶ ̶p̶l̶a̶c̶e̶d̶ ̶p̶l̶a̶t̶f̶o̶r̶m̶s̶ ̶m̶a̶y̶ ̶n̶o̶t̶ ̶w̶o̶r̶k̶ ̶a̶s̶ ̶i̶n̶t̶e̶n̶d̶e̶d̶.̶
̶
̶̶̶U̶P̶D̶A̶T̶E̶ ̶2̶:̶̶̶ ̶I̶ ̶h̶a̶v̶e̶ ̶l̶o̶s̶t̶ ̶i̶n̶t̶e̶r̶e̶s̶t̶ ̶i̶n̶ ̶R̶o̶b̶l̶o̶x̶ ̶t̶h̶i̶s̶ ̶y̶e̶a̶r̶ ̶a̶n̶d̶ ̶I̶ ̶h̶a̶v̶e̶ ̶n̶o̶ ̶i̶d̶e̶a̶ ̶i̶f̶ ̶I̶’̶l̶l̶ ̶e̶v̶e̶r̶ ̶f̶i̶x̶ ̶t̶h̶i̶s̶ ̶m̶o̶d̶u̶l̶e̶.̶ ̶I̶ ̶m̶a̶y̶ ̶c̶o̶m̶e̶ ̶b̶a̶c̶k̶ ̶t̶o̶ ̶i̶t̶ ̶b̶u̶t̶ ̶a̶t̶ ̶t̶h̶e̶ ̶m̶o̶m̶e̶n̶t̶ ̶I̶ ̶h̶a̶v̶e̶ ̶b̶e̶e̶n̶ ̶m̶o̶r̶e̶ ̶i̶n̶t̶e̶r̶e̶s̶t̶e̶d̶ ̶i̶n̶ ̶U̶n̶i̶t̶y̶.̶