Project Zomboid

Project Zomboid

Vehicle Tweaker API
58 kommentarer
Davi GO 24 jun @ 14:59 
soul mano me salva ai meu game b42 e chapado de mods nesta ultima atualizaçao meu mini map e painel de veiculos sumirao nao sei q fazer entao talvez eles esteja dimencionados fora da tela se este for o cazo como posso trazelos novamente q arquivos devo procura por favor me ajuda ai
]
Elentári 23 jul, 2024 @ 2:29 
Is it somehow possible to change how much a car can pull?
hakob 18 jul, 2024 @ 7:55 
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 16 aug, 2023 @ 17:26 
Thanks for the reply, if I test it out I'll come by with the results :)
soulfilcher  [skapare] 16 aug, 2023 @ 9:51 
@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 16 aug, 2023 @ 0:14 
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 18 jun, 2023 @ 10:29 
What mods use this?
Kitsune 15 maj, 2023 @ 11:07 
i get tis, any idea how to fix it? https://gyazo.com/eec94f8caede926b942c6766c44e599d
Rodahtnov 12 feb, 2023 @ 17:57 
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  [skapare] 12 feb, 2023 @ 17:17 
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 12 feb, 2023 @ 17:14 
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,
}
}
soulfilcher  [skapare] 2 feb, 2023 @ 8:04 
Hoods have their health defined by the item, so you can't do that using this mod.
Brynjar 1 feb, 2023 @ 20:33 
Is it possible to modify hoods and engines to have more health / take less damage? MP server has it set to as low as possible for damage to cars, just isn't enough. thx for your work !
Brynjar 1 feb, 2023 @ 20:30 
is it possible to increase the health of hoods with this that will retain the health after being installed. Low damage on MP is just not enough.
Jack Rossman 21 jan, 2023 @ 14:05 
Yep. Much appreciated. Keep up the great work my man.
soulfilcher  [skapare] 21 jan, 2023 @ 13:58 
Hi, I will try to test that and update when I can.
Jack Rossman 21 jan, 2023 @ 13:52 
Hey Soulfilcher. How's life been treating you? Hope things have been well.
So anyways, I did discover something VTAPI's missing: The ability to redefine horns!
Here's what I found works. Though it's exclusively for horns, and could probably be refined later?
Note: I just shoved this right underneath "part" in the tweakVehicles function.

elseif t == "horn" then
vehicle:Load(name, "{".."sound".."{ horn ="..y..",}".."}");
Jack Rossman 5 okt, 2022 @ 10:00 
ok, so. It's very rude to go to other people's mods with issues in a mod that depends on said mod. You are aware it's STR doing it, so why bother poor Soulfilcher?
Also, I just got back to my PC, so I wasn't ignoring you. Does the spam still occur when you make a new save after enabling VTAPI? If not, then it's the fact you didn't enable it in your save file.
Anyways, this isn't the place to continue this, so please move back to STR's page or maybe the discord?
JxmmyJxmes 5 okt, 2022 @ 7:37 
*It is now broken
JxmmyJxmes 5 okt, 2022 @ 7:37 
and yet here we are. It is not broken due to the fact that it constantly flashes in my face that I need to use the API tweaker
soulfilcher  [skapare] 5 okt, 2022 @ 7:18 
I guess all you need to do is to subscribe to the mod.
JxmmyJxmes 4 okt, 2022 @ 20:28 
I don't want to tweak any of them though. I'm coming here from STP vehicles.
soulfilcher  [skapare] 4 okt, 2022 @ 8:01 
You need a lua file in your media/shared/ folder that follows the example in the description. Then you add a line for each vehicle's stat you want to tweak.
JxmmyJxmes 4 okt, 2022 @ 6:02 
Nice, so now I will be forced into eternal spamming because I have no clue how to implement this API...
soulfilcher  [skapare] 26 sep, 2022 @ 12:58 
Fixed!
Jack Rossman 26 sep, 2022 @ 11:06 
Welp. I feel a bit stupid. Remember the method for multiple skins? Guess who forgot to mention using "t" in *vehicle:Load(name, "{"..t.."{ texture ="..y..",}".."}");* needs to be changed to *vehicle:Load(name, "{".."skin".."{ texture ="..y..",}".."}");*... Otherwise it'll put "skin1" into that field. My apologies man...
soulfilcher  [skapare] 23 sep, 2022 @ 18:37 
Mod updated, thank you for your suggestions.
Jack Rossman 21 sep, 2022 @ 18:41 
Ok, found the cause for it doing nothing on servers. The "VehicleTweaker_Core" file needs to be moved to "shared" instead of "client". Just thought you should know. Keep up the great work my friend :)
Jack Rossman 21 sep, 2022 @ 9:25 
Odd. Seems the mod doesn't do anything in MP anymore... No errors, just seems the server isn't registering the changes.
Jack Rossman 19 sep, 2022 @ 16:11 
Np my guy. Keep up the great work!
soulfilcher  [skapare] 19 sep, 2022 @ 16:03 
@Zudakas: I don't have a list but it is a matter of trying to see what happens, because some values seem to be recalculated once the vehicle is spawned and the changed value doesn't seem to take effect. One thing I know is problematic right now is adding parts.

@NightScale5755: Thank you for testing that. I will try to check your suggestion and update the mod.
Jack Rossman 19 sep, 2022 @ 15:25 
Heyo, after messing around with the code, I figured out a method for adding multiple skins to a vehicle.
Instead of: *if t == "skin" then*
Use: *if t:contains("skin")*

Therefore one could specify multiple entries, like "skin1, skin2, etc" or even more complex entries like "skincool, skinawesome, etc".
Hope this helps, as this mod's a lifesaver. Have a wonderful day!
Zudakas 3 sep, 2022 @ 12:54 
or is it just those 4, color, mass, maxSpeed, machinicType?
Zudakas 3 sep, 2022 @ 12:53 
So out of curiosity, is there a list of possible variables I could change with this? e.g. mass, hp, etc

I run a small dedicated server, and I'd love people to be able to actually make it from one town to the next without swapping vehicles 3-4 times. Zed population is rather high ;)
Jack Rossman 29 aug, 2022 @ 14:19 
alright. Sounds good
Keep up the great work!
soulfilcher  [skapare] 29 aug, 2022 @ 13:38 
Most probably a limitation due to how I coded it. I will have to take a look.
Jack Rossman 29 aug, 2022 @ 12:59 
Hi there. So uhhh, I've encountered a minor issue. Say I want to add several textures to a car using this. If I use the logical route of 1 TweakVehicle() entry per texture, it'll only add the one at the end of the list. Is there something I'm doing wrong, or is that a limitation?
KV Productions 29 jul, 2022 @ 12:11 
Which mods? because i haven't found any (apart from "paint your ride" maybe, which doesn't work in MP)
soulfilcher  [skapare] 29 jul, 2022 @ 9:25 
@Gas.Pimienta: You have permission for that.

@KV Productions: There is no need to use this mod for that. I think there are mods that do that already.
AndyLoco 28 jul, 2022 @ 20:53 
Permission Request:
Hi, @soulfilcher ! I would like to ask your permission to use your mod in our server modpack. I will give you full credit for your mod in every media I can. If you allow us to do this our community would be very grateful. Thank you!
KV Productions 8 jun, 2022 @ 19:02 
Could this be used to make a mod that allows you to remove rust off of cars?
soulfilcher  [skapare] 15 maj, 2022 @ 15:12 
As far as I know this is still working. It isn't used for specific cars but all cars of a certain type. I don't remember if I did any tests for changing skins though.
Axebeard 15 maj, 2022 @ 13:31 
Is this still working in 41 and if so, is there a property to change a vehicle's skin? (if skin =1 change to skin 2 for example). Thanks!
soulfilcher  [skapare] 1 feb, 2021 @ 11:25 
Thank you Aiteron for the code, I hadn't seen it yet. I will add it in the next update.

@geras: Currently adding parts doesn't work as it should.
Aiteron 28 sep, 2020 @ 11:22 
Wrote some extension on modify areas. Maybe will be interesting (Raw code) - https://pastebin.com/9NYP3c9B
geras 27 sep, 2020 @ 7:02 
Is it possible to add more seats or add additional doors to cars with this? Is it possible to edit "area SeatFrontLeft" or "area SeatFrontRight" values?
soulfilcher  [skapare] 31 aug, 2020 @ 10:00 
I have not tested it with build 41 if that's what you want to know. It most probably still works with build 40.
TurtleShroom 15 aug, 2020 @ 14:16 
Does this Mod still work?
soulfilcher  [skapare] 28 apr, 2020 @ 10:21 
This mod will not help you with that, it is meant to change stats for a car type when they are spawned, not for existing cars on the map.
Öysterboi 27 apr, 2020 @ 2:10 
Could you please help me understand how to change the color of a car? I'm using Filibuster Rhymes' Used Cars and my favorite car which appears to be the only one in the map, has such an ugly color that I NEED to change it.

Thanks in advance but I don't really know nothing about modding and barely know what's an API lol