Project Zomboid

Project Zomboid

662 ratings
Vehicle Tweaker API
2
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
78.621 KB
Jul 3, 2018 @ 10:59am
Dec 23, 2024 @ 9:46am
5 Change Notes ( view )

Subscribe to download
Vehicle Tweaker API

Description
Compatible with B41 and B42

Inspired by and modified from DarkSlayerEX's Item Tweaker API

This modding API allows any modders to make multiple changes to any vehicles , while leaving the rest of the remaining values alone.

WARNING: For now I can't guarantee that most values tweaked are free of bugs, so use and test at your own risk.

Tested and working values: forcedColor, mass, maxSpeed, mechanicType.

For the Simplest Implementation through LUA:
-----------------------------------------------------------------------Begin File
if getActivatedMods():contains("VehicleTweakerAPI") then
require("VehicleTweaker_Core");
else return end

TweakVehicle("Base.CarNormal","mass", "8000");
TweakVehicle("Base.ModernCar","forcedColor", "1.0 0.5 0.5");
TweakVehicle("Base.Van","mechanicType", "1");

TweakVehicleArea("Base.SportsCar", "area SeatFrontLeft", "xywh = 0.6264 -0.1429 1.4725 1.4725")
-----------------------------------------------------------------------End File
For each vehicle and property you wish to change, create a new line, and place the related values in place.

There's an example mod here https://steamcommunity.com/sharedfiles/filedetails/?id=1430481582

Join my Discord server to talk about my mods: https://discord.gg/dzbZgzXNTT
And if you can always...
[www.patreon.com]

Workshop ID: 1430463738
Mod ID: VehicleTweakerAPI
57 Comments
Elentári Jul 23, 2024 @ 2:29am 
Is it somehow possible to change how much a car can pull?
hakob Jul 18, 2024 @ 7:55am 
couldnt figure out what mod needs this, checked mod I installed same time as this (Expanded Hotwire and Autotsar Dadge), but neither of them needed this or maybe they updated back then
Jacques the Crab Aug 16, 2023 @ 5:26pm 
Thanks for the reply, if I test it out I'll come by with the results :)
soulfilcher  [author] Aug 16, 2023 @ 9:51am 
@Kitsune: I have no idea what the link was supposed to show me.

@Kyrox: I don't know, I do have an example mod called Paint it Black.

@Percyrus: Yes, it is possible to add templates, but I have not tested that in a very long time.
Jacques the Crab Aug 16, 2023 @ 12:14am 
Hi, does this allow inserting values besides changing existing ones? Imagine I want to add the capability to craft amor and such, would this allow me to insert templates into the vehicle txt file? Thanks!
Kyrox Jun 18, 2023 @ 10:29am 
What mods use this?
Kitsune May 15, 2023 @ 11:07am 
i get tis, any idea how to fix it? https://gyazo.com/eec94f8caede926b942c6766c44e599d
Rodahtnov Feb 12, 2023 @ 5:57pm 
Changing the particular truckbed item may work, thing is it would apply to all cars using it instead of a particular one (in theory)
May have to think a diff solution ^^
soulfilcher  [author] Feb 12, 2023 @ 5:17pm 
Did you try changing the item? I remember that at some point trying to change that value from inside a vehicle script was bugged. You always got the value set in the item. I can't say what is the current situation as I have not tried that for a long time.
Rodahtnov Feb 12, 2023 @ 5:14pm 
Hey soulfilcher, is it possible to alter the truckbed? tried with something like
TweakVehicle("Base.Van", "part TruckBed", "container", "capacity", "130");
and
TweakVehicle("Base.Van", "part TruckBed", "container { capacity = 130 }");
etc at no avail

Or is it not possible to edit it at all?
PD: Reference:
part TruckBed
{
container
{
conditionAffectsCapacity = false,
capacity = 125,
}
}