Guide - Z Modeler

This document will show you how to setup your vehicle for Smart Vehicle using Z Modeler and Menyoo, an in-game resource.

This documentation is only intended for developers with prior knowledge of ZModeler3, including material setup, dummy placement and other skills. This documentation is not designed to teach you how to use ZMod and you should not treat it as such.

This documentation was created by H.Ash, part of Alien Modding.

The vehicle featured in this documentation is the one included in the resource.

This documentation assumes you know how to make a custom .ytyp using PropsEditor or AddonProps editor. If not, please follow the tutorials that come with those programs. It also assumes that you will be using embedded textures and know how to set these up in ZMod. Alternatively, you should know how to setup a .ytd (texture dictionary).

Information about this document

The documentation references props such as ladder_seat and ladder_base, which are part of our British Ladder Truck (available on our store). Smart Vehicle has expanded to have many more uses beyond just ladder trucks, but we'll be going through the British Ladder Truck here as part of the guide.

This document will also reference props such as outriggers and feet, which are part of the ladder truck. These may not be relevant to the vehicle you are trying to create, but helps you get an idea of how to set up your own vehicle and break it down into different props, which will then be controlled by Smart Vehicle.

Ladder_seat: Firstly, import your first ladder model into ZMod, splitting by materials. Ideally, this is the area where the control seat is, that spins around. The turntable.

Ladder Seat

Set up your materials accordingly, I used the normal_spec shader mostly, but also some of the decal materials too. The choice is yours. These are coming out of ZMod as a .ydr prop files, so you cannot use vehicle shaders. See below for the available material shaders that you can use with props.

Then, attach all the material meshes that are in the hierarchy into one mesh, using the Attach tool. Create a new dummy with the dummy helper tool a the top. This should spawn in the middle of the viewport. Name it “ladder_seat” You then need to move the mesh so that the newly created dummy is where it will rotate from (i.e. the centre of the turntable mesh) See picture below.

Having done this, drag the mesh into the dummy in the hierarchy (not compounding it), so that the mesh is the child of the dummy. Compound the mesh to L0, not to the dummy, by toggling on L0, then Convert to Compound, and then the padlock symbol. This will make your mesh name (which should be “.mesh”) in the hierarchy appear bold. Your hierarchy should look like this:

Following this, right click on the mesh in the hierarchy, go to Axes, then “Reset to Parent”. This will move the axes to where the parent dummy is, and therefore specify where the rotation point will be. (The mesh will rotate around this point). This is crucial and may require testing in game to ascertain the exact point. Use Menyoo to spawn in your prop and rotate it to see if it rotates around where it should.

When doing the collisions for this ladder piece, they do not need to be nail on accurate, but just a rough mock up of the mesh, much like how a chassis collision looks when making vehicles. Set your collision mesh to Default Material and Convert to Compound much like how you did with L0, only this time use COL instead. The collision mesh needs to be named “.[COL]”. This applies to all ladder pieces.

Export as a .ydr, noting down the bbmin, bbmax, bbcentre and bsradius values, so that you can plug these into a YTYP creator later on, so that you can actually spawn these props in.

Ladder_base: This is the ladder piece that moves up and down, and has all the other ladder pieces within it.

Make a new ZMod file.

Import your first ladder piece’s mesh, splitting by materials, and set up your materials accordingly in the browser, as set out in the beginning of this documentation.

Again, spawn in a new dummy using the dummy helper, and name it “ladder_base”. Attach your material meshes together and place the one mesh you are left with as a child of the ladder_base dummy. Convert to Compound L0.

This time, you are going to want to move the mesh so that the ladder_base dummy is where it rotates up/down from. See below for the dummy placement of the released ladder’s piece:

Again, reset the mesh’s axes to parent, and export as a .ydr, noting down the values so you can accurately create the YTYP later.

For the collision, make a mesh that lines up with the base and sides of the ladder piece. This will allow you to walk on it in game if you so wish to do so. Picture below.

Ladder_outer Ladder_middle Ladder_inner (And any more extending pieces):

These are the ladder pieces that actually move, and sit within the ladder_base piece when the vehicle is not extended/in use.

The process for setting all these three is the same. You will still need a new ZMod file for each, as you are creating them as individual props.

Import the mesh, set up materials as before. Create your new dummy, start with “ladder_outer”. This is the first extending piece, the second biggest ladder piece after ladder_base. The script is written so that this is the last piece to move. Place the mesh in the centre of the viewport, with the bottom edge lining up with the x axis in ZMod. This does not need to be perfect. Having attached all the material meshes together, and placed “.mesh” as a child of “ladder_outer”, Reset the Axes to Parent, and export, again noting bb values.

Repeat this for all extending ladder pieces. The vehicle released with the script has three extending pieces, but the config file allows for as many as you need.

For the collisions, make a mesh that lines up with the base and sides of the ladder pieces. See the picture above in the ladder_base section.

Export each individually as .ydrs. If you are making a “stick” ladder, this is your ZMod experience complete.

Ladder_end_piece:

This is the ladder piece that folds down at the end of a turntable ladder. I realise that not all aerials have these, especially not in the USA. If you are making an Aerial Ladder Platform/Hydraulic Platform (ALP/HP), it is likely you will need this piece. If you are making a Turntable Ladder (TL), such as the one released with the SmartLadder script, you may need this. It is the small piece on the end, attached to “ladder_inner” (the smallest extending piece), and is the piece that the cage/bucket attaches to.

The ladder that is released with the script is a Metz L32A XS, commonly used in Europe. This ladder_end_piece on the real-life model, and with the script, does not extend, but rather rotates up/down, a little bit like ladder_base. This allows the vehicle to be able to reach over roof gables, and below grade.

For an better way of explaining it, go and try it in game with the released model, using the arrow keys to control it.

Import your model of this (if required), set up materials etc, the dummy etc.

Move the mesh so that the dummy is where the piece rotates from. This may not be the end of the mesh, as is the case with this one. Try and find a video of your ladder working in real life to ascertain where this needs to be.

Reset Axes to Parent

Follow all steps written before when it comes to creating collisions for this, as well as child/parent setups and exporting.

Ladder_cage: The cage (or bucket) is where the player can be attached to using /entercage in game. It rotates, so again, positioning the mesh so that the dummy is in the right place is crucial.

Import your mesh, setup materials as applicable. Spawn in your dummy, name it “ladder_cage”.

Attach all material meshes and rename to .mesh, and move it so that the dummy you just created is the point where the cage roates around. Picture below of the setup for the released ladder:

It is in the bottom corner as that is where it attaches to the ladder_end_piece mesh, and therefore the rotation point.

Place the .mesh as a child of the ladder_cage dummy in the hierarchy if you haven’t already, and reset the .mesh’s Axes to Parent.

Create a collision that is a hollow box, with no top or back. Here is what the released ladder’s looks like:

It has no back piece so that the player can walk in and out of it should they wish to do so in game.

Outriggers: These are the pieces that extend outwards from the truck to enable stability. Controlled by PageUp with the script.

Whilst most trucks have many, you only need one outrigger mesh (presuming they are all the same), as the script will duplicate them once you set the offset points in game. (Read the other parts of the documentation about setting your config for this detail).

Import your mesh, set up your materials, spawn a dummy, call it “outrigger”. Attach all material meshes, rename to .mesh as before, and move it so that the dummy is roughly in the centre of the mesh. It should look something not too dissimilar to this:

Note, the feet that often extend downwards of the outriggers are a separate prop. More on that below.

Make your collision mesh, roughly the same shape as the .mesh. Compound and so on. Same as before.

Outrigger feet: These are the small plates that extend downwards from the outriggers, once the outrigger has extended outwards.

Once again, import your mesh, set up your materials, spawn in the dummy, name it “foot”. Attach material meshes together, and rename to .mesh. Place this mesh in the centre of the viewport, Reset to Parent and so on. All as before.

Collision file should be the rough shape again. Here is what the released ladder’s outrigger feet look like in ZMod:

Export as .ydr, noting bb values.

Conclusion: That is it, that is instructions for how to make the props you need for the script. You do not need to make all of them, as we realise not all aerials have the same pieces doing the same thing. Important things to remember:

  • Split by materials when importing (this is the easiest way)

  • Props have to be one mesh, and cannot exceed 64k polys

  • You can only use prop materials, not weapon nor vehicle ones.

  • Once attached, you must name the mesh “.mesh” and the collision “.[COL]”

  • The parent dummy must be where the mesh is expected to rotate from. This is crucially important for ladder_seat, ladder_base, ladder_end_piece and ladder_cage.

  • The .mesh must be a child of the “ladder_x” dummy.

  • You must remember to do “Reset to Parent” for the axes of the .mesh, so that the mesh actually rotates around the “ladder_x” dummy.

  • The .[COL] must be in the same place as the .mesh

  • Remember to save individual props as individual .z3d files, this gives you the easiest way of editing them should they need it.

  • Remember to add “.ydr” onto the end of the name when exporting, otherwise ZMod will export as a “.yft”

After all this is done, this is roughly what your folder should look like:

YTYP Creation: As these are all custom/addon props, you will need to create a .ytyp file, which tells the game that these props exist and what they are called, as well as other values.

We recommend using this software to create YTYP files: https://www.gta5-mods.com/tools/addonprops

If you have any further queries with this, reach out to us and we may be able to assist. Additionally, a quick google produces several guides on YTYP creation. Don't forget to add it as a data_file declaration in your fxmanifest.lua and also as a file {} in the manifest file.

Good luck, and enjoy using this script to its full potential!

Getting offset & rotation values

This documentation was created for vehicle developers. If you do not have sufficient knowledge, you will struggle to understand this.

In order to successfully setup your working ladder props, you will need to find out where they should sit in relation to each other, as well as in relation to the base chassis. The following parts of the documentation assume you have successfully followed the previous parts on creating each prop, and have created a YTYP. Don’t try and follow the next parts without this.

To do this, you will need Menyoo (or a similar trainer) where you can spawn props in, move them around and attach props to each other.

Installing MenYoo

You'll firstly need ScriptHookV enabled on your server. We don't recommend enabling this on a public server, so you should set this up on a localhost or development server.

You can download menyoo here. After downloading, you should watch this video here on installing it into your FiveM application data folder.

Default Values

Go into game. Use Menyoo in either FiveM or single player GTAV. Ideally go a large open flat space in game as you may need some space to extend the props.

Open Menyoo, and open the object spooner mode using F9. This will put you into a slightly different viewport than the standard game camera, and give the ability to use a fly around camera. If it won't let you open the object spooner, press F8 a few times first to open the main menu, then close it again.

You can watch a video here on using the Object Spooner, found within menyoo. Another video found here also shows you the basics.

Press F to open the Spooner Menu. Go to “Spawn Entity into World – Object – then up arrow key to jump the bottom, where you hit enter on “Input Model”. Enter “ladder_seat” to spawn in your first prop.

Go back to the first page of the menu, and go to “Manage Entity Database”. Scroll down to “ladder_seat”, and then all the way to the bottom, to “Attachment Options”. Hit “Attach to Something”, and scroll to the vehicle you have spawned in:

For me, this is “surreyalp” as that is the vehicle spawn name. Once you have done this, it should look something like this:

From here, you need to adjust, the X, Y and Z values in the menu, until the prop is located where it should be on the vehicle. For me, it looks like this with these values:

NOTE DOWN THESE VALUES IN A DOCUMENT OR SPREADSHEET.

You will need these values to put into the config file that you have with your model files.

For the next piece (ladder_base), spawn it in, follow all previous steps to spawn it in and then to back to “Manage Entity Database”, except attach it to “ladder_seat” this time not to the vehicle itself. Again, you will need to move the X, Y and Z values so that it is positioned correctly. You should end up with something similar to this:

As you can see, my ladder_base piece is the new grey piece that has appeared with the text on it.

For the “ladder_outer”, “ladder_middle”, “ladder_inner” and any other extending pieces you may have, follow all steps as before about spawning in, but attach the piece you have just spawned to the previous piece. (i.e. ladder_inner attaches to ladder_middle), which in turn attaches to ladder_outer, which you’ve attached to ladder_base). Again, note down the XYZ values somewhere. You should end up with all three pieces sat where they would sit when the ladder is not extended/when it is driving around:

After this, you will need to attach your “ladder_end_piece”, should you have one. Same process as before. Spawn, attach to “ladder_inner”, and move the XYZ values until it is positioned in the right place.

After this, spawn your cage/bucket prop in, manage entity database, attach the “ladder_cage” (if applicable) to ladder_end_piece, and you will have completed setting up the ladder pieces.

Make sure to note down XYZ values for each prop, as this is the whole purpose of this part of the vehicle setup, so that you can put these into the .lua file, so that the script controls your vehicle correctly.

For the outriggers, spawn in your outrigger prop, attach this to the base vehicle, not to another prop, and move it to where it sits when you are driving around. You will need to note a rotation value too, as on one side, your outriggers are going to be flipped (the likely value will be -180.00). See below:

Move the outrigger prop to each location on the vehicle where there is an outrigger (you can do this with one prop as the script will spawn it in four times later), and note the values for each location.

For the feet, again you only need to spawn one in. Attach it to the outrigger prop, move it to where it sits when driving, and then note down these values. Again, the script will spawn it in four times. The values will be the same (assuming your outrigger models are all the same) for each corner of the vehicle because it is attaching to the outrigger prop not offsetting from the centre of the vehicle.

This concludes the process of getting the default values.

Maximum Values

The next stage is to ascertain the maximum offset/rotation values (i.e. the maximum distance from the base position that a given ladder piece extends or rotates).

To do this, start with ladder_base (as ladder_seat is likely to rotate 360⁰), and rotate it upwards to its maximum point. Often with ladders this will be around 80⁰, as most do not point straight upwards. For me, it is 84⁰. Your screen should look something like this now:

For ladder_base, the crucial value to note is the new “Pitch” value you have, as it is a rotating piece. For ladder_outer, _middle and _inner, and other extending pieces, you will likely be changing the Y value, and therefore that is the crucial new one to note as the under “maxOffSet” value. When you have moved each piece (taking care to do them in order, as then it will move the next piece with it), your screen should look something comparable to this:

Ideally, it will look like what the ladder looks like at full extension. N.B. the script doesn’t toggle between full extension and no extension, but rather you can move the pieces to whatever height and angle you want. This is just to obtain the maximum values.

For ladder_end_piece, it may be a rotating piece, as will ladder_cage. Therefore, rotate these to their maximum extent and note down the new Pitch value again.

For the outriggers, you will be moving these along the X axis, so move them on that until they get to their fullest reach, and note down the new X value.

With the outrigger feet, you will be moving these on the Z axis, so again, move their fullest extend or until they touch the ground, and note down your new Z value.

Completed

That is it, you have got all the relevant information to put into your vehicle setup file so that the script controls your vehicle correctly. We promise everything you need to know is contained within this documentation, so please make sure you go over it numerous times if you have an issue before contacting our Support Team.

Important things to note:

  • You attach the ladder_seat and outrigger props to the base vehicle. The rest of the props attach to the previous one, and the feet to the outrigger.

  • Use your base 3d model before convert or pictures of the vehicle in real life to make sure you have placed the props correctly in relation to the vehicle and each other.

  • When finding the maximum offset values, use pictures and or videos, or documents of your vehicle in real life in order to ascertain how far each prop moves, and whether it rotates or extends.

See the picture below to understand how I noted everything down when it comes to the props, including the bb values when exporting from ZMod, as well as all the offset values:

Last updated

Was this helpful?