Attach Preview

Attach Preview is a developer tool for visually positioning props on a player, previewing animations, and generating ready-to-use attachment code.

{:links-list}

INSTALLATION

  1. Open the downloaded ZIP product file and drop the BigDaddy-AttachPreview folder somewhere in your resources folder.
  2. Add your product key (get it here) to the settings.ini file.
  3. Add start BigDaddy-AttachPreview to your server.cfg.

DO NOT RENAME THE FOLDER.

If you change the name of the folder it will not function correctly, so leave the name as BigDaddy-AttachPreview.

{:is-danger}

CONFIGURATION

The resource uses settings.ini for licensing and permissions, and settings.json for the command and preview presets.

SETTINGS.INI

SETTING DEFAULT DESCRIPTION
[licensing]
key1 productkeyhere This is where you put your product key
[settings]
UseAcePermissions true Require the configured Ace permission to use Attach Preview. Set this to false to allow every player to use it
AcePermission command Ace permission checked when UseAcePermissions=true
debug false Enables extra debugging output. Set this to false during normal use unless Big Daddy Scripts support asks you to enable it
DesyncKey various Internal synchronization key. Do not change this value

When Ace permissions are enabled, grant the configured permission in your server configuration. The default permission can be granted with:

add_ace group.admin command allow

Change group.admin to the group or principal that should have access. For more examples, see the Ace Permissions guide.

NOTE

You can use whatever permission you want to use but you must set that up on the server, this script does not set it up for you. It just uses the permission you tell it to use. Incorrectly setting up the permission will make the script unable to be used by anyone

{:is-info}

SETTINGS.JSON

SETTING DEFAULT DESCRIPTION
command attachpreview Command used to open Attach Preview. Do not include /
defaultMoveStep 0.01 Default position adjustment amount in meters
defaultRotateStep 1.0 Default rotation adjustment amount in degrees
props see file List of prop model names shown in the preset dropdown
animations see file List of animation presets shown on the Animation tab
bones see file List of named ped bone IDs shown in the bone dropdown

You can add or remove props, animations, and bones without rebuilding the resource. Keep the JSON formatting valid and restart BigDaddy-AttachPreview after saving changes.

Each animation preset uses this format:

{
  "label": "Eat Burger",
  "dictionary": "mp_player_inteat@burger",
  "name": "mp_player_int_eat_burger",
  "flags": 49
}

Each bone preset uses a friendly name and the GTA ped bone ID:

{ "name": "Right Hand", "id": 57005 }

You can setup preset objects to be able to be picked from a dropdown:

  "props": [
    "prop_cs_burger_01",
    "prop_cs_beer_bot_01",
    "prop_ecola_can",
    "prop_tool_consaw",
    "prop_cs_phone_01"
  ],

HOW TO USE

Enter /attachpreview in game to open the tool. Your player is frozen while the preview is open so the camera and attachments remain steady.

PROP ONE AND PROP TWO

Attach Preview can work with two props at the same time. Each prop has its own tab and settings.

  1. Select a preset prop or enter any valid GTA prop model in Custom Prop Model. A custom model overrides the selected preset.
  2. Select the ped bone and rotation order.
  3. Select Spawn Prop.
  4. Adjust the X, Y, and Z position and rotation fields. Changes are shown on the player immediately.
  5. Move the Camera Angle slider to orbit the preview camera around the player.

Position values are measured in meters and rotation values are measured in degrees. Select Reset Offsets to return every spawned prop to zero position and rotation without changing its model, bone, or rotation order.

ANIMATION

Use the Animation tab to check the prop placement while the player performs an animation.

  1. Select an animation preset, or enter a custom animation dictionary and animation name.
  2. Enter the animation flags. Common values are listed in the tool; 49 is a useful looping upper-body combination.
  3. Select Play Animation.
  4. Select Stop when the animation is no longer needed.

GENERATED OUTPUT

Open the Output tab after positioning the props. Select C#, Lua, or JSON, then use the copy button for the prop you want. The generated output includes the model, bone ID, position, rotation, and rotation order currently shown in the preview.

The generated C# and Lua snippets are attachment examples. Your resource must load the model and provide the coords value before using them.

If you just want the offsets, you can just extract the offset numbers from the generated code.

Press ESC or select Close to exit Attach Preview. Closing the tool stops the preview animation, removes both preview props, restores the normal camera, and unfreezes the player.

PREVIEW PROPS ARE TEMPORARY.

Props created by Attach Preview are removed when the tool closes or the resource stops. Copy the generated output before closing the tool if you want to keep the attachment values.

{:is-warning}