FilibusterRhymes Posted September 1, 2018 Share Posted September 1, 2018 2 hours ago, Harra said: I got the size correct by following your instructions. Unfortunately fog was filling my game haha. Now the texture is needing work and i'll have to move the wheels with the script. Any further tips? Hey dude, I'm home now. If you want help getting the texture right, I'm up for it. Did you wanna over discord so we don't hijack the thread? Link to comment Share on other sites More sharing options...
Neutz Posted September 15, 2018 Share Posted September 15, 2018 Quick question, is it possible to add in custom parkingstall zones, Looking to make a custom "military" zone instead of using the original ones. Tried just adding it to the vehicles distribution file. (The one that controls their spawn chance) but i think im missing something. Link to comment Share on other sites More sharing options...
Josko Posted June 5, 2019 Share Posted June 5, 2019 I have plans to create a M1A2 Abrams Tank. But I wonder, is it possible to make the turret of the tank to rotate around or will it just be static? Same goes with the M2 .50 Cal Machine gun, I'm guessing I would need to wait for the AnimTools to do all these things right? Being able to jump on the tank, get inside the tank, move the turret and the main cannon, have the character sit behind the M2 .50 Cal Machine gun and have it move around the tank like aiming a gun, obviously all that has to do with Animations, but Will the AnimTools support that? Giving "Cars" animations so a player can interract with it? Then I wonder, is it possible to create Special/Unique spawning points only for the M1A2 Abrams Tank? So one could make so the Tank only spawns in Military bases for example. Link to comment Share on other sites More sharing options...
Spyware006 Posted December 7, 2019 Share Posted December 7, 2019 (edited) hey, where I can find the plytopzconverter? ty Ok, the link works now! Edited December 11, 2019 by Spyware006 Link to comment Share on other sites More sharing options...
PriMan Posted January 28, 2020 Share Posted January 28, 2020 (edited) On 8/22/2018 at 7:18 PM, RingoD123 said: VEHICLE ZONE HEX COLOR Head #FF0000 Tail #00FF00 Front right door #00FFFF Rear right door #FFFF00 Front left door #FF00FF Rear left door #0000FF Front right window #007F7F Rear right window #7F7F00 Front left window #7F007F Rear left window #00007F Windshield #7F0000 Rear Glass #007F00 Front left guard #C000C0 Rear left guard #0000C0 Front right guard #00C0C0 Rear right guard #C0C000 Roof #000000 Right headlight #400000 Left headlight #C00000 Right tail light #00C000 Left tail light #004000 Right brake light #7F4000 Left brake light #7FC000 Right flashing beacon (The lightbar) #C0C0C0 Left flashing beacon (The lightbar) #404040 Hoot #FF007F Boot / Trunk door #00FF7F Edited January 29, 2020 by PriMan Link to comment Share on other sites More sharing options...
ZombiesLoveBrainiacs Posted April 27, 2020 Share Posted April 27, 2020 My shell damage overlay has the wrong colors ingame. For example: if I make it greyscale, it appears brown ingame. Any idea how I can fix this? I'm using the newest B41. Link to comment Share on other sites More sharing options...
ZombiesLoveBrainiacs Posted April 27, 2020 Share Posted April 27, 2020 (edited) In this image, the scratches look as expected, the dents are brown instead of grey, and the rust is... on fire? It even glows in the dark 😮 edit: ok, the rust glitch was because I set rust to "100" instead of "1" Edited April 27, 2020 by ZombiesLoveBrainiacs Link to comment Share on other sites More sharing options...
MrDany Posted July 31, 2020 Share Posted July 31, 2020 On 4/27/2020 at 6:29 PM, ZombiesLoveBrainiacs said: In this image, the scratches look as expected, the dents are brown instead of grey, and the rust is... on fire? It even glows in the dark 😮 edit: ok, the rust glitch was because I set rust to "100" instead of "1" AHAHHHHHAAHHAHA Man, what did you do with my UAZ-452??? My God, this is the best thing I've ever seen Link to comment Share on other sites More sharing options...
Lt_Ascott Posted February 22, 2021 Share Posted February 22, 2021 I know this is a pretty old thread but, I was joking around with my buddy and he wanted to drive around on a segway as a security guard... so I modeled a low poly mock up as a joke and was trying to make it usable in game... Alas I suck and had no luck... I wanted to make it function mostly like a car but with infinite gas, I think the way the vehicles work is by replacing the character as the controllable object? is there a way I could pose and apply the character to appear on it as they drive around? Thanks for the help... Or for laughing... SegwayVehV0.1.ply Link to comment Share on other sites More sharing options...
Samurai Murtuz Posted April 8, 2021 Share Posted April 8, 2021 what should I do if the car what I'm try add to the game has the engine on the trunk side? Link to comment Share on other sites More sharing options...
KI5 Posted April 13, 2021 Share Posted April 13, 2021 Just switch engine and trunk areas Samurai Murtuz 1 Link to comment Share on other sites More sharing options...
Papa_Chad Posted August 27, 2021 Share Posted August 27, 2021 Great tutorial, too bad it's out of date, could you please update it? I have a question, how can I add dual wheels to the rear of trucks? I'm talking about two wheels on the same axle Haw can i add dua axle too? for example of the M35 Military Truck of the mod "filibuster rhymes' used cars", it has dual axle with dual wheels each one If possible, could teach you how to add different wheels in the rear? Link to comment Share on other sites More sharing options...
FilibusterRhymes Posted September 16, 2021 Share Posted September 16, 2021 On 8/27/2021 at 7:34 PM, Papa_Chad said: Great tutorial, too bad it's out of date, could you please update it? I have a question, how can I add dual wheels to the rear of trucks? I'm talking about two wheels on the same axle Haw can i add dua axle too? for example of the M35 Military Truck of the mod "filibuster rhymes' used cars", it has dual axle with dual wheels each one If possible, could teach you how to add different wheels in the rear? Hey dude. There are actually just two wheels in the center of the back, I just have them modeled to look like four. Link to comment Share on other sites More sharing options...
Papa_Chad Posted September 16, 2021 Share Posted September 16, 2021 13 minutes ago, FilibusterRhymes said: Hey dude. There are actually just two wheels in the center of the back, I just have them modeled to look like four. Cool, so your trick is to use the right rear wheel as an axle (containing 4 wheels, two on one side and two on the other) and the left rear wheel as another axle? Link to comment Share on other sites More sharing options...
StarFireReaper Posted December 15, 2021 Share Posted December 15, 2021 Could we get a updated tutorial for 41+ as the converter is dated and would love to try a hand at making car mods Link to comment Share on other sites More sharing options...
Wasaox Posted December 19, 2021 Share Posted December 19, 2021 (edited) On 12/15/2021 at 7:29 PM, StarFireReaper said: Could we get a updated tutorial for 41+ as the converter is dated and would love to try a hand at making car mods The converter is not needed for 41+ The game now supports .fbx format which is supported by most 3D modeling programs today. Edited December 19, 2021 by Wasaox Link to comment Share on other sites More sharing options...
StarFireReaper Posted December 20, 2021 Share Posted December 20, 2021 On 12/19/2021 at 12:17 PM, Wasaox said: The converter is not needed for 41+ The game now supports .fbx format which is supported by most 3D modeling programs today. Issue is trying to convert old mods to work on build 41 Link to comment Share on other sites More sharing options...
lokdimok Posted September 24, 2022 Share Posted September 24, 2022 Hello, I am aware this thread is kinda old, but it is still one of the best sources about creating vehicles in zomboid. I am currently setting up a vehicle following this guide and have already figured most of the things out. My car is functional, moving and has base textures correctly applied, but I cant get the Overlays and Rust textures get to work. My Mask is existing and working (atleast my windows do have correct reflections) and also do the lights use the correct texture when turning on or off, but damaged parts do not show as damaged regarding me having transparent png files with painted details in 512x512 in my folder and refering to it in the script. Is there any trick about this specific section? I already tried export PNGs with 16 or 8 bit, with embedded color profiles and without, changing the name because i feared the file names are too long, but I am running out of ideas what to try... Link to comment Share on other sites More sharing options...
Papa_Chad Posted September 27, 2022 Share Posted September 27, 2022 What "shader" are you using in your model? By the way, go to discord there and the modder community is much more active. Link to comment Share on other sites More sharing options...
EdwardZNorton Posted October 4, 2022 Share Posted October 4, 2022 Does anyone know the fix for the wheels spinning out of time with the speed? Link to comment Share on other sites More sharing options...
mastin2004 Posted July 23, 2023 Share Posted July 23, 2023 Does anyone know how to fix this? the shadow is too big and the texture is not appear Link to comment Share on other sites More sharing options...
Friskas Posted September 29, 2023 Share Posted September 29, 2023 On 7/23/2023 at 3:49 PM, mastin2004 said: Does anyone know how to fix this? the shadow is too big and the texture is not appear Hello here ! I got the same problem, does anyone find what's wrong ? Thanks ! Link to comment Share on other sites More sharing options...
Friskas Posted January 16 Share Posted January 16 Hello here ! I created a small mod, without any knowledge, to add a StepVan, with a modified texture, without modifying the original of the game (basically a copy/paste of the StepVan). After quite a few hours (yes, I know nothing about it), I succeeded, it works, except that I have an error 1 at launch, but I don't see the problem! If anyone feels like helping me, in the console.txt file, I found this : WARN : General , 1705338597001> MeshAssetManager.loadCallback> Failed to load asset: AssetPath{ "media/models/Vehicles_StepVan1.txt" } StepVan1 is the name of the vehicle Link to comment Share on other sites More sharing options...
Kazu Posted January 22 Share Posted January 22 On 8/23/2018 at 12:18 AM, RingoD123 said: 1) The first thing you want to do, as with most mods is to create your mods folder structure, use the image below as a reference, replacing MOD_NAME with the name of your mod: Hide contents mods MOD_NAME mod.info MOD_NAME.png media lua client MOD_NAME.lua models Vehicles_MOD_NAME.txt scripts vehicles MOD_NAME.txt textures Vehicles Vehicle_MOD_NAME_Shell.png Vehicle_MOD_NAME_Rust.png Vehicle_MOD_NAME_Mask.png Vehicle_MOD_NAME_Lights.png Vehicle_MOD_NAME_Shell_Damaged01.png Vehicle_MOD_NAME_Shell_Damaged02.png Vehicle_MOD_NAME_Overlays_Damaged01.png Vehicle_MOD_NAME_Overlays_Damaged02.png Don't worry about the files shown above, you will be creating them as you follow this guide, just make sure to remember, anytime you see "MOD_NAME" in this guide, replace that with the name you chose for your mod. 2) In your "..mods/MOD_NAME" folder, create your "mod.info" text file which contains the following code: Reveal hidden contents name=MOD_NAME id=MOD_NAME description=Some description poster=MOD_NAME.png Remember to replace all "MOD_NAME"'s with the actual name of your mod. 3) In the same folder, create/place your MOD_NAME.png , this will be the thumbnail used in game as the poster/picture for your mod. 4) Next up, in your "mods/MOD_NAME/media/lua/client" folder, create your MOD_NAME.lua file with the following code inside: Reveal hidden contents local function info() dir = getDir(MOD_ID); loadVehicleModel("Vehicles_MOD_NAME", dir.."/media/models/Vehicles_MOD_NAME.txt", dir.."/media/textures/Vehicles/Vehicle_MOD_NAME_Shell.png"); VehicleDistributions[1].MOD_NAME = { Normal = VehicleDistributions.Normal, Specific = { VehicleDistributions.Groceries, VehicleDistributions.Carpenter, VehicleDistributions.Farmer, VehicleDistributions.Electrician, VehicleDistributions.Survivalist, VehicleDistributions.Clothing, VehicleDistributions.ConstructionWorker, VehicleDistributions.Painter }, } ISCarMechanicsOverlay.CarList["Base.MOD_NAME"] = {imgPrefix = "smallcar_", x=10,y=0}; VehicleZoneDistribution.parkingstall.vehicles["Base.MOD_NAME"] = {index = -1, spawnChance = 30}; end Events.OnInitWorld.Add(info); This is the script that will load your model and scripts into the game, it also controls the spawn rate for the car in each type of zone as well as providing the vehicle mechanic overlay. Remember to replace all instances of "MOD_NAME" with the actual name you chose for your mod. 5) Next, in your "mods/MOD_NAME/media/scripts/vehicles" folder, create your MOD_NAME.txt file containing the following code: Reveal hidden contents module Base { vehicle MOD_NAME { mechanicType = 1, offRoadEfficiency = 0.8, engineRepairLevel = 4, playerDamageProtection = 0.8, /* The first model is always used as the vehicle's model. */ model { file = Vehicles_MOD_NAME, scale = 2.15, offset = 0 0.20 0, } /* List the different skins for this vehicle here. A random skin will be chosen when a vehicle is first created.*/ skin { texture = Vehicles/Vehicle_MOD_NAME_Shell, } textureRust = Vehicles/Vehicle_MOD_NAME_Rust, textureMask = Vehicles/Vehicle_MOD_NAME_Mask, textureLights = Vehicles/Vehicle_MOD_NAME_Lights, textureDamage1Overlay = Vehicles/Vehicle_MOD_NAME_Overlays_Damaged01, textureDamage1Shell = Vehicles/Vehicle_MOD_NAME_Shell_Damaged01, textureDamage2Overlay = Vehicles/Vehicle_MOD_NAME_Overlays_Damaged02, textureDamage2Shell = Vehicles/Vehicle_MOD_NAME_Shell_Damaged02, sound { horn = vehicle_horn1, } /* The size (in physics coordinates, not affected by model scale) of the collision body. */ extents = 1.75 1 4.7, /* shadowOffset - Shadow boundaries shift: (right), (left), (front), (rear) */ shadowOffset = 0.0 0.0 0.0 0.0, mass = 650, physicsChassisShape = 1.75 0.85 4.7, /* Center of mass relative to the chassis origin. The lower it is, the less likely the vehicle is to flip. Setting y too low will cause the vehicle to lean the wrong way in turns and when accelerating/braking. */ centerOfMassOffset = 0.0 0.30 0.0, /* Amount of torque applied to each wheel. This provides the vehicle's acceleration */ engineForce = 3600, engineQuality = 60, engineLoudness = 55, maxSpeed = 70f, /* Amount of braking torque applied to each wheel. */ brakingForce = 60, gearRatioCount = 4, gearRatioR = 4.7, gearRatio1 = 3.6, gearRatio2 = 2.2, gearRatio3 = 1.3, gearRatio4 = 1.0, extentsOffset = 0.5 0.5, stoppingMovementForce = 2.0f, /* Reduces the rolling torque applied from the wheels that cause the vehicle to roll over. This is a bit of a hack, but it's quite effective. 0.0 = no roll, 1.0 = physical behaviour. If m_frictionSlip is too high, you'll need to reduce this to stop the vehicle rolling over. You should also try lowering the vehicle's centre of mass */ rollInfluence = 1.0f, /* How quickly the front wheels change facing direction. */ steeringIncrement = 0.02, /* Maximum steering angle. */ steeringClamp = 0.3, /* The stiffness constant for the suspension. 10.0 - Offroad buggy, 50.0 - Sports car, 200.0 - F1 Car */ suspensionStiffness = 30, /* The damping coefficient for when the suspension is compressed. Set to k * 2.0 * btSqrt(m_suspensionStiffness) so k is proportional to critical damping. k = 0.0 undamped & bouncy, k = 1.0 critical damping 0.1 to 0.3 are good values */ suspensionCompression = 2.83 /*0.88*/ /*4.4*/, /* aka wheelsDampingCompression */ /* The damping coefficient for when the suspension is expanding. See the comments for m_wheelsDampingCompression for how to set k. m_wheelsDampingRelaxation should be slightly larger than wheelsDampingCompression, eg 0.2 to 0.5 */ suspensionDamping = 2.88 /*1.76*/ /*2.3*/, /* aka wheelsDampingRelaxation */ /* The maximum distance the suspension can be compressed (centimetres) */ /* float minSuspensionLength = wheel.getSuspensionRestLength() - wheel.maxSuspensionTravelCm * 0.01f; float maxSuspensionLength = wheel.getSuspensionRestLength() + wheel.maxSuspensionTravelCm * 0.01f; */ maxSuspensionTravelCm = 100, /* The maximum length of the suspension (metres) */ suspensionRestLength = 0.3f, /* The coefficient of friction between the tyre and the ground. Should be about 0.8 for realistic cars, but can be increased for better handling. Set large (10000.0) for kart racers */ wheelFriction = 1.6f /*1000*/, /* aka frictionSlip */ /* The amount of collision damage the vehicle can sustain while still being driveable. */ frontEndHealth = 150, rearEndHealth = 150, seats = 4, wheel FrontLeft { front = true, /* offset of wheel-model origin from chassis origin, in unscaled model coordinate space */ offset = 0.32f 0.14f 0.60f, radius = 0.3f, width = 0.2f, } wheel FrontRight { front = true, offset = -0.32f 0.14f 0.60f, radius = 0.3f, width = 0.2f, } wheel RearLeft { front = false, offset = 0.32f 0.14f -0.67f, radius = 0.3f, width = 0.2f, } wheel RearRight { front = false, offset = -0.32f 0.14f -0.67f, radius = 0.3f, width = 0.2f, } template = PassengerSeat4, passenger FrontLeft { position inside { offset = 0.2 0 -0.0121, rotate = 0.0 0.0 0.0, } position outside { offset = 0.5698 0 -0.0121, rotate = 0.0 0.0 0.0, } } passenger FrontRight { position inside { offset = -0.2 0 -0.0121, rotate = 0.0 0.0 0.0, } position outside { offset = -0.5698 0 -0.0121, rotate = 0.0 0.0 0.0, } } passenger RearLeft { position inside { offset = 0.2 0 -0.4, rotate = 0.0 0.0 0.0, } position outside { } } passenger RearRight { position inside { offset = -0.2 0 -0.4, rotate = 0.0 0.0 0.0, } position outside { } } area Engine { xywh = 0 1.3256 0.814 0.4651, } area TruckBed { xywh = 0 -1.3256 0.814 0.4651, } area SeatFrontLeft { xywh = 0.6395 -0.0121 0.4651 0.6512, } area SeatFrontRight { xywh = -0.6395 -0.0121 0.4651 0.6512, } area GasTank { xywh = 0.6395 -0.668 0.4651 0.4651, } area TireFrontLeft { xywh = 0.6395 0.6 0.4651 0.4651, } area TireFrontRight { xywh = -0.6395 0.6 0.4651 0.4651, } area TireRearLeft { xywh = 0.6395 -0.67 0.4651 0.4651, } area TireRearRight { xywh = -0.6395 -0.67 0.4651 0.4651, } template = TrunkDoor, template = Trunk/part/TruckBed, part TruckBed { itemType = Base.SmallTrunk, container { capacity = 40, } } template = Seat/part/SeatFrontLeft, template = Seat/part/SeatFrontRight, template = Seat/part/SeatRearLeft, template = Seat/part/SeatRearRight, part SeatRearLeft { table install { area = SeatFrontLeft, } table uninstall { area = SeatFrontLeft, } } part SeatRearRight { table install { area = SeatFrontRight, } table uninstall { area = SeatFrontRight, } } part Seat* { container { capacity = 20, } table install { skills = Mechanics:2, } table uninstall { skills = Mechanics:2, } } part GloveBox { area = SeatFrontRight, itemType = Base.GloveBox, container { capacity = 3, test = Vehicles.ContainerAccess.GloveBox, } lua { create = Vehicles.Create.Default, } } template = GasTank, template = Battery, template = Engine, template = Muffler, template = EngineDoor, part EngineDoor { mechanicRequireKey = false, } part Heater { category = engine, lua { update = Vehicles.Update.Heater, } } part PassengerCompartment { category = nodisplay, lua { update = Vehicles.Update.PassengerCompartment, } } template = Windshield/part/Windshield, template = Windshield/part/WindshieldRear, template = Window/part/WindowFrontLeft, template = Window/part/WindowFrontRight, template = Window/part/WindowRearLeft, template = Window/part/WindowRearRight, part WindowRearLeft { area = TireRearLeft, parent = , table install { requireInstalled = , } } part WindowRearRight { area = TireRearRight, parent = , table install { requireInstalled = , } } template = Door/part/DoorFrontLeft, template = Door/part/DoorFrontRight, template = Tire, template = Brake, template = Suspension, template = Radio, template = Headlight, } } This script example contains all of the parameters to control the simulation of the vehicle, such as engine power, gear ratios, collision cube and much more. You will (hopefully) find it well commented to give you an idea of what each parameter does. You can look in the games "media\scripts\vehicles" folder for a vanilla vehicle script that more closely reflects the vehicle you are adding rather than starting with the example above, have a good look through them all to get a sense of the different templates you can use and the various changes that can be made to different components. 6) Now you need to (if you have not already) make the 3d model for your vehicle. We suggest using Blender, but as long as you're experienced in 3d modelling, any program that can export .ply files should work, just make sure your faces are triangulated, in Blender you can do this by selecting your model in Edit mode then pressing Ctrl + T. Then drag and drop the exported ply file onto the converter supplied below (unzip the below file, drag your .ply directly onto the .exe, do not double click the exe), it will output a new txt file with the same name as the .ply in the same directory. Copy the new .txt file into your "mods/MOD_NAME/media/models" folder as "Vehicles_MOD_NAME.txt This is the .ply to PZ convertor: PZ_PLYtoPZconverter.zip 5.16 kB · 258 downloads 7) Now it's time to create your vehicles texture files, these should all go into the "mods/MOD_NAME/media/textures/Vehicles" folder. First up is your "Vehicles_MOD_NAME_Shell.png" , this is the main texture image for your vehicle and needs to be 512x512 pixels, as do all of your textures, below is an example: Reveal hidden contents Example: Unless you are using the advanced technique demonstrated in the included example mod at the bottom of this post, there should NOT be any part of this texture that is left transparent/white/black. Next there are 6 different overlay/detail png's to create, the first is for the vehicle lights ("Vehicles_MOD_NAME_Lights.png"): Reveal hidden contents Example: Then the vehicle rust ("Vehicles_MOD_NAME_Rust.png"): Reveal hidden contents Example: The next 2 image examples ("Vehicles_MOD_NAME_Shell_Damaged01.png" and "Vehicles_MOD_NAME_Shell_Damaged02.png") are to show light and heavy damage, respectively, on the vehicle's shell. They are used to represent dents in the bodywork: Reveal hidden contents Examples: The next 2 image examples ("Vehicles_MOD_NAME_Overlays_Damaged01.png" and "Vehicles_MOD_NAME_Overlays_Damaged02.png") are very similar to the previous 2 except they are for showing damage on windows and lights as well as scratched on the body work: Reveal hidden contents Examples: The last file we need is the vehicle colour mask ("Vehicles_MOD_NAME_Mask.png"), which should also be placed in your "mods/MOD_NAME/media/textures/Vehicles" folder. This tells the game which parts of your vehicle texture correspond to which part of your vehicle model and is needed to display damage, lowered windows and removed elements etc: Reveal hidden contents Example: Here the colour values to be used: Reveal hidden contents The zone The color Head #FF0000 Tail #00FF00 Front right door #00FFFF Rear right door #FFFF00 Front left door #FF00FF Rear left door #0000FF Front right window #007F7F Rear right window #7F7F00 Front left window #7F007F Rear left window #00007F Windshield #7F0000 Rear Glass #007F00 Front right guard #C000C0 Rear right guard #0000C0 Front left guard #00C0C0 Rear left guard #C0C000 Roof #000000 Right headlight #400000 Left headlight #C00000 Right tail light #00C000 Left tail light #004000 Right brake light #7F4000 Left brake light #7FC000 Right flashing beacon(The lightbar) #C0C0C0 Left flashing beacon(The lightbar) #404040 Hoot #FF007F Boot / Trunk door #00FF7F Copy your complete mod folder structure into your C:\Users\YourUsernameHere\Zomboid\Mods folder, load the game, turn the mod on in the mod menu and start a new game, your new vehicle is now ready to be found and taken for a spin. Finally, here: ZAZ968M.zip - you can find an example vehicle mod using the above instructions. Notice the included example mod uses a slightly different process with its textures/overlays. The main texture is transparent while the detail has been shifted onto the vehicle_lights .png. This allows the game to automatically and procedurally generate different colours of your car when they are spawned in. Happy Modding! I Cant See the Pics For reference Please Help? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now