How to add new Shell


1. Add the Shell to Your Resource

Make sure the shell model resource is properly streamed by your server.

  • Place the files in a folder under resources/.

  • Ensure it's started in your server.cfg.

2. Register the Shell

Go to vms_housing/integration/[shells] and create a new file for your shell. You can name it for example custom_shells.lua

Inside that file, define your shell using the following structure:

local shells = {
    ['envi_shell_01_empty'] = { -- Unique Name
        label = 'Apartment 1', -- Name displayed in menus

        tags = {'empty', 'envi'}, -- Useful for filtering and categorization

        rooms = 5, -- Visual info about how many rooms the interior has

        model = 'envi_shell_01_empty', -- The actual YDR model of the shell that needs to be streamed

        doors = { -- Position and heading of the shell's entrance, used for teleporting in/out
            x = 0.62,
            y = 0.6,
            z = 498.86,
            heading = 1.26
        },

        interactable = { -- Define functional items inside the shell (e.g. sinks, appliances, etc.)
            {
                target = vector4(-1.15, 9.77, 499.48, 88.59), -- Position and rotation of the interactable target box
                targetSize = vector3(0.9, 0.8, 2.0), -- Size of the target interaction box
                options = {
                    {
                        timeUsage = 7000, -- Time in milliseconds to perform the action
                        targetIcon = "fa-solid fa-sink", -- FontAwesome icon for UI
                        type = 'sink', -- Used to determine the type of interaction
                        waterUsage = 5000, -- Water usage in milliliters
                        billType = 'water', -- Type of utility to bill
                        coords = {
                            particles = vector3(-1.175646, 9.782219, 499.701), -- Particle spawn position
                            player = vector4(-0.57, 9.84, 498.86, 92.5), -- Where the player stands during the action
                        },
                    },
                    {
                        timeUsage = 5000,
                        targetIcon = "fa-solid fa-glass-water-droplet",
                        type = 'sink_drink',
                        waterUsage = 300,
                        billType = 'water',
                        coords = {
                            particles = vector3(-1.175646, 9.782219, 499.701),
                            player = vector4(-0.57, 9.84, 498.86, 92.5),
                        },
                    },
                }
            },
        },

        images = { -- Screenshots used in the housing menu when browsing interiors
            'shell/envi_shell_01_empty-1.png',
            'shell/envi_shell_01_empty-2.png',
            'shell/envi_shell_01_empty-3.png',
            'shell/envi_shell_01_empty-4.png',
            'shell/envi_shell_01_empty-5.png',
            'shell/envi_shell_01_empty-6.png',
        },
    },
}

addShells(shells) -- Register your shell(s)

3. Configure Shell Door Position

To set the proper entrance position for your shell:

  1. First, insert your shell into the list with a temporary doors coordinate like:

doors = {
    x = 0.0,
    y = 0.0,
    z = 0.0,
    heading = 0.0
},
  1. Start your server and open the housing menu using /housing

  2. Navigate to Create Property - Shell, find your new one and press the Preview button

  3. You'll be teleported to the 0.0, 0.0, 0.0 coordinates and the shell will be placed

  4. Walk inside the shell to the door you want to use as the entrance

  5. Use a tool like /copycoords or any coord grabber to get the accurate position + heading (be your back to the door)

  6. Paste those coordinates into the doors section of your shell config

This ensures the entrance is perfectly aligned for teleporting in/out.

4. Done!

Your shell will now appear in the list when creating properties through the admin menu.

Last updated

Was this helpful?